BEPUphysics.CollisionShapes.CompoundShape.GetBoundingBox C# (CSharp) Метод

GetBoundingBox() публичный Метод

Computes a bounding box for the shape given the specified transform.
public GetBoundingBox ( RigidTransform &transform, BEPUutilities.BoundingBox &boundingBox ) : void
transform BEPUutilities.RigidTransform Transform to apply to the shape to compute the bounding box.
boundingBox BEPUutilities.BoundingBox Bounding box for the shape given the transform.
Результат void
        public override void GetBoundingBox(ref RigidTransform transform, out BoundingBox boundingBox)
        {
            RigidTransform combinedTransform;
            RigidTransform.Transform(ref shapes.Elements[0].LocalTransform, ref transform, out combinedTransform);
            shapes.Elements[0].Shape.GetBoundingBox(ref combinedTransform, out boundingBox);

            for (int i = 0; i < shapes.Count; i++)
            {
                RigidTransform.Transform(ref shapes.Elements[i].LocalTransform, ref transform, out combinedTransform);
                BoundingBox childBoundingBox;
                shapes.Elements[i].Shape.GetBoundingBox(ref combinedTransform, out childBoundingBox);
                BoundingBox.CreateMerged(ref boundingBox, ref childBoundingBox, out boundingBox);
            }
        }
    }