Universe.Region.SceneObjectGroup.GetAxisAlignedBoundingBox C# (CSharp) Method

GetAxisAlignedBoundingBox() public method

public GetAxisAlignedBoundingBox ( float &offsetHeight ) : System.Vector3
offsetHeight float
return System.Vector3
        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);


            offsetHeight = 0.5f*(maxZ + minZ);
            offsetHeight -= m_rootPart.AbsolutePosition.Z;

            /*
                        offsetHeight = 0;
                        float lower = (minZ * -1);
                        if (lower > maxZ)
                        {
                            offsetHeight = lower - (boundingBox.Z / 2);

                        }
                        else if (maxZ > lower)
                        {
                            offsetHeight = maxZ - (boundingBox.Z / 2);
                            offsetHeight *= -1;
                        }
            */
            // MainConsole.Instance.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z);
            return boundingBox;
        }
SceneObjectGroup