diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index ab7e3e9..0ad05e7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -652,10 +652,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
652 | /// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim | 652 | /// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim |
653 | /// </summary> | 653 | /// </summary> |
654 | /// <returns></returns> | 654 | /// <returns></returns> |
655 | public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight) | 655 | public void GetAxisAlignedBoundingBoxRaw(out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ) |
656 | { | 656 | { |
657 | float maxX = -256f, maxY = -256f, maxZ = -256f, minX = 256f, minY = 256f, minZ = 256f; | 657 | maxX = -256f; |
658 | lock (m_parts) | 658 | maxY = -256f; |
659 | maxZ = -256f; | ||
660 | minX = 256f; | ||
661 | minY = 256f; | ||
662 | minZ = 256f; | ||
663 | |||
664 | lock(m_parts); | ||
659 | { | 665 | { |
660 | foreach (SceneObjectPart part in m_parts.Values) | 666 | foreach (SceneObjectPart part in m_parts.Values) |
661 | { | 667 | { |
@@ -888,7 +894,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
888 | minZ = backBottomLeft.Z; | 894 | minZ = backBottomLeft.Z; |
889 | } | 895 | } |
890 | } | 896 | } |
897 | } | ||
898 | |||
899 | public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight) | ||
900 | { | ||
901 | float minX; | ||
902 | float maxX; | ||
903 | float minY; | ||
904 | float maxY; | ||
905 | float minZ; | ||
906 | float maxZ; | ||
891 | 907 | ||
908 | GetAxisAlignedBoundingBoxRaw(out minX, out maxX, out minY, out maxY, out minZ, out maxZ); | ||
892 | Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); | 909 | Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); |
893 | 910 | ||
894 | offsetHeight = 0; | 911 | offsetHeight = 0; |