75 output->
normal = s + a * r;
98 massData->
I = massData->
mass * (0.5f * m_radius * m_radius +
b2Dot(
m_p,
m_p));
float32 b2Dot(const b2Vec2 &a, const b2Vec2 &b)
Perform the dot product on two vectors.
b2Vec2 b2Mul(const b2Mat22 &A, const b2Vec2 &v)
void ComputeMass(b2MassData *massData, float32 density) const
b2Vec2 lowerBound
the lower vertex
float32 I
The rotational inertia of the shape about the local origin.
b2Vec2 center
The position of the shape's centroid relative to the shape's origin.
void ComputeAABB(b2AABB *aabb, const b2Transform &transform, int32 childIndex) const
b2Shape * Clone(b2BlockAllocator *allocator) const
Implement b2Shape.
float32 mass
The mass of the shape, usually in kilograms.
void * Allocate(int32 size)
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const
Implement b2Shape.
An axis aligned bounding box.
float32 Normalize()
Convert this vector into a unit vector. Returns the length.
void Set(float32 x_, float32 y_)
Set this vector to some specified coordinates.
bool TestPoint(const b2Transform &transform, const b2Vec2 &p) const
Implement b2Shape.
This holds the mass data computed for a shape.
int32 GetChildCount() const
b2Vec2 upperBound
the upper vertex