ackb2d 0.9
3D Gamestudio Box 2d Wraper

b2DistanceProxy.h File Reference

Go to the source code of this file.

Functions

b2DistanceProxyb2DistanceProxy_Create ()
 Create a DistanceProxy instance.
void b2DistanceProxy_Destroy (b2DistanceProxy *proxy)
 Destroy the DistanceProxy provided as parameter.
void b2DistanceProxy_Set (b2DistanceProxy *proxy, const b2Shape *shape)
 Initialize the proxy using the given shape.
var b2DistanceProxy_GetSupport (b2DistanceProxy *proxy, const VECTOR *d)
 Get the supporting vertex index in the given direction.
void b2DistanceProxy_GetSupportVertex (b2DistanceProxy *proxy, const VECTOR *d, VECTOR *outVertex)
 Get the supporting vertex in the given direction.
var b2DistanceProxy_GetVertexCount (b2DistanceProxy *proxy)
 Get the vertex count.
void b2DistanceProxy_GetVertex (b2DistanceProxy *proxy, var index, VECTOR *outVertex)

Function Documentation

b2DistanceProxy* b2DistanceProxy_Create ( )

Create a DistanceProxy instance.

A distance proxy is used by the GJK algorithm. It encapsulates any shape

void b2DistanceProxy_Destroy ( b2DistanceProxy proxy)

Destroy the DistanceProxy provided as parameter.

Parameters:
proxyThe DistanceProxy to be destroyed
var b2DistanceProxy_GetSupport ( b2DistanceProxy proxy,
const VECTOR *  d 
)

Get the supporting vertex index in the given direction.

Parameters:
proxyThe b2DistanceProxy
dThe direction vector
Returns:
The supporting vector index
void b2DistanceProxy_GetSupportVertex ( b2DistanceProxy proxy,
const VECTOR *  d,
VECTOR *  outVertex 
)

Get the supporting vertex in the given direction.

Parameters:
proxyThe b2DistanceProxy
dThe direction vector
outVertexThe resulting vector
void b2DistanceProxy_GetVertex ( b2DistanceProxy proxy,
var  index,
VECTOR *  outVertex 
)

Get a vertex by index. Used by b2Distance.

Parameters:
proxyThe b2DistanceProxy
indexThe vertex index
outVertexThe resulting vectex position
var b2DistanceProxy_GetVertexCount ( b2DistanceProxy proxy)

Get the vertex count.

Parameters:
proxyThe b2DistanceProxy
Returns:
The vertex count
void b2DistanceProxy_Set ( b2DistanceProxy proxy,
const b2Shape shape 
)

Initialize the proxy using the given shape.

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

Parameters:
proxyThe b2DistanceProxy
shapeThe shape to be used (must remain in scope)
 All Data Structures Files Functions Variables Typedefs Defines