aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-01 01:07:46 +0200
committerMelanie2010-06-01 02:10:08 +0100
commit2fce7d9bcf001094e3d88516e7ea44e9a077da1b (patch)
treea2e1e12db24922c49076859cfd4745b468ad480d /OpenSim/Region/Framework
parentChange the handling of CreateSelected. Only send it on real creation, not (diff)
downloadopensim-SC_OLD-2fce7d9bcf001094e3d88516e7ea44e9a077da1b.zip
opensim-SC_OLD-2fce7d9bcf001094e3d88516e7ea44e9a077da1b.tar.gz
opensim-SC_OLD-2fce7d9bcf001094e3d88516e7ea44e9a077da1b.tar.bz2
opensim-SC_OLD-2fce7d9bcf001094e3d88516e7ea44e9a077da1b.tar.xz
Split GetAxisAlignedBoundingBox into two methods to allow calculation of
combined bounding boxes and offsets
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs23
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;