aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/Caps
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs25
1 files changed, 19 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 58b7b00..46932b1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -1006,28 +1006,41 @@ namespace OpenSim.Region.ClientStack.Linden
1006 } 1006 }
1007 } 1007 }
1008 1008
1009 // faces number to pbs shape 1009 // faces number to pbs shape for viewers LOD
1010 switch(face_list.Count) 1010 // now extended to full faces equivalent
1011 int nfaces = face_list.Count;
1012 switch(nfaces)
1011 { 1013 {
1012 case 1: 1014 case 1:
1013 case 2: 1015 case 2:
1014 pbs.ProfileCurve = (byte)ProfileCurve.Circle; 1016 pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle;
1015 pbs.PathCurve = (byte)PathCurve.Circle; 1017 pbs.PathCurve = (byte)PathCurve.Circle;
1018 if(nfaces == 2)
1019 pbs.ProfileHollow = 1;
1016 break; 1020 break;
1017 1021
1018 case 3: 1022 case 3:
1019 case 4: 1023 case 4:
1020 pbs.ProfileCurve = (byte)ProfileCurve.Circle; 1024 pbs.ProfileCurve = (byte)ProfileCurve.Circle | (byte)HollowShape.Triangle;
1021 pbs.PathCurve = (byte)PathCurve.Line; 1025 pbs.PathCurve = (byte)PathCurve.Line;
1026 if(nfaces == 4)
1027 pbs.ProfileHollow = 1;
1022 break; 1028 break;
1029
1023 case 5: 1030 case 5:
1024 pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle; 1031 pbs.ProfileCurve = (byte)ProfileCurve.EqualTriangle | (byte)HollowShape.Triangle;
1025 pbs.PathCurve = (byte)PathCurve.Line; 1032 pbs.PathCurve = (byte)PathCurve.Line;
1026 break; 1033 break;
1027 1034
1028 default: 1035 default:
1029 pbs.ProfileCurve = (byte)ProfileCurve.Square; 1036 // hack to flag that pbs does represent number of faces
1037 //meshs where never uploaded with this
1038 pbs.ProfileCurve = (byte)ProfileCurve.Square | (byte)HollowShape.Triangle;
1030 pbs.PathCurve = (byte)PathCurve.Line; 1039 pbs.PathCurve = (byte)PathCurve.Line;
1040 if(nfaces == 7)
1041 pbs.ProfileHollow = 1;
1042 else if(nfaces == 8)
1043 pbs.ProfileBegin = 1;
1031 break; 1044 break;
1032 } 1045 }
1033 1046