 |
Box2D
2.4.1
A 2D physics engine for games
|
23 #ifndef B2_CHAIN_SHAPE_H
24 #define B2_CHAIN_SHAPE_H
75 const b2Transform& transform, int32 childIndex)
const override;
90 b2Vec2 m_prevVertex, m_nextVertex;
93 inline b2ChainShape::b2ChainShape()
A 2D column vector.
Definition: b2_math.h:42
b2Shape * Clone(b2BlockAllocator *allocator) const override
Implement b2Shape. Vertices are cloned using b2Alloc.
void Clear()
Clear all data.
Definition: b2_edge_shape.h:33
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const override
float m_radius
Definition: b2_shape.h:102
Definition: b2_chain_shape.h:37
int32 m_count
The vertex count.
Definition: b2_chain_shape.h:88
An axis aligned bounding box.
Definition: b2_collision.h:169
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const override
Definition: b2_block_allocator.h:38
#define b2_polygonRadius
Definition: b2_common.h:74
b2Vec2 * m_vertices
The vertices. Owned by this class.
Definition: b2_chain_shape.h:85
void CreateLoop(const b2Vec2 *vertices, int32 count)
void GetChildEdge(b2EdgeShape *edge, int32 index) const
Get a child edge.
Definition: b2_shape.h:49
This holds the mass data computed for a shape.
Definition: b2_shape.h:34
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
Implement b2Shape.
void CreateChain(const b2Vec2 *vertices, int32 count, const b2Vec2 &prevVertex, const b2Vec2 &nextVertex)
~b2ChainShape()
The destructor frees the vertices using b2Free.
int32 GetChildCount() const override
Definition: b2_collision.h:162
void ComputeMass(b2MassData *massData, float density) const override