|
Box2D
2.4.1
A 2D physics engine for games
|
39 void Set(
const b2Shape* shape, int32 index);
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];
A 2D column vector.
Definition: b2_math.h:41
int32 GetVertexCount() const
Get the vertex count.
Definition: b2_distance.h:126
Output for b2Distance.
Definition: b2_distance.h:86
b2Vec2 pointA
closest point on shapeA
Definition: b2_distance.h:88
float metric
length or area
Definition: b2_distance.h:67
int32 GetSupport(const b2Vec2 &d) const
Get the supporting vertex index in the given direction.
Definition: b2_distance.h:137
const b2Vec2 & GetVertex(int32 index) const
Get a vertex by index. Used by b2Distance.
Definition: b2_distance.h:131
b2Vec2 pointB
closest point on shapeB
Definition: b2_distance.h:89
Definition: b2_distance.h:65
const b2Vec2 & GetSupportVertex(const b2Vec2 &d) const
Get the supporting vertex in the given direction.
Definition: b2_distance.h:154
Definition: b2_shape.h:48
Definition: b2_distance.h:33
int32 iterations
number of GJK iterations used
Definition: b2_distance.h:91
Output results for b2ShapeCast.
Definition: b2_distance.h:112