C# Класс Box2D.Collision.Distance.DistanceProxy

A distance proxy is used by the GJK algorithm. It encapsulates any shape. TODO: see if we can just do assignments with m_vertices, instead of copying stuff over
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
Buffer Box2D.Common.Vec2[]
Radius float
Vertices Box2D.Common.Vec2[]

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

Метод Описание
DistanceProxy ( ) : System
GetSupport ( Vec2 d ) : int

Get the supporting vertex index in the given direction.

GetSupportVertex ( Vec2 d ) : Vec2

Get the supporting vertex in the given direction.

GetVertex ( int index ) : Vec2

Get a vertex by index. Used by Distance.

Set ( Shape shape, int index ) : void

Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.

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

DistanceProxy() публичный метод

public DistanceProxy ( ) : System
Результат System

GetSupport() публичный метод

Get the supporting vertex index in the given direction.
public GetSupport ( Vec2 d ) : int
d Box2D.Common.Vec2
Результат int

GetSupportVertex() публичный метод

Get the supporting vertex in the given direction.
public GetSupportVertex ( Vec2 d ) : Vec2
d Box2D.Common.Vec2
Результат Box2D.Common.Vec2

GetVertex() публичный метод

Get a vertex by index. Used by Distance.
public GetVertex ( int index ) : Vec2
index int
Результат Box2D.Common.Vec2

Set() публичный метод

Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.
public Set ( Shape shape, int index ) : void
shape Box2D.Collision.Shapes.Shape
index int
Результат void

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

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

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

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

public float Radius
Результат float

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

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