Go to the documentation of this file.
139 if ((p.
x < -10.0f && v.
x < 0.0f) ||
140 (p.
x > 10.0f && v.
x > 0.0f))
const b2Vec2 & GetLinearVelocity() const
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
b2BodyType GetType() const
Get the type of this body.
void SetType(b2BodyType type)
Set the type of this body. This may alter the mass and velocity.
float lowerTranslation
The lower translation limit, usually in meters.
A rigid body. These are created via b2World::CreateBody.
void Set(float x_, float y_)
Set this vector to some specified coordinates.
void SetAngularVelocity(float omega)
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
void SetLinearVelocity(const b2Vec2 &v)
b2Joint * CreateJoint(const b2JointDef *def)
bool enableMotor
A flag to enable the joint motor.
float friction
The friction coefficient, usually in the range [0,1].
void DrawString(int x, int y, const char *string,...)
bool enableLimit
Enable/disable the joint limit.
void SetAsBox(float hx, float hy)
float density
The density, usually in kg/m^2.
void Step(Settings &settings) override
b2Body * CreateBody(const b2BodyDef *def)
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
float upperTranslation
The upper translation limit, usually in meters.
bool enableMotor
Enable/disable the joint motor.
virtual void Step(Settings &settings)
const b2Transform & GetTransform() const
float maxMotorForce
The maximum motor torque, usually in N-m.
void Keyboard(int key) override
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis)
b2Fixture * CreateFixture(const b2FixtureDef *def)
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07