ComputeCenter() public static method

Computes the center of a convex shape.
public static ComputeCenter ( ConvexShape shape ) : Microsoft.Xna.Framework.Vector3
shape ConvexShape Shape to compute the center of.
return Microsoft.Xna.Framework.Vector3
Example #1
0
 /// <summary>
 /// Computes the center of the shape.  This can be considered its
 /// center of mass.  This calculation is often associated with the
 /// volume calculation, which is given by this method as well.
 /// </summary>
 /// <param name="volume">Volume of the shape.</param>
 /// <returns>Center of the shape.</returns>
 public override Vector3 ComputeCenter(out float volume)
 {
     return(InertiaHelper.ComputeCenter(this, out volume));
 }
Example #2
0
 /// <summary>
 /// Computes the center of the shape.  This can be considered its
 /// center of mass.
 /// </summary>
 /// <returns>Center of the shape.</returns>
 public override Vector3 ComputeCenter()
 {
     return(InertiaHelper.ComputeCenter(this));
 }