C# Класс 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.
Наследование: Shape
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
vertices Vertices

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

Метод Описание
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

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

Метод Описание
computeProperties ( ) : void

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

Метод Описание
getChildEdge ( EdgeShape edge, int index ) : void

This method has been optimized to reduce garbage.

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

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

Constructor for ChainShape. By default have 0 in density.
public ChainShape ( ) : System.Diagnostics
Результат System.Diagnostics

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

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

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

Compare the chain to another chain
public CompareTo ( ChainShape shape ) : bool
shape ChainShape The other chain
Результат bool

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

public clone ( ) : Shape
Результат Shape

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

public computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
aabb AABB
transform Transform
childIndex int
Результат void

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

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

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

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

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

Get a child edge.
public getChildEdge ( int index ) : EdgeShape
index int The index.
Результат EdgeShape

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

public rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput
input RayCastInput
transform Transform
childIndex int
Результат bool

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

public setVertices ( Vertices vertices, bool createLoop = false ) : void
vertices Vertices
createLoop bool
Результат void

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

public testPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform
point Microsoft.Xna.Framework.Vector2
Результат bool

Описание свойств

vertices публичное свойство

The vertices. These are not owned/freed by the chain Shape.
public Vertices vertices
Результат Vertices