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
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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