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

Sphere-expanded line segment. Another way of looking at it is a cylinder with half-spheres on each end.
Наследование: ConvexShape
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CapsuleShape ( float length, float radius ) : System

Constructs a new capsule shape.

ComputeCenter ( ) : Vector3

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

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.

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, BoundingBox &boundingBox ) : void
GetCollidableInstance ( ) : EntityCollidable

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

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

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

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

Gets the intersection between the convex shape and the ray.

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

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

Constructs a new capsule shape.
public CapsuleShape ( float length, float radius ) : System
length float Length of the capsule's inner line segment.
radius float Radius to expand the line segment width.
Результат System

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

Computes the center of the shape. This can be considered its center of mass.
public ComputeCenter ( ) : Vector3
Результат 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 ) : Vector3
volume float Volume of the shape.
Результат 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() публичный Метод

public GetBoundingBox ( RigidTransform &shapeTransform, BoundingBox &boundingBox ) : void
shapeTransform BEPUutilities.RigidTransform
boundingBox BoundingBox
Результат 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 ( Vector3 &direction, Vector3 &extremePoint ) : void
direction Vector3 Direction to find the extreme point in.
extremePoint Vector3 Extreme point on the shape.
Результат void

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

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