Example #1
0
        public AxisAlignedBox3f GetBoundingBox(bool bIncludeBoundsObjects)
        {
            AxisAlignedBox3f b = UnityUtil.InvalidBounds;

            foreach (SceneObject so in SceneObjects)
            {
                b.Contain(so.GetTransformedBoundingBox());
            }
            if (b == UnityUtil.InvalidBounds || bIncludeBoundsObjects)
            {
                UnityUtil.Combine(b, UnityUtil.GetBoundingBox(BoundsObjects));
            }
            if (b == UnityUtil.InvalidBounds)
            {
                b.Contain(Vector3f.Zero);
                b.Expand(1.0f);
            }
            return(b);
        }