add a simple prim area estimator

LSLKeyTest
UbitUmarov 2016-08-09 13:18:51 +01:00
parent f387b93859
commit 6c00016447
1 changed files with 23 additions and 0 deletions

View File

@ -1188,6 +1188,29 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
public float maxSimpleArea()
{
float a,b;
if(m_shape.Scale.X > m_shape.Scale.Y)
{
a = m_shape.Scale.X;
if(m_shape.Scale.Y > m_shape.Scale.Z)
b = m_shape.Scale.Y;
else
b = m_shape.Scale.Z;
}
else
{
a = m_shape.Scale.Y;
if(m_shape.Scale.X > m_shape.Scale.Z)
b = m_shape.Scale.X;
else
b = m_shape.Scale.Z;
}
return a*b;
}
public UpdateRequired UpdateFlag { get; set; } public UpdateRequired UpdateFlag { get; set; }
public bool UpdatePhysRequired { get; set; } public bool UpdatePhysRequired { get; set; }