Split GetAxisAlignedBoundingBox into two methods to allow calculation of
combined bounding boxes and offsetsavinationmerge
parent
9d4913224f
commit
70f7790413
|
@ -794,9 +794,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim
|
/// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight)
|
public void GetAxisAlignedBoundingBoxRaw(out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ)
|
||||||
{
|
{
|
||||||
float maxX = -256f, maxY = -256f, maxZ = -256f, minX = 256f, minY = 256f, minZ = 256f;
|
maxX = -256f;
|
||||||
|
maxY = -256f;
|
||||||
|
maxZ = -256f;
|
||||||
|
minX = 256f;
|
||||||
|
minY = 256f;
|
||||||
|
minZ = 256f;
|
||||||
|
|
||||||
lockPartsForRead(true);
|
lockPartsForRead(true);
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
|
@ -1034,7 +1040,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lockPartsForRead(false);
|
lockPartsForRead(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight)
|
||||||
|
{
|
||||||
|
float minX;
|
||||||
|
float maxX;
|
||||||
|
float minY;
|
||||||
|
float maxY;
|
||||||
|
float minZ;
|
||||||
|
float maxZ;
|
||||||
|
|
||||||
|
GetAxisAlignedBoundingBoxRaw(out minX, out maxX, out minY, out maxY, out minZ, out maxZ);
|
||||||
Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ);
|
Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ);
|
||||||
|
|
||||||
offsetHeight = 0;
|
offsetHeight = 0;
|
||||||
|
|
Loading…
Reference in New Issue