Go to the documentation of this file.
155 int32 contactCapacity,
251 if (
step.warmStarting)
265 for (
int32 i = 0; i <
step.velocityIterations; ++i)
288 b2Vec2 translation = h * v;
295 float rotation = h * w;
314 bool positionSolved =
false;
315 for (
int32 i = 0; i <
step.positionIterations; ++i)
319 bool jointsOkay =
true;
323 jointsOkay = jointsOkay && jointOkay;
326 if (contactsOkay && jointsOkay)
329 positionSolved =
true;
408 contactSolverDef.
step = subStep;
475 float h = subStep.
dt;
486 b2Vec2 translation = h * v;
493 float rotation = h * w;
void SynchronizeTransform()
b2BodyType GetType() const
Get the type of this body.
virtual bool SolvePositionConstraints(const b2SolverData &data)=0
virtual void InitVelocityConstraints(const b2SolverData &data)=0
B2_API void b2Distance(b2DistanceOutput *output, b2SimplexCache *cache, const b2DistanceInput *input)
A rigid body. These are created via b2World::CreateBody.
virtual void SolveVelocityConstraints(const b2SolverData &data)=0
This is an internal structure.
This is an internal structure.
b2Island(int32 bodyCapacity, int32 contactCapacity, int32 jointCapacity, b2StackAllocator *allocator, b2ContactListener *listener)
float b2Dot(const b2Vec2 &a, const b2Vec2 &b)
Perform the dot product on two vectors.
b2Velocity * m_velocities
void SolveTOI(const b2TimeStep &subStep, int32 toiIndexA, int32 toiIndexB)
b2StackAllocator * m_allocator
#define b2_maxRotationSquared
#define b2_maxTranslation
float GetMilliseconds() const
Get the time since construction or the last reset.
#define b2_linearSleepTolerance
A body cannot sleep if its linear velocity is above this tolerance.
Profiling data. Times are in milliseconds.
#define b2_timeToSleep
The time that a body must be still before it will go to sleep.
void * Allocate(int32 size)
This is an internal structure.
void Set(const b2Shape *shape, int32 index)
b2ContactListener * m_listener
void Reset()
Reset the timer.
#define b2_angularSleepTolerance
A body cannot sleep if its angular velocity is above this tolerance.
b2Vec2 c
center world positions
#define b2_maxTranslationSquared
const b2Transform & GetTransform() const
void Report(const b2ContactVelocityConstraint *constraints)
float Length() const
Get the length of this vector (the norm).
void Solve(b2Profile *profile, const b2TimeStep &step, const b2Vec2 &gravity, bool allowSleep)
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07