aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-04-25 13:05:20 +0100
committerUbitUmarov2017-04-25 13:05:20 +0100
commit29ab39f14f69822bd0df0b263b03bec69c376e39 (patch)
tree563bbf3d53ba1b742ae10d0fdeb00424ac8bf450
parent finish encoding number of mesh faces in pbs shape on new meshs upload, and *... (diff)
downloadopensim-SC-29ab39f14f69822bd0df0b263b03bec69c376e39.zip
opensim-SC-29ab39f14f69822bd0df0b263b03bec69c376e39.tar.gz
opensim-SC-29ab39f14f69822bd0df0b263b03bec69c376e39.tar.bz2
opensim-SC-29ab39f14f69822bd0df0b263b03bec69c376e39.tar.xz
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.
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs59
1 files changed, 36 insertions, 23 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 46932b1..4a5a8e7 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -1011,36 +1011,49 @@ namespace OpenSim.Region.ClientStack.Linden
1011 int nfaces = face_list.Count; 1011 int nfaces = face_list.Count;
1012 switch(nfaces) 1012 switch(nfaces)
1013 { 1013 {
1014 case 1: 1014 case 0: // low oops case
1015 case 2: 1015 case 1: // torus
1016 pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle; 1016 pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
1017 pbs.PathCurve = (byte)PathCurve.Circle; 1017 pbs.PathCurve = (byte)Extrusion.Curve1;
1018 if(nfaces == 2)
1019 pbs.ProfileHollow = 1;
1020 break; 1018 break;
1021 1019
1022 case 3: 1020 case 2: // torus with hollow (a sl viewer whould see 4 faces on a hollow sphere)
1023 case 4: 1021 pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
1024 pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle; 1022 pbs.PathCurve = (byte)Extrusion.Curve1;
1025 pbs.PathCurve = (byte)PathCurve.Line; 1023 pbs.ProfileHollow = 1;
1026 if(nfaces == 4)
1027 pbs.ProfileHollow = 1;
1028 break; 1024 break;
1029 1025
1030 case 5: 1026 case 3: // cylinder
1031 pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle | (byte)HollowShape.Triangle; 1027 pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
1032 pbs.PathCurve = (byte)PathCurve.Line; 1028 pbs.PathCurve = (byte)Extrusion.Straight;
1033 break; 1029 break;
1034 1030
1035 default: 1031 case 4: // cylinder with hollow
1036 // hack to flag that pbs does represent number of faces 1032 pbs.ProfileCurve = (byte)ProfileShape.Circle | (byte)HollowShape.Triangle;
1037 //meshs where never uploaded with this 1033 pbs.PathCurve = (byte)Extrusion.Straight;
1034 pbs.ProfileHollow = 1;
1035 break;
1036
1037 case 5: // prism
1038 pbs.ProfileCurve = (byte)ProfileShape.EquilateralTriangle | (byte)HollowShape.Triangle;
1039 pbs.PathCurve = (byte)Extrusion.Straight;
1040 break;
1041
1042 case 6: // box
1043 pbs.ProfileCurve = (byte)ProfileShape.Square | (byte)HollowShape.Triangle;
1044 pbs.PathCurve = (byte)Extrusion.Straight;
1045 break;
1046
1047 case 7: // box with hollow
1048 pbs.ProfileCurve = (byte)ProfileShape.Square | (byte)HollowShape.Triangle;
1049 pbs.PathCurve = (byte)Extrusion.Straight;
1050 pbs.ProfileHollow = 1;
1051 break;
1052
1053 default: // 8 faces box with cut
1038 pbs.ProfileCurve = (byte)ProfileCurve.Square | (byte)HollowShape.Triangle; 1054 pbs.ProfileCurve = (byte)ProfileCurve.Square | (byte)HollowShape.Triangle;
1039 pbs.PathCurve = (byte)PathCurve.Line; 1055 pbs.PathCurve = (byte)Extrusion.Straight;
1040 if(nfaces == 7) 1056 pbs.ProfileBegin = 1;
1041 pbs.ProfileHollow = 1;
1042 else if(nfaces == 8)
1043 pbs.ProfileBegin = 1;
1044 break; 1057 break;
1045 } 1058 }
1046 1059