Public Member Functions | Public Attributes | List of all members
b2DistanceProxy Struct Reference

#include <b2_distance.h>

Public Member Functions

 b2DistanceProxy ()
 
int32 GetSupport (const b2Vec2 &d) const
 Get the supporting vertex index in the given direction. More...
 
const b2Vec2GetSupportVertex (const b2Vec2 &d) const
 Get the supporting vertex in the given direction. More...
 
const b2Vec2GetVertex (int32 index) const
 Get a vertex by index. Used by b2Distance. More...
 
int32 GetVertexCount () const
 Get the vertex count. More...
 
void Set (const b2Shape *shape, int32 index)
 
void Set (const b2Vec2 *vertices, int32 count, float radius)
 

Public Attributes

b2Vec2 m_buffer [2]
 
int32 m_count
 
float m_radius
 
const b2Vec2m_vertices
 

Detailed Description

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

Definition at line 33 of file b2_distance.h.

Constructor & Destructor Documentation

◆ b2DistanceProxy()

b2DistanceProxy::b2DistanceProxy ( )
inline

Definition at line 35 of file b2_distance.h.

Member Function Documentation

◆ GetSupport()

int32 b2DistanceProxy::GetSupport ( const b2Vec2 d) const
inline

Get the supporting vertex index in the given direction.

Definition at line 137 of file b2_distance.h.

◆ GetSupportVertex()

const b2Vec2 & b2DistanceProxy::GetSupportVertex ( const b2Vec2 d) const
inline

Get the supporting vertex in the given direction.

Definition at line 154 of file b2_distance.h.

◆ GetVertex()

const b2Vec2 & b2DistanceProxy::GetVertex ( int32  index) const
inline

Get a vertex by index. Used by b2Distance.

Definition at line 131 of file b2_distance.h.

◆ GetVertexCount()

int32 b2DistanceProxy::GetVertexCount ( ) const
inline

Get the vertex count.

Definition at line 126 of file b2_distance.h.

◆ Set() [1/2]

void b2DistanceProxy::Set ( const b2Shape shape,
int32  index 
)

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

Definition at line 32 of file b2_distance.cpp.

◆ Set() [2/2]

void b2DistanceProxy::Set ( const b2Vec2 vertices,
int32  count,
float  radius 
)

Initialize the proxy using a vertex cloud and radius. The vertices must remain in scope while the proxy is in use.

Definition at line 89 of file b2_distance.cpp.

Member Data Documentation

◆ m_buffer

b2Vec2 b2DistanceProxy::m_buffer[2]

Definition at line 57 of file b2_distance.h.

◆ m_count

int32 b2DistanceProxy::m_count

Definition at line 59 of file b2_distance.h.

◆ m_radius

float b2DistanceProxy::m_radius

Definition at line 60 of file b2_distance.h.

◆ m_vertices

const b2Vec2* b2DistanceProxy::m_vertices

Definition at line 58 of file b2_distance.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22