C# Класс BEPUphysics.CollisionShapes.ConvexShapes.TriangleShape

Triangle collision shape.
Наследование: ConvexShape
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ComputeCenter ( ) : System.Vector3

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

ComputeCenter ( float &volume ) : System.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.

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.

GetBoundingBox ( RigidTransform &shapeTransform, BEPUutilities.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 ( System.Vector3 &direction, System.Vector3 &extremePoint ) : void

Gets the extreme point of the shape in local space in a given direction.

GetLocalNormal ( ) : System.Vector3

Gets the normal of the triangle shape in its local space.

GetNormal ( RigidTransform transform ) : System.Vector3

Gets the normal of the triangle in world space.

RayTest ( BEPUutilities.Ray &ray, RigidTransform &transform, float maximumLength, RayHit &hit ) : bool

Gets the intersection between the triangle and the ray.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

TriangleShape ( ) : System

Constructs a triangle shape without initializing it. This is useful for systems that re-use a triangle shape repeatedly.

TriangleShape ( System.Vector3 vA, System.Vector3 vB, System.Vector3 vC ) : System

Constructs a triangle shape. The vertices will be recentered. If the center is needed, use the other constructor.

TriangleShape ( System.Vector3 vA, System.Vector3 vB, System.Vector3 vC, System.Vector3 &center ) : System

Constructs a triangle shape. The vertices will be recentered.

Описание методов

ComputeCenter() публичный Метод

Computes the center of the shape. This can be considered its center of mass.
public ComputeCenter ( ) : System.Vector3
Результат System.Vector3

ComputeCenter() публичный Метод

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 ) : System.Vector3
volume float Volume of the shape.
Результат System.Vector3

ComputeMaximumRadius() публичный Метод

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
Результат float

ComputeMinimumRadius() публичный Метод

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
Результат float

ComputeVolume() публичный Метод

Computes the volume of the shape.
public ComputeVolume ( ) : float
Результат float

ComputeVolumeDistribution() публичный Метод

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.
Результат BEPUutilities.Matrix3x3

GetBoundingBox() публичный Метод

Gets the bounding box of the shape given a transform.
public GetBoundingBox ( RigidTransform &shapeTransform, BEPUutilities.BoundingBox &boundingBox ) : void
shapeTransform BEPUutilities.RigidTransform Transform to use.
boundingBox BEPUutilities.BoundingBox Bounding box of the transformed shape.
Результат void

GetCollidableInstance() публичный Метод

Retrieves an instance of an EntityCollidable that uses this EntityShape. Mainly used by compound bodies.
public GetCollidableInstance ( ) : EntityCollidable
Результат BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable

GetLocalExtremePointWithoutMargin() публичный Метод

Gets the extreme point of the shape in local space in a given direction.
public GetLocalExtremePointWithoutMargin ( System.Vector3 &direction, System.Vector3 &extremePoint ) : void
direction System.Vector3 Direction to find the extreme point in.
extremePoint System.Vector3 Extreme point on the shape.
Результат void

GetLocalNormal() публичный Метод

Gets the normal of the triangle shape in its local space.
public GetLocalNormal ( ) : System.Vector3
Результат System.Vector3

GetNormal() публичный Метод

Gets the normal of the triangle in world space.
public GetNormal ( RigidTransform transform ) : System.Vector3
transform BEPUutilities.RigidTransform World transform.
Результат System.Vector3

RayTest() публичный Метод

Gets the intersection between the triangle and the ray.
public RayTest ( BEPUutilities.Ray &ray, RigidTransform &transform, float maximumLength, RayHit &hit ) : bool
ray BEPUutilities.Ray Ray to test against the triangle.
transform BEPUutilities.RigidTransform Transform to apply to the triangle shape for the test.
maximumLength float Maximum distance to travel in units of the direction vector's length.
hit BEPUutilities.RayHit Hit data of the ray cast, if any.
Результат bool

ToString() публичный Метод

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
Результат string

TriangleShape() публичный Метод

Constructs a triangle shape without initializing it. This is useful for systems that re-use a triangle shape repeatedly.
public TriangleShape ( ) : System
Результат System

TriangleShape() публичный Метод

Constructs a triangle shape. The vertices will be recentered. If the center is needed, use the other constructor.
public TriangleShape ( System.Vector3 vA, System.Vector3 vB, System.Vector3 vC ) : System
vA System.Vector3 First vertex in the triangle.
vB System.Vector3 Second vertex in the triangle.
vC System.Vector3 Third vertex in the triangle.
Результат System

TriangleShape() публичный Метод

Constructs a triangle shape. The vertices will be recentered.
public TriangleShape ( System.Vector3 vA, System.Vector3 vB, System.Vector3 vC, System.Vector3 &center ) : System
vA System.Vector3 First vertex in the triangle.
vB System.Vector3 Second vertex in the triangle.
vC System.Vector3 Third vertex in the triangle.
center System.Vector3 Computed center of the triangle.
Результат System