BEPUphysics.CollisionShapes.ConvexShapes.SphereShape.GetBoundingBox C# (CSharp) Method

GetBoundingBox() public method

Gets the bounding box of the shape given a transform.
public GetBoundingBox ( BEPUphysics.MathExtensions.RigidTransform &shapeTransform, Microsoft.Xna.Framework.BoundingBox &boundingBox ) : void
shapeTransform BEPUphysics.MathExtensions.RigidTransform Transform to use.
boundingBox Microsoft.Xna.Framework.BoundingBox Bounding box of the transformed shape.
return void
        public override void GetBoundingBox(ref RigidTransform shapeTransform, out BoundingBox boundingBox)
        {
#if !WINDOWS
            boundingBox = new BoundingBox();
#endif
            boundingBox.Min.X = shapeTransform.Position.X - collisionMargin;
            boundingBox.Min.Y = shapeTransform.Position.Y - collisionMargin;
            boundingBox.Min.Z = shapeTransform.Position.Z - collisionMargin;
            boundingBox.Max.X = shapeTransform.Position.X + collisionMargin;
            boundingBox.Max.Y = shapeTransform.Position.Y + collisionMargin;
            boundingBox.Max.Z = shapeTransform.Position.Z + collisionMargin;
        }