C# Class BEPUphysics.CollisionShapes.ConvexShapes.InertiaHelper

Helper class used to compute volume distribution information, which is in turn used to compute inertia tensor information.
Mostra file Open project: Indiefreaks/igf Class Usage Examples

Public Properties

Property Type Description
InertiaTensorScale float
NumberOfSamplesPerDimension int

Public Methods

Method Description
AveragePoints ( RawList pointContributions ) : Microsoft.Xna.Framework.Vector3

Averages together all the points in the point list.

ComputeCenter ( ConvexShape shape ) : Microsoft.Xna.Framework.Vector3

Computes the center of a convex shape.

ComputeCenter ( ConvexShape shape, float &volume ) : Microsoft.Xna.Framework.Vector3

Computes the center and volume of a convex shape.

ComputeVolumeDistribution ( ConvexShape shape, Microsoft.Xna.Framework.Vector3 &center, float &volume ) : Matrix3x3

Computes the volume and volume distribution of a shape based on a given center.

ComputeVolumeDistribution ( ConvexShape shape, float &volume ) : Matrix3x3

Computes the volume and volume distribution of a shape.

ComputeVolumeDistribution ( RawList pointContributions, Microsoft.Xna.Framework.Vector3 &center ) : Matrix3x3

Computes a volume distribution based on a bunch of point contributions.

GetPointContribution ( float pointWeight, Microsoft.Xna.Framework.Vector3 &center, Microsoft.Xna.Framework.Vector3 p, Matrix3x3 &contribution ) : void

Computes the volume contribution of a point.

GetPoints ( ConvexShape shape, float &volume, RawList outputPointContributions ) : void

Gets the point contributions within a convex shape.

Private Methods

Method Description
ScanObject ( float rayIncrement, float maxLength, Microsoft.Xna.Framework.Vector3 &increment1, Microsoft.Xna.Framework.Vector3 &increment2, Ray &ray, RayHit &startHit, RayHit &endHit, RawList pointContributions, float &volume ) : void

Method Details

AveragePoints() public static method

Averages together all the points in the point list.
public static AveragePoints ( RawList pointContributions ) : Microsoft.Xna.Framework.Vector3
pointContributions RawList Point list to average.
return Microsoft.Xna.Framework.Vector3

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

ComputeCenter() public static method

Computes the center and volume of a convex shape.
public static ComputeCenter ( ConvexShape shape, float &volume ) : Microsoft.Xna.Framework.Vector3
shape ConvexShape Shape to compute the center of.
volume float Volume of the shape.
return Microsoft.Xna.Framework.Vector3

ComputeVolumeDistribution() public static method

Computes the volume and volume distribution of a shape based on a given center.
public static ComputeVolumeDistribution ( ConvexShape shape, Microsoft.Xna.Framework.Vector3 &center, float &volume ) : Matrix3x3
shape ConvexShape Shape to compute the volume information of.
center Microsoft.Xna.Framework.Vector3 Location to use as the center of the shape when computing the volume distribution.
volume float Volume of the shape.
return BEPUutilities.Matrix3x3

ComputeVolumeDistribution() public static method

Computes the volume and volume distribution of a shape.
public static ComputeVolumeDistribution ( ConvexShape shape, float &volume ) : Matrix3x3
shape ConvexShape Shape to compute the volume information of.
volume float Volume of the shape.
return BEPUutilities.Matrix3x3

ComputeVolumeDistribution() public static method

Computes a volume distribution based on a bunch of point contributions.
public static ComputeVolumeDistribution ( RawList pointContributions, Microsoft.Xna.Framework.Vector3 &center ) : Matrix3x3
pointContributions RawList Point contributions to the volume distribution.
center Microsoft.Xna.Framework.Vector3 Location to use as the center for purposes of computing point contributions.
return BEPUutilities.Matrix3x3

GetPointContribution() public static method

Computes the volume contribution of a point.
public static GetPointContribution ( float pointWeight, Microsoft.Xna.Framework.Vector3 &center, Microsoft.Xna.Framework.Vector3 p, Matrix3x3 &contribution ) : void
pointWeight float Weight of the point.
center Microsoft.Xna.Framework.Vector3 Location to use as the center for the purposes of computing the contribution.
p Microsoft.Xna.Framework.Vector3 Point to compute the contribution of.
contribution BEPUutilities.Matrix3x3 Contribution of the point.
return void

GetPoints() public static method

Gets the point contributions within a convex shape.
public static GetPoints ( ConvexShape shape, float &volume, RawList outputPointContributions ) : void
shape ConvexShape Shape to compute the point contributions of.
volume float Volume of the shape.
outputPointContributions RawList Point contributions of the shape.
return void

Property Details

InertiaTensorScale public_oe static_oe property

Value to scale any created entities' inertia tensors by. Larger tensors (above 1) improve stiffness of constraints and contacts, while smaller values (towards 1) are closer to 'realistic' behavior. Defaults to 2.5.
public static float InertiaTensorScale
return float

NumberOfSamplesPerDimension public_oe static_oe property

Number of samples the system takes along a side of an object's AABB when voxelizing it.
public static int NumberOfSamplesPerDimension
return int