aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-01 01:07:46 +0200
committerMelanie Thielker2010-06-01 01:07:46 +0200
commit70f779041334e7cf3642c334e9800362afde7895 (patch)
tree641ab8f62f6ec43ec21c969ea4ee0c7794aee394 /OpenSim/Region
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-70f779041334e7cf3642c334e9800362afde7895.zip
opensim-SC_OLD-70f779041334e7cf3642c334e9800362afde7895.tar.gz
opensim-SC_OLD-70f779041334e7cf3642c334e9800362afde7895.tar.bz2
opensim-SC_OLD-70f779041334e7cf3642c334e9800362afde7895.tar.xz
Split GetAxisAlignedBoundingBox into two methods to allow calculation of
combined bounding boxes and offsets
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 509ec01..4203ba9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -794,9 +794,15 @@ namespace OpenSim.Region.Framework.Scenes
794 /// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim 794 /// offsetHeight is the offset in the Z axis from the centre of the bounding box to the centre of the root prim
795 /// </summary> 795 /// </summary>
796 /// <returns></returns> 796 /// <returns></returns>
797 public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight) 797 public void GetAxisAlignedBoundingBoxRaw(out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ)
798 { 798 {
799 float maxX = -256f, maxY = -256f, maxZ = -256f, minX = 256f, minY = 256f, minZ = 256f; 799 maxX = -256f;
800 maxY = -256f;
801 maxZ = -256f;
802 minX = 256f;
803 minY = 256f;
804 minZ = 256f;
805
800 lockPartsForRead(true); 806 lockPartsForRead(true);
801 { 807 {
802 foreach (SceneObjectPart part in m_parts.Values) 808 foreach (SceneObjectPart part in m_parts.Values)
@@ -1034,7 +1040,18 @@ namespace OpenSim.Region.Framework.Scenes
1034 } 1040 }
1035 } 1041 }
1036 lockPartsForRead(false); 1042 lockPartsForRead(false);
1043 }
1044
1045 public Vector3 GetAxisAlignedBoundingBox(out float offsetHeight)
1046 {
1047 float minX;
1048 float maxX;
1049 float minY;
1050 float maxY;
1051 float minZ;
1052 float maxZ;
1037 1053
1054 GetAxisAlignedBoundingBoxRaw(out minX, out maxX, out minY, out maxY, out minZ, out maxZ);
1038 Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); 1055 Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ);
1039 1056
1040 offsetHeight = 0; 1057 offsetHeight = 0;