|
| ~b2ChainShape () |
| The destructor frees the vertices using b2Free.
|
|
void | Clear () |
| Clear all data.
|
|
void | CreateLoop (const b2Vec2 *vertices, int32 count) |
|
void | CreateChain (const b2Vec2 *vertices, int32 count, const b2Vec2 &prevVertex, const b2Vec2 &nextVertex) |
|
b2Shape * | Clone (b2BlockAllocator *allocator) const override |
| Implement b2Shape. Vertices are cloned using b2Alloc. More...
|
|
int32 | GetChildCount () const override |
|
void | GetChildEdge (b2EdgeShape *edge, int32 index) const |
| Get a child edge.
|
|
bool | TestPoint (const b2Transform &transform, const b2Vec2 &p) const override |
|
bool | RayCast (b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override |
| Implement b2Shape. More...
|
|
void | ComputeAABB (b2AABB *aabb, const b2Transform &transform, int32 childIndex) const override |
|
void | ComputeMass (b2MassData *massData, float density) const override |
|
virtual b2Shape * | Clone (b2BlockAllocator *allocator) const =0 |
| Clone the concrete shape using the provided allocator. More...
|
|
Type | GetType () const |
|
virtual int32 | GetChildCount () const =0 |
| Get the number of child primitives. More...
|
|
virtual bool | TestPoint (const b2Transform &xf, const b2Vec2 &p) const =0 |
|
virtual bool | RayCast (b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const =0 |
|
virtual void | ComputeAABB (b2AABB *aabb, const b2Transform &xf, int32 childIndex) const =0 |
|
virtual void | ComputeMass (b2MassData *massData, float density) const =0 |
|
A chain shape is a free form sequence of line segments. The chain has one-sided collision, with the surface normal pointing to the right of the edge. This provides a counter-clockwise winding like the polygon shape. Connectivity information is used to create smooth collisions.
- Warning
- the chain will not collide properly if there are self-intersections.