20 #ifndef B2_CHAIN_SHAPE_H
21 #define B2_CHAIN_SHAPE_H
23 #include <Box2D/Collision/Shapes/b2Shape.h>
77 const b2Transform& transform, int32 childIndex)
const;
92 b2Vec2 m_prevVertex, m_nextVertex;
93 bool m_hasPrevVertex, m_hasNextVertex;
96 inline b2ChainShape::b2ChainShape()
102 m_hasPrevVertex = NULL;
103 m_hasNextVertex = NULL;
Definition: b2ChainShape.h:33
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const
Definition: b2ChainShape.cpp:175
void CreateChain(const b2Vec2 *vertices, int32 count)
Definition: b2ChainShape.cpp:57
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const
Definition: b2ChainShape.cpp:148
Definition: b2BlockAllocator.h:35
This holds the mass data computed for a shape.
Definition: b2Shape.h:28
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const
Implement b2Shape.
Definition: b2ChainShape.cpp:155
Definition: b2Collision.h:154
int32 m_count
The vertex count.
Definition: b2ChainShape.h:90
#define b2_polygonRadius
Definition: b2Settings.h:83
An axis aligned bounding box.
Definition: b2Collision.h:161
void SetNextVertex(const b2Vec2 &nextVertex)
Definition: b2ChainShape.cpp:85
b2Shape * Clone(b2BlockAllocator *allocator) const
Implement b2Shape. Vertices are cloned using b2Alloc.
Definition: b2ChainShape.cpp:91
Definition: b2EdgeShape.h:28
int32 GetChildCount() const
Definition: b2ChainShape.cpp:103
void CreateLoop(const b2Vec2 *vertices, int32 count)
Definition: b2ChainShape.cpp:33
~b2ChainShape()
The destructor frees the vertices using b2Free.
Definition: b2ChainShape.cpp:26
b2Vec2 * m_vertices
The vertices. Owned by this class.
Definition: b2ChainShape.h:87
void ComputeDistance(const b2Transform &xf, const b2Vec2 &p, float32 *distance, b2Vec2 *normal, int32 childIndex) const
Definition: b2ChainShape.cpp:141
A 2D column vector.
Definition: b2Math.h:64
void SetPrevVertex(const b2Vec2 &prevVertex)
Definition: b2ChainShape.cpp:79
void GetChildEdge(b2EdgeShape *edge, int32 index) const
Get a child edge.
Definition: b2ChainShape.cpp:109
void ComputeMass(b2MassData *massData, float32 density) const
Definition: b2ChainShape.cpp:193