C# Класс FarseerPhysics.Collision.Shapes.LoopShape

A loop Shape is a free form sequence of line segments that form a circular list. The loop may cross upon itself, but this is not recommended for smooth collision. The loop has double sided collision, so you can use inside and outside collision. Therefore, you may use any winding order.
Наследование: Shape
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
Count int
Vertices Microsoft.Xna.Framework.Vector2[]

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

Метод Описание
Clone ( ) : Shape
ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void

Given a transform, compute the associated axis aligned bounding box for a child shape.

ComputeMass ( MassData &massData, float density ) : void

Chains have zero mass.

GetChildEdge ( EdgeShape &edge, int index ) : void

Get a child edge.

LoopShape ( ) : System.Diagnostics
RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool

Cast a ray against a child shape.

TestPoint ( Transform &transform, Vector2 &point ) : bool

Test a point for containment in this shape. This only works for convex shapes.

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

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

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

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

Given a transform, compute the associated axis aligned bounding box for a child shape.
public ComputeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
aabb AABB The aabb results.
transform Transform The world transform of the shape.
childIndex int The child shape index.
Результат void

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

Chains have zero mass.
public ComputeMass ( MassData &massData, float density ) : void
massData MassData Returns the mass data for this shape.
density float The density in kilograms per meter squared.
Результат void

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

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

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

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

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

Cast a ray against a child shape.
public RayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput The ray-cast results.
input RayCastInput The ray-cast input parameters.
transform Transform The transform to be applied to the shape.
childIndex int The child shape index.
Результат bool

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

Test a point for containment in this shape. This only works for convex shapes.
public TestPoint ( Transform &transform, Vector2 &point ) : bool
transform Transform The shape world transform.
point Microsoft.Xna.Framework.Vector2 a point in world coordinates.
Результат bool

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

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

The vertex count.
public int Count
Результат int

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

The vertices. These are not owned/freed by the loop Shape.
public Vector2[],Microsoft.Xna.Framework Vertices
Результат Microsoft.Xna.Framework.Vector2[]