C# Class FarseerPhysics.Collision.Shapes.ChainShape

A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside collision. Therefore, you may use any winding order. Connectivity information is used to create smooth collisions. WARNING: The chain will not collide properly if there are self-intersections.
Inheritance: Shape
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
vertices Vertices

Méthodes publiques

Méthode Description
ChainShape ( ) : System.Diagnostics

Constructor for ChainShape. By default have 0 in density.

ChainShape ( Vertices vertices, bool createLoop = false ) : System.Diagnostics

Create a new chainshape from the vertices.

CompareTo ( ChainShape shape ) : bool

Compare the chain to another chain

clone ( ) : Shape
computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
getChildEdge ( int index ) : EdgeShape

Get a child edge.

rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
setVertices ( Vertices vertices, bool createLoop = false ) : void
testPoint ( Transform &transform, Vector2 &point ) : bool

Méthodes protégées

Méthode Description
computeProperties ( ) : void

Private Methods

Méthode Description
getChildEdge ( EdgeShape edge, int index ) : void

This method has been optimized to reduce garbage.

Method Details

ChainShape() public méthode

Constructor for ChainShape. By default have 0 in density.
public ChainShape ( ) : System.Diagnostics
Résultat System.Diagnostics

ChainShape() public méthode

Create a new chainshape from the vertices.
public ChainShape ( Vertices vertices, bool createLoop = false ) : System.Diagnostics
vertices Vertices The vertices to use. Must contain 2 or more vertices.
createLoop bool Set to true to create a closed loop. It connects the first vertice to the last, and automatically adjusts connectivity to create smooth collisions along the chain.
Résultat System.Diagnostics

CompareTo() public méthode

Compare the chain to another chain
public CompareTo ( ChainShape shape ) : bool
shape ChainShape The other chain
Résultat bool

clone() public méthode

public clone ( ) : Shape
Résultat Shape

computeAABB() public méthode

public computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
aabb AABB
transform Transform
childIndex int
Résultat void

computeProperties() protected méthode

protected computeProperties ( ) : void
Résultat void

computeSubmergedArea() public méthode

public computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
normal Microsoft.Xna.Framework.Vector2
offset float
xf Transform
sc Microsoft.Xna.Framework.Vector2
Résultat float

getChildEdge() public méthode

Get a child edge.
public getChildEdge ( int index ) : EdgeShape
index int The index.
Résultat EdgeShape

rayCast() public méthode

public rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput
input RayCastInput
transform Transform
childIndex int
Résultat bool

setVertices() public méthode

public setVertices ( Vertices vertices, bool createLoop = false ) : void
vertices Vertices
createLoop bool
Résultat void

testPoint() public méthode

public testPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform
point Microsoft.Xna.Framework.Vector2
Résultat bool

Property Details

vertices public_oe property

The vertices. These are not owned/freed by the chain Shape.
public Vertices vertices
Résultat Vertices