void EnableMotor(bool flag)
Enable/disable the joint motor.
void EnableLimit(bool flag)
Enable/disable the joint limit.
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
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 SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
b2Joint * CreateJoint(const b2JointDef *def)
void DrawString(int x, int y, const char *string,...)
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *format="%.3f", float power=1.0f)
float angle
The world angle of the body in radians.
bool enableLimit
Enable/disable the joint limit.
IMGUI_API bool Checkbox(const char *label, bool *v)
void SetAsBox(float hx, float hy)
b2PrismaticJoint * m_joint
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
b2Body * CreateBody(const b2BodyDef *def)
@ ImGuiWindowFlags_NoMove
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
float upperTranslation
The upper translation limit, usually in meters.
float motorSpeed
The desired motor speed in radians per second.
float GetMotorForce(float inv_dt) const
Get the current motor force given the inverse time step, usually in N.
void SetMotorSpeed(float speed)
Set the motor speed, usually in meters per second.
bool enableMotor
Enable/disable the joint motor.
virtual void Step(Settings &settings)
@ ImGuiWindowFlags_NoResize
float maxMotorForce
The maximum motor torque, usually in N-m.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis)
void Step(Settings &settings) override
b2Fixture * CreateFixture(const b2FixtureDef *def)
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:08