19 #ifndef B2_CHAIN_SHAPE_H
20 #define B2_CHAIN_SHAPE_H
22 #include <Box2D/Collision/Shapes/b2Shape.h>
73 const b2Transform& transform, int32 childIndex)
const;
88 b2Vec2 m_prevVertex, m_nextVertex;
89 bool m_hasPrevVertex, m_hasNextVertex;
92 inline b2ChainShape::b2ChainShape()
98 m_hasPrevVertex =
false;
99 m_hasNextVertex =
false;
Definition: b2ChainShape.h:32
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const
Definition: b2ChainShape.cpp:165
void CreateChain(const b2Vec2 *vertices, int32 count)
Definition: b2ChainShape.cpp:53
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const
Definition: b2ChainShape.cpp:138
Definition: b2BlockAllocator.h:35
This holds the mass data computed for a shape.
Definition: b2Shape.h:27
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const
Implement b2Shape.
Definition: b2ChainShape.cpp:145
Definition: b2Collision.h:155
int32 m_count
The vertex count.
Definition: b2ChainShape.h:86
#define b2_polygonRadius
Definition: b2Settings.h:77
An axis aligned bounding box.
Definition: b2Collision.h:162
void SetNextVertex(const b2Vec2 &nextVertex)
Definition: b2ChainShape.cpp:82
b2Shape * Clone(b2BlockAllocator *allocator) const
Implement b2Shape. Vertices are cloned using b2Alloc.
Definition: b2ChainShape.cpp:88
Definition: b2EdgeShape.h:27
int32 GetChildCount() const
Definition: b2ChainShape.cpp:100
void CreateLoop(const b2Vec2 *vertices, int32 count)
Definition: b2ChainShape.cpp:31
~b2ChainShape()
The destructor frees the vertices using b2Free.
Definition: b2ChainShape.cpp:24
b2Vec2 * m_vertices
The vertices. Owned by this class.
Definition: b2ChainShape.h:83
A 2D column vector.
Definition: b2Math.h:53
void SetPrevVertex(const b2Vec2 &prevVertex)
Definition: b2ChainShape.cpp:76
void GetChildEdge(b2EdgeShape *edge, int32 index) const
Get a child edge.
Definition: b2ChainShape.cpp:106
void ComputeMass(b2MassData *massData, float32 density) const
Definition: b2ChainShape.cpp:183