C# Class BEPUphysics.CollisionShapes.CompoundShape

Shape composed of multiple other shapes.
Inheritance: EntityShape
ファイルを表示 Open project: Indiefreaks/igf Class Usage Examples

Public Methods

Method Description
CompoundShape ( IList shapes ) : System

Constructs a compound shape.

CompoundShape ( IList shapes, System.Vector3 &center ) : System

Constructs a compound shape.

ComputeCenter ( ) : System.Vector3

Computes the center of the shape. This can be considered its center of mass, based on the weightings of entries in the shape. For properly calibrated compound shapes, this will return a zero vector, since the shape recenters itself on construction.

ComputeCenter ( IList childData ) : System.Vector3

Computes the center of a compound using its child data. Children are weighted using their volumes for contribution to the center of 'mass.'

ComputeCenter ( IList childData ) : System.Vector3

Computes the center of a compound using its child data. Children are weighted using their volumes for contribution to the center of 'mass.'

ComputeCenter ( float &volume ) : System.Vector3

Computes the center of the shape and its volume.

ComputeChildContributions ( ) : BEPUphysics.CollisionShapes.ShapeDistributionInformation[]

Computes and returns the volume, volume distribution, and center contributions from each child shape in the compound shape.

ComputeDistributionInformation ( ShapeDistributionInformation &shapeInfo ) : void

Computes a variety of shape information all at once.

ComputeVolume ( ) : float

Computes the volume of the shape.

ComputeVolumeDistribution ( ) : Matrix3x3

Computes the volume distribution of the shape.

ComputeVolumeDistribution ( IList entries, System.Vector3 &center ) : Matrix3x3

Computes the volume distribution and center of the shape.

ComputeVolumeDistribution ( float &volume ) : Matrix3x3

Computes the volume distribution of the shape as well as its volume. The volume distribution can be used to compute inertia tensors when paired with mass and other tuning factors.

GetBoundingBox ( RigidTransform &transform, BEPUutilities.BoundingBox &boundingBox ) : void

Computes a bounding box for the shape given the specified transform.

GetCollidableInstance ( ) : EntityCollidable

Retrieves an instance of an EntityCollidable that uses this EntityShape. Mainly used by compound bodies.

GetContribution ( EntityShape shape, RigidTransform &transform, System.Vector3 &center, float weight, Matrix3x3 &contribution ) : void

Gets the volume distribution contributed by a single shape.

TransformContribution ( RigidTransform &transform, System.Vector3 &center, Matrix3x3 &baseContribution, float weight, Matrix3x3 &contribution ) : void

Modifies a contribution using a transform, position, and weight.

Method Details

CompoundShape() public method

Constructs a compound shape.
public CompoundShape ( IList shapes ) : System
shapes IList Shape entries used to create the compound.
return System

CompoundShape() public method

Constructs a compound shape.
public CompoundShape ( IList shapes, System.Vector3 &center ) : System
shapes IList Shape entries used to create the compound.
center System.Vector3 Computed center of the compound shape, using the entry weights.
return System

ComputeCenter() public method

Computes the center of the shape. This can be considered its center of mass, based on the weightings of entries in the shape. For properly calibrated compound shapes, this will return a zero vector, since the shape recenters itself on construction.
public ComputeCenter ( ) : System.Vector3
return System.Vector3

ComputeCenter() public static method

Computes the center of a compound using its child data. Children are weighted using their volumes for contribution to the center of 'mass.'
public static ComputeCenter ( IList childData ) : System.Vector3
childData IList Child data to use to compute the center.
return System.Vector3

ComputeCenter() public static method

Computes the center of a compound using its child data. Children are weighted using their volumes for contribution to the center of 'mass.'
public static ComputeCenter ( IList childData ) : System.Vector3
childData IList Child data to use to compute the center.
return System.Vector3

ComputeCenter() public method

Computes the center of the shape and its volume.
public ComputeCenter ( float &volume ) : System.Vector3
volume float Volume of the compound.
return System.Vector3

ComputeChildContributions() public method

Computes and returns the volume, volume distribution, and center contributions from each child shape in the compound shape.
public ComputeChildContributions ( ) : BEPUphysics.CollisionShapes.ShapeDistributionInformation[]
return BEPUphysics.CollisionShapes.ShapeDistributionInformation[]

ComputeDistributionInformation() public method

Computes a variety of shape information all at once.
public ComputeDistributionInformation ( ShapeDistributionInformation &shapeInfo ) : void
shapeInfo ShapeDistributionInformation Properties of the shape.
return void

ComputeVolume() public method

Computes the volume of the shape.
public ComputeVolume ( ) : float
return float

ComputeVolumeDistribution() public method

Computes the volume distribution of the shape.
public ComputeVolumeDistribution ( ) : Matrix3x3
return BEPUutilities.Matrix3x3

ComputeVolumeDistribution() public static method

Computes the volume distribution and center of the shape.
public static ComputeVolumeDistribution ( IList entries, System.Vector3 &center ) : Matrix3x3
entries IList Mass-weighted entries of the compound.
center System.Vector3 Center of the compound.
return BEPUutilities.Matrix3x3

ComputeVolumeDistribution() public method

Computes the volume distribution of the shape as well as its volume. The volume distribution can be used to compute inertia tensors when paired with mass and other tuning factors.
public ComputeVolumeDistribution ( float &volume ) : Matrix3x3
volume float Volume of the shape.
return BEPUutilities.Matrix3x3

GetBoundingBox() public method

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.
return void

GetCollidableInstance() public method

Retrieves an instance of an EntityCollidable that uses this EntityShape. Mainly used by compound bodies.
public GetCollidableInstance ( ) : EntityCollidable
return BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable

GetContribution() public static method

Gets the volume distribution contributed by a single shape.
public static GetContribution ( EntityShape shape, RigidTransform &transform, System.Vector3 &center, float weight, Matrix3x3 &contribution ) : void
shape EntityShape Shape to use to compute a contribution.
transform BEPUutilities.RigidTransform Transform of the shape.
center System.Vector3 Center to use when computing the distribution.
weight float Weighting to apply to the contribution.
contribution BEPUutilities.Matrix3x3 Volume distribution of the contribution.
return void

TransformContribution() public static method

Modifies a contribution using a transform, position, and weight.
public static TransformContribution ( RigidTransform &transform, System.Vector3 &center, Matrix3x3 &baseContribution, float weight, Matrix3x3 &contribution ) : void
transform BEPUutilities.RigidTransform Transform to use to modify the contribution.
center System.Vector3 Center to use to modify the contribution.
baseContribution BEPUutilities.Matrix3x3 Original unmodified contribution.
weight float Weight of the contribution.
contribution BEPUutilities.Matrix3x3 Transformed contribution.
return void