From 6f5f6431a45cad8e23c2251d661691d905fc08f7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Aug 2016 21:46:19 +0100 Subject: add a SimpleAngularDistance Updates prioritazition scheme. Results don't look that great so don't use it still. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 90be18f..bc603ae 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1191,24 +1191,28 @@ namespace OpenSim.Region.Framework.Scenes public float maxSimpleArea() { float a,b; - if(m_shape.Scale.X > m_shape.Scale.Y) + float sx = m_shape.Scale.X; + float sy = m_shape.Scale.Y; + float sz = m_shape.Scale.Z; + + if( sx > sy) { - a = m_shape.Scale.X; - if(m_shape.Scale.Y > m_shape.Scale.Z) - b = m_shape.Scale.Y; + a = sx; + if(sy > sz) + b = sy; else - b = m_shape.Scale.Z; + b = sz; } else { - a = m_shape.Scale.Y; - if(m_shape.Scale.X > m_shape.Scale.Z) - b = m_shape.Scale.X; + a = sy; + if(sx > sz) + b = sx; else - b = m_shape.Scale.Z; + b = sz; } - return a*b; + return a * b; } public UpdateRequired UpdateFlag { get; set; } -- cgit v1.1