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 =
false;
103 m_hasNextVertex =
false;
Definition: b2ChainShape.h:33
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const
Definition: b2ChainShape.cpp:178
void CreateChain(const b2Vec2 *vertices, int32 count)
Definition: b2ChainShape.cpp:57
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const
Definition: b2ChainShape.cpp:151
Definition: b2BlockAllocator.h:36
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:158
Definition: b2Collision.h:155
int32 m_count
The vertex count.
Definition: b2ChainShape.h:90
#define b2_polygonRadius
Definition: b2Settings.h:120
An axis aligned bounding box.
Definition: b2Collision.h:162
void SetNextVertex(const b2Vec2 &nextVertex)
Definition: b2ChainShape.cpp:88
b2Shape * Clone(b2BlockAllocator *allocator) const
Implement b2Shape. Vertices are cloned using b2Alloc.
Definition: b2ChainShape.cpp:94
Definition: b2EdgeShape.h:28
int32 GetChildCount() const
Definition: b2ChainShape.cpp:106
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:144
A 2D column vector.
Definition: b2Math.h:56
void SetPrevVertex(const b2Vec2 &prevVertex)
Definition: b2ChainShape.cpp:82
void GetChildEdge(b2EdgeShape *edge, int32 index) const
Get a child edge.
Definition: b2ChainShape.cpp:112
void ComputeMass(b2MassData *massData, float32 density) const
Definition: b2ChainShape.cpp:196