cosmetics on mesh upload encoding of number of faces on pbs shape. Use opensim shape enums in place of libovm for coerence, add a few coments.
parent
2f6c78b888
commit
29ab39f14f
|
@ -1011,35 +1011,48 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
int nfaces = face_list.Count;
|
int nfaces = face_list.Count;
|
||||||
switch(nfaces)
|
switch(nfaces)
|
||||||
{
|
{
|
||||||
case 1:
|
case 0: // low oops case
|
||||||
case 2:
|
case 1: // torus
|
||||||
pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle;
|
pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
|
||||||
pbs.PathCurve = (byte)PathCurve.Circle;
|
pbs.PathCurve = (byte)Extrusion.Curve1;
|
||||||
if(nfaces == 2)
|
break;
|
||||||
|
|
||||||
|
case 2: // torus with hollow (a sl viewer whould see 4 faces on a hollow sphere)
|
||||||
|
pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
|
||||||
|
pbs.PathCurve = (byte)Extrusion.Curve1;
|
||||||
pbs.ProfileHollow = 1;
|
pbs.ProfileHollow = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3: // cylinder
|
||||||
case 4:
|
pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
|
||||||
pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle;
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
pbs.PathCurve = (byte)PathCurve.Line;
|
break;
|
||||||
if(nfaces == 4)
|
|
||||||
|
case 4: // cylinder with hollow
|
||||||
|
pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
|
||||||
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
pbs.ProfileHollow = 1;
|
pbs.ProfileHollow = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5: // prism
|
||||||
pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle | (byte)HollowShape.Triangle;
|
pbs.ProfileCurve = (byte)ProfileShape.EquilateralTriangle | (byte)HollowShape.Triangle;
|
||||||
pbs.PathCurve = (byte)PathCurve.Line;
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case 6: // box
|
||||||
// hack to flag that pbs does represent number of faces
|
pbs.ProfileCurve = (byte)ProfileShape.Square | (byte)HollowShape.Triangle;
|
||||||
//meshs where never uploaded with this
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 7: // box with hollow
|
||||||
|
pbs.ProfileCurve = (byte)ProfileShape.Square | (byte)HollowShape.Triangle;
|
||||||
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
|
pbs.ProfileHollow = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: // 8 faces box with cut
|
||||||
pbs.ProfileCurve = (byte)ProfileCurve.Square | (byte)HollowShape.Triangle;
|
pbs.ProfileCurve = (byte)ProfileCurve.Square | (byte)HollowShape.Triangle;
|
||||||
pbs.PathCurve = (byte)PathCurve.Line;
|
pbs.PathCurve = (byte)Extrusion.Straight;
|
||||||
if(nfaces == 7)
|
|
||||||
pbs.ProfileHollow = 1;
|
|
||||||
else if(nfaces == 8)
|
|
||||||
pbs.ProfileBegin = 1;
|
pbs.ProfileBegin = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue