C# Class BEPUphysics.CollisionShapes.ConvexShapes.ConvexHullShape

Convex wrapping around a point set.
Inheritance: ConvexShape
Datei anzeigen Open project: Indiefreaks/igf Class Usage Examples

Public Methods

Method Description
ComputeCenter ( ) : Vector3

Computes the center of the shape. This can be considered its center of mass.

ComputeCenter ( IList vertices ) : Vector3

Computes the center of a convex hull defined by the point set.

ComputeCenter ( IList vertices, IList outputLocalSurfaceVertices ) : Vector3

Computes the center and surface triangles of a convex hull defined by a point set.

ComputeCenter ( IList vertices, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3

Computes the center and surface triangles of a convex hull defined by a point set.

ComputeCenter ( IList vertices, float &volume ) : Vector3

Computes the center and volume of a convex hull defined by a pointset.

ComputeCenter ( IList vertices, float &volume, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3

Computes the center, volume, and surface triangles of a convex hull defined by a point set.

ComputeCenter ( float &volume ) : Vector3

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.

ComputeCenter ( float &volume, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3

Computes the center, volume, and surface triangles of the convex hull shape.

ComputeMaximumRadius ( ) : float

Computes the maximum radius of the shape. This is often larger than the actual maximum radius; it is simply an approximation that avoids underestimating.

ComputeMinimumRadius ( ) : float

Computes the minimum radius of the shape. This is often smaller than the actual minimum radius; it is simply an approximation that avoids overestimating.

ComputeVolume ( ) : float

Computes the volume 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.

ComputeVolumeDistribution ( float volume, IList localSurfaceTriangles ) : Matrix3x3

Computes the volume distribution of the convex hull, its volume, and its surface triangles.

ConvexHullShape ( IList vertices ) : System

Constructs a new convex hull shape. The point set will be recentered on the local origin. If that offset is needed, use the other constructor which outputs the computed center.

ConvexHullShape ( IList vertices, Vector3 &center ) : System

Constructs a new convex hull shape. The point set will be recentered on the local origin.

ConvexHullShape ( IList vertices, Vector3 &center, IList outputHullTriangleIndices, IList outputUniqueSurfaceVertices ) : System

Constructs a new convex hull shape. The point set will be recentered on the local origin.

GetBoundingBox ( RigidTransform &shapeTransform, BoundingBox &boundingBox ) : void

Gets the bounding box of the shape given a transform.

GetCollidableInstance ( ) : EntityCollidable

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

GetLocalExtremePointWithoutMargin ( Vector3 &direction, Vector3 &extremePoint ) : void

Method Details

ComputeCenter() public method

Computes the center of the shape. This can be considered its center of mass.
public ComputeCenter ( ) : Vector3
return Vector3

ComputeCenter() public static method

Computes the center of a convex hull defined by the point set.
public static ComputeCenter ( IList vertices ) : Vector3
vertices IList Point set defining the convex hull.
return Vector3

ComputeCenter() public static method

Computes the center and surface triangles of a convex hull defined by a point set.
public static ComputeCenter ( IList vertices, IList outputLocalSurfaceVertices ) : Vector3
vertices IList Point set defining the convex hull.
outputLocalSurfaceVertices IList Local positions of vertices on the convex hull.
return Vector3

ComputeCenter() public static method

Computes the center and surface triangles of a convex hull defined by a point set.
public static ComputeCenter ( IList vertices, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3
vertices IList Point set defining the convex hull.
outputSurfaceTriangles IList Indices of surface triangles of the convex hull.
outputLocalSurfaceVertices IList Local positions of vertices on the convex hull.
return Vector3

ComputeCenter() public static method

Computes the center and volume of a convex hull defined by a pointset.
public static ComputeCenter ( IList vertices, float &volume ) : Vector3
vertices IList Point set defining the convex hull.
volume float Volume of the convex hull.
return Vector3

ComputeCenter() public static method

Computes the center, volume, and surface triangles of a convex hull defined by a point set.
public static ComputeCenter ( IList vertices, float &volume, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3
vertices IList Point set defining the convex hull.
volume float Volume of the convex hull.
outputSurfaceTriangles IList Indices of surface triangles of the convex hull.
outputLocalSurfaceVertices IList Local positions of vertices on the convex hull.
return Vector3

ComputeCenter() public method

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.
public ComputeCenter ( float &volume ) : Vector3
volume float Volume of the shape.
return Vector3

ComputeCenter() public method

Computes the center, volume, and surface triangles of the convex hull shape.
public ComputeCenter ( float &volume, IList outputSurfaceTriangles, IList outputLocalSurfaceVertices ) : Vector3
volume float Volume of the hull.
outputSurfaceTriangles IList Surface triangles of the hull.
outputLocalSurfaceVertices IList Surface vertices recentered on the center of volume.
return Vector3

ComputeMaximumRadius() public method

Computes the maximum radius of the shape. This is often larger than the actual maximum radius; it is simply an approximation that avoids underestimating.
public ComputeMaximumRadius ( ) : float
return float

ComputeMinimumRadius() public method

Computes the minimum radius of the shape. This is often smaller than the actual minimum radius; it is simply an approximation that avoids overestimating.
public ComputeMinimumRadius ( ) : float
return float

ComputeVolume() public method

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

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

ComputeVolumeDistribution() public method

Computes the volume distribution of the convex hull, its volume, and its surface triangles.
public ComputeVolumeDistribution ( float volume, IList localSurfaceTriangles ) : Matrix3x3
volume float Volume of the convex hull.
localSurfaceTriangles IList Surface triangles of the convex hull.
return BEPUutilities.Matrix3x3

ConvexHullShape() public method

Constructs a new convex hull shape. The point set will be recentered on the local origin. If that offset is needed, use the other constructor which outputs the computed center.
Thrown when the point set is empty.
public ConvexHullShape ( IList vertices ) : System
vertices IList Point set to use to construct the convex hull.
return System

ConvexHullShape() public method

Constructs a new convex hull shape. The point set will be recentered on the local origin.
Thrown when the point set is empty.
public ConvexHullShape ( IList vertices, Vector3 &center ) : System
vertices IList Point set to use to construct the convex hull.
center Vector3 Computed center of the convex hull shape prior to recentering.
return System

ConvexHullShape() public method

Constructs a new convex hull shape. The point set will be recentered on the local origin.
Thrown when the point set is empty.
public ConvexHullShape ( IList vertices, Vector3 &center, IList outputHullTriangleIndices, IList outputUniqueSurfaceVertices ) : System
vertices IList Point set to use to construct the convex hull.
center Vector3 Computed center of the convex hull shape prior to recentering.
outputHullTriangleIndices IList Triangle indices computed on the surface of the point set.
outputUniqueSurfaceVertices IList Unique vertices on the surface of the convex hull.
return System

GetBoundingBox() public method

Gets the bounding box of the shape given a transform.
public GetBoundingBox ( RigidTransform &shapeTransform, BoundingBox &boundingBox ) : void
shapeTransform BEPUutilities.RigidTransform Transform to use.
boundingBox BoundingBox Bounding box of the transformed shape.
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

GetLocalExtremePointWithoutMargin() public method

public GetLocalExtremePointWithoutMargin ( Vector3 &direction, Vector3 &extremePoint ) : void
direction Vector3
extremePoint Vector3
return void