# b2DistanceProxy Struct Reference

`#include <b2Distance.h>`

List of all members.

## Public Member Functions
| b2DistanceProxy ()
void | Set (const b2Shape *shape)
int32 | GetSupport (const b2Vec2 &d) const
| Get the supporting vertex index in the given direction.
const b2Vec2 & | GetSupportVertex (const b2Vec2 &d) const
| Get the supporting vertex in the given direction.
int32 | GetVertexCount () const
| Get the vertex count.
const b2Vec2 & | GetVertex (int32 index) const
| Get a vertex by index. Used by b2Distance.
## Public Attributes
const b2Vec2 * | m_vertices
int32 | m_count
float32 | m_radius

## Detailed Description

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

## Constructor & Destructor Documentation

b2DistanceProxy::b2DistanceProxy | ( |  | ) | `[inline]`

## Member Function Documentation

int32 b2DistanceProxy::GetSupport | ( | const b2Vec2 & | d | ) | const`[inline]`

Get the supporting vertex index in the given direction.

const b2Vec2 & b2DistanceProxy::GetSupportVertex | ( | const b2Vec2 & | d | ) | const`[inline]`

Get the supporting vertex in the given direction.

const b2Vec2 & b2DistanceProxy::GetVertex | ( | int32 | index | ) | const`[inline]`

Get a vertex by index. Used by b2Distance.

int32 b2DistanceProxy::GetVertexCount | ( |  | ) | const`[inline]`

Get the vertex count.

void b2DistanceProxy::Set | ( | const b2Shape * | shape | ) |

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

## Member Data Documentation

int32 b2DistanceProxy::m_count

float32 b2DistanceProxy::m_radius

const b2Vec2* b2DistanceProxy::m_vertices

The documentation for this struct was generated from the following files:

- Box2D/Box2D/Collision/b2Distance.h
- Box2D/Box2D/Collision/b2Distance.cpp