Example #1
0
        void AddBoundingBox(Object3D obj, ref Rect bounds)
        {
            if (obj == null)
            {
                return;
            }

            Primitive3D primitive = obj as Primitive3D;

            if (primitive != null)
            {
                bounds.Union(primitive.GetBoundingBox());
            }

            foreach (var child in obj.Children)
            {
                AddBoundingBox(child as Object3D, ref bounds);
            }
        }