diff options
author | UbitUmarov | 2018-03-05 16:36:39 +0000 |
---|---|---|
committer | UbitUmarov | 2018-03-05 16:36:39 +0000 |
commit | 18914fae64e9ccd8044924f5db061dbfeed4a33d (patch) | |
tree | a618b8d7ebf9b45ed95e0391a29b9e08c72eb552 /OpenSim/Region/Framework/Scenes | |
parent | Remove the work around for sphere number of faces since as of commit 846f35 i... (diff) | |
download | opensim-SC_OLD-18914fae64e9ccd8044924f5db061dbfeed4a33d.zip opensim-SC_OLD-18914fae64e9ccd8044924f5db061dbfeed4a33d.tar.gz opensim-SC_OLD-18914fae64e9ccd8044924f5db061dbfeed4a33d.tar.bz2 opensim-SC_OLD-18914fae64e9ccd8044924f5db061dbfeed4a33d.tar.xz |
make more clear some magic numbers on SOP getnumberofsides(), reduce unnecessary calls to it on LSL api
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0533099..2c183ad 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3914,9 +3914,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3914 | { | 3914 | { |
3915 | // removed sides | 3915 | // removed sides |
3916 | int cut = (Shape.ProfileEnd + Shape.ProfileBegin); | 3916 | int cut = (Shape.ProfileEnd + Shape.ProfileBegin); |
3917 | if(cut > 50000) | 3917 | if(cut > 50000) // range is 0 to 50000 |
3918 | cut = 50000; | 3918 | cut = 50000; |
3919 | cut /= 12500; | 3919 | cut /= 12500; // ie 1/4 |
3920 | ret -= cut; | 3920 | ret -= cut; |
3921 | ret += 2; // both cut faces | 3921 | ret += 2; // both cut faces |
3922 | } | 3922 | } |
@@ -3927,9 +3927,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3927 | { | 3927 | { |
3928 | // removed faces | 3928 | // removed faces |
3929 | int cut = (Shape.ProfileEnd + Shape.ProfileBegin); | 3929 | int cut = (Shape.ProfileEnd + Shape.ProfileBegin); |
3930 | if(cut >= 16667 ) | 3930 | if(cut >= 16667 ) // ie 1/3 |
3931 | ret--; | 3931 | ret--; |
3932 | if(cut >= 33333 ) | 3932 | if(cut >= 33333 ) // ie 2/3 |
3933 | ret--; | 3933 | ret--; |
3934 | ret += 2; // both cut faces | 3934 | ret += 2; // both cut faces |
3935 | } | 3935 | } |
@@ -3944,7 +3944,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3944 | // cut faces exist if cut or skew or unequal twist limits | 3944 | // cut faces exist if cut or skew or unequal twist limits |
3945 | if (Shape.PathBegin > 0 || Shape.PathEnd > 0 || Shape.PathSkew != 0 || (Shape.PathTwistBegin != Shape.PathTwist)) | 3945 | if (Shape.PathBegin > 0 || Shape.PathEnd > 0 || Shape.PathSkew != 0 || (Shape.PathTwistBegin != Shape.PathTwist)) |
3946 | ret += 2; | 3946 | ret += 2; |
3947 | if (Shape.ProfileBegin > 0 || Shape.ProfileEnd > 0 || Shape.ProfileHollow > 0) // dimple also if hollow | 3947 | if (Shape.ProfileBegin > 0 || Shape.ProfileEnd > 0 || Shape.ProfileHollow > 0) // dimple faces also if hollow |
3948 | ret += 2; | 3948 | ret += 2; |
3949 | break; | 3949 | break; |
3950 | case PrimType.TORUS: | 3950 | case PrimType.TORUS: |