diff options
author | UbitUmarov | 2017-04-25 04:58:24 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-25 04:58:24 +0100 |
commit | 2f6c78b88895c0934179fb8eb70ae1dc08883d5f (patch) | |
tree | fc10a6fbe608e10a62248ad39bae08d15e322f17 /OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps | |
parent | some fixes on the materials paramenters of llGetPrimitiveParams() (diff) | |
download | opensim-SC-2f6c78b88895c0934179fb8eb70ae1dc08883d5f.zip opensim-SC-2f6c78b88895c0934179fb8eb70ae1dc08883d5f.tar.gz opensim-SC-2f6c78b88895c0934179fb8eb70ae1dc08883d5f.tar.bz2 opensim-SC-2f6c78b88895c0934179fb8eb70ae1dc08883d5f.tar.xz |
finish encoding number of mesh faces in pbs shape on new meshs upload, and *HACK* flag it setting hollow shape to triangle. (some limited encoding as added some months ago, but only for viewers LOD). Use this hack flag to fix sop number of faces. old meshs will still report 8 faces, information to fix this seems lost unless the mesh asset is decoded
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 25 |
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 | ||