C# Класс Box2D.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. Since there may be many vertices, they are allocated using Alloc. Connectivity information is used to create smooth collisions. WARNING The chain will not collide properly if there are self-intersections.
Наследование: Shape
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
Count int
HasNextVertex bool
HasPrevVertex bool
Vertices Box2D.Common.Vec2[]

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

Метод Описание
ChainShape ( ) : System.Diagnostics
Clone ( ) : Shape
ComputeAABB ( AABB aabb, Transform xf, int childIndex ) : void
ComputeMass ( MassData massData, float density ) : void
CreateChain ( Vec2 vertices, int count ) : void

Create a chain with isolated end vertices.

CreateLoop ( Vec2 vertices, int count ) : void

Create a loop. This automatically adjusts connectivity.

GetChildEdge ( EdgeShape edge, int index ) : void

Get a child edge.

Raycast ( RayCastOutput output, RayCastInput input, Transform xf, int childIndex ) : bool
TestPoint ( Transform xf, Vec2 p ) : bool

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

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

public ChainShape ( ) : System.Diagnostics
Результат System.Diagnostics

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

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

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

public ComputeAABB ( AABB aabb, Transform xf, int childIndex ) : void
aabb AABB
xf Box2D.Common.Transform
childIndex int
Результат void

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

public ComputeMass ( MassData massData, float density ) : void
massData MassData
density float
Результат void

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

Create a chain with isolated end vertices.
public CreateChain ( Vec2 vertices, int count ) : void
vertices Box2D.Common.Vec2 an array of vertices, these are copied
count int the vertex count
Результат void

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

Create a loop. This automatically adjusts connectivity.
public CreateLoop ( Vec2 vertices, int count ) : void
vertices Box2D.Common.Vec2 an array of vertices, these are copied
count int the vertex count
Результат void

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

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

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

public Raycast ( RayCastOutput output, RayCastInput input, Transform xf, int childIndex ) : bool
output RayCastOutput
input RayCastInput
xf Box2D.Common.Transform
childIndex int
Результат bool

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

public TestPoint ( Transform xf, Vec2 p ) : bool
xf Box2D.Common.Transform
p Box2D.Common.Vec2
Результат bool

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

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

public int Count
Результат int

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

public bool HasNextVertex
Результат bool

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

public bool HasPrevVertex
Результат bool

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

public Vec2[],Box2D.Common Vertices
Результат Box2D.Common.Vec2[]