diff options
author | UbitUmarov | 2016-08-09 13:18:51 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-09 13:18:51 +0100 |
commit | 6c00016447996bc18935edc76bb5d61b6740a296 (patch) | |
tree | b837ebce5c80d22fc4d64b4af3abb6b5c0f467bd /OpenSim/Region/Framework/Scenes | |
parent | tell prim name on some more ubMeshmerizer error/warn messages (diff) | |
download | opensim-SC-6c00016447996bc18935edc76bb5d61b6740a296.zip opensim-SC-6c00016447996bc18935edc76bb5d61b6740a296.tar.gz opensim-SC-6c00016447996bc18935edc76bb5d61b6740a296.tar.bz2 opensim-SC-6c00016447996bc18935edc76bb5d61b6740a296.tar.xz |
add a simple prim area estimator
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0847b0b..90be18f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1188,6 +1188,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
1188 | } | 1188 | } |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | public float maxSimpleArea() | ||
1192 | { | ||
1193 | float a,b; | ||
1194 | if(m_shape.Scale.X > m_shape.Scale.Y) | ||
1195 | { | ||
1196 | a = m_shape.Scale.X; | ||
1197 | if(m_shape.Scale.Y > m_shape.Scale.Z) | ||
1198 | b = m_shape.Scale.Y; | ||
1199 | else | ||
1200 | b = m_shape.Scale.Z; | ||
1201 | } | ||
1202 | else | ||
1203 | { | ||
1204 | a = m_shape.Scale.Y; | ||
1205 | if(m_shape.Scale.X > m_shape.Scale.Z) | ||
1206 | b = m_shape.Scale.X; | ||
1207 | else | ||
1208 | b = m_shape.Scale.Z; | ||
1209 | } | ||
1210 | |||
1211 | return a*b; | ||
1212 | } | ||
1213 | |||
1191 | public UpdateRequired UpdateFlag { get; set; } | 1214 | public UpdateRequired UpdateFlag { get; set; } |
1192 | public bool UpdatePhysRequired { get; set; } | 1215 | public bool UpdatePhysRequired { get; set; } |
1193 | 1216 | ||