43 void Set(
const b2Vec2* vertices, int32 count,
float radius);
46 int32 GetSupport(
const b2Vec2& d)
const;
52 int32 GetVertexCount()
const;
55 const b2Vec2& GetVertex(int32 index)
const;
133 b2Assert(0 <= index && index < m_count);
134 return m_vertices[index];
140 float bestValue = b2Dot(m_vertices[0], d);
141 for (int32 i = 1; i < m_count; ++i)
143 float value = b2Dot(m_vertices[i], d);
144 if (value > bestValue)
157 float bestValue = b2Dot(m_vertices[0], d);
158 for (int32 i = 1; i < m_count; ++i)
160 float value = b2Dot(m_vertices[i], d);
161 if (value > bestValue)
168 return m_vertices[bestIndex];
Definition: b2_shape.h:49
Output for b2Distance.
Definition: b2_distance.h:87
b2Vec2 pointA
closest point on shapeA
Definition: b2_distance.h:88
b2Vec2 pointB
closest point on shapeB
Definition: b2_distance.h:89
int32 iterations
number of GJK iterations used
Definition: b2_distance.h:91
Definition: b2_distance.h:34
const b2Vec2 & GetSupportVertex(const b2Vec2 &d) const
Get the supporting vertex in the given direction.
Definition: b2_distance.h:154
int32 GetSupport(const b2Vec2 &d) const
Get the supporting vertex index in the given direction.
Definition: b2_distance.h:137
void Set(const b2Vec2 *vertices, int32 count, float radius)
void Set(const b2Shape *shape, int32 index)
const b2Vec2 & GetVertex(int32 index) const
Get a vertex by index. Used by b2Distance.
Definition: b2_distance.h:131
int32 GetVertexCount() const
Get the vertex count.
Definition: b2_distance.h:126
Output results for b2ShapeCast.
Definition: b2_distance.h:113
Definition: b2_distance.h:66
float metric
length or area
Definition: b2_distance.h:67
A 2D column vector.
Definition: b2_math.h:42