C# Класс Jitter.Collision.Shapes.CompoundShape

A Shape representing a compoundShape consisting of several 'sub' shapes.
Наследование: Jitter.Collision.Shapes.Multishape
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CalculateMassInertia ( ) : void
CompoundShape ( List shapes ) : System

Created a new instance of the CompountShape class.

CompoundShape ( TransformedShape shapes ) : System
GetBoundingBox ( Jitter.LinearMath.JMatrix &orientation, Jitter.LinearMath.JBBox &box ) : void

Gets the axis aligned bounding box of the orientated shape. (Inlcuding all 'sub' shapes)

MakeHull ( List &triangleList, int generationThreshold ) : void
Prepare ( Jitter.LinearMath.JBBox &box ) : int

Passes a axis aligned bounding box to the shape where collision could occour.

Prepare ( Jitter.LinearMath.JVector &rayOrigin, Jitter.LinearMath.JVector &rayEnd ) : int

SetCurrentShape ( int index ) : void

Sets the current shape. First CompoundShape.Prepare has to be called. After SetCurrentShape the shape immitates another shape.

SupportMapping ( Jitter.LinearMath.JVector &direction, Jitter.LinearMath.JVector &result ) : void

SupportMapping. Finds the point in the shape furthest away from the given direction. Imagine a plane with a normal in the search direction. Now move the plane along the normal until the plane does not intersect the shape. The last intersection point is the result.

UpdateShape ( ) : void

Защищенные методы

Метод Описание
CreateWorkingClone ( ) : Jitter.Collision.Shapes.Multishape
UpdateInternalBoundingBox ( ) : void

Приватные методы

Метод Описание
CompoundShape ( ) : System
DoShifting ( ) : void

Translate all subshapes in the way that the center of mass is in (0,0,0)

TestValidity ( ) : bool

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

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

public CalculateMassInertia ( ) : void
Результат void

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

Created a new instance of the CompountShape class.
public CompoundShape ( List shapes ) : System
shapes List The 'sub' shapes which should be added to this /// class.
Результат System

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

public CompoundShape ( TransformedShape shapes ) : System
shapes TransformedShape
Результат System

CreateWorkingClone() защищенный Метод

protected CreateWorkingClone ( ) : Jitter.Collision.Shapes.Multishape
Результат Jitter.Collision.Shapes.Multishape

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

Gets the axis aligned bounding box of the orientated shape. (Inlcuding all 'sub' shapes)
public GetBoundingBox ( Jitter.LinearMath.JMatrix &orientation, Jitter.LinearMath.JBBox &box ) : void
orientation Jitter.LinearMath.JMatrix The orientation of the shape.
box Jitter.LinearMath.JBBox The axis aligned bounding box of the shape.
Результат void

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

public MakeHull ( List &triangleList, int generationThreshold ) : void
triangleList List
generationThreshold int
Результат void

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

Passes a axis aligned bounding box to the shape where collision could occour.
public Prepare ( Jitter.LinearMath.JBBox &box ) : int
box Jitter.LinearMath.JBBox The bounding box where collision could occur.
Результат int

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

public Prepare ( Jitter.LinearMath.JVector &rayOrigin, Jitter.LinearMath.JVector &rayEnd ) : int
rayOrigin Jitter.LinearMath.JVector
rayEnd Jitter.LinearMath.JVector
Результат int

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

Sets the current shape. First CompoundShape.Prepare has to be called. After SetCurrentShape the shape immitates another shape.
public SetCurrentShape ( int index ) : void
index int
Результат void

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

SupportMapping. Finds the point in the shape furthest away from the given direction. Imagine a plane with a normal in the search direction. Now move the plane along the normal until the plane does not intersect the shape. The last intersection point is the result.
public SupportMapping ( Jitter.LinearMath.JVector &direction, Jitter.LinearMath.JVector &result ) : void
direction Jitter.LinearMath.JVector The direction.
result Jitter.LinearMath.JVector The result.
Результат void

UpdateInternalBoundingBox() защищенный Метод

protected UpdateInternalBoundingBox ( ) : void
Результат void

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

public UpdateShape ( ) : void
Результат void