Go to the documentation of this file.
52 for (
int32 i = 1; i < count; ++i)
72 for (
int32 i = 1; i < count; ++i)
143 int32 i1 = childIndex;
144 int32 i2 = childIndex + 1;
153 return edgeShape.
RayCast(output, input, xf, 0);
160 int32 i1 = childIndex;
161 int32 i2 = childIndex + 1;
182 massData->
mass = 0.0f;
int32 m_count
The vertex count.
float mass
The mass of the shape, usually in kilograms.
void * b2Alloc(int32 size)
Implement this function to use your own memory allocator.
~b2ChainShape()
The destructor frees the vertices using b2Free.
void * Allocate(int32 size)
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
b2Shape * Clone(b2BlockAllocator *allocator) const override
Implement b2Shape. Vertices are cloned using b2Alloc.
void SetZero()
Set this vector to all zeros.
b2Vec2 b2Mul(const b2Mat22 &A, const b2Vec2 &v)
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
Implement b2Shape.
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const override
b2Vec2 upperBound
the upper vertex
void CreateChain(const b2Vec2 *vertices, int32 count, const b2Vec2 &prevVertex, const b2Vec2 &nextVertex)
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const override
void CreateLoop(const b2Vec2 *vertices, int32 count)
b2Vec2 m_vertex0
Optional adjacent vertices. These are used for smooth collision.
b2Vec2 center
The position of the shape's centroid relative to the shape's origin.
void GetChildEdge(b2EdgeShape *edge, int32 index) const
Get a child edge.
int32 GetChildCount() const override
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
Implement b2Shape.
void Clear()
Clear all data.
An axis aligned bounding box.
b2Vec2 m_vertex1
These are the edge vertices.
float I
The rotational inertia of the shape about the local origin.
void b2Free(void *mem)
If you implement b2Alloc, you should also implement this function.
b2Vec2 * m_vertices
The vertices. Owned by this class.
This holds the mass data computed for a shape.
float b2DistanceSquared(const b2Vec2 &a, const b2Vec2 &b)
void ComputeMass(b2MassData *massData, float density) const override
bool m_oneSided
Uses m_vertex0 and m_vertex3 to create smooth collision.
b2Vec2 lowerBound
the lower vertex
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:06