71 float dampingRatio = 0.7f;
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
void Step(Settings &settings) override
b2Fixture * CreateFixture(const b2FixtureDef *def)
float lowerTranslation
The lower translation limit, usually in meters.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis)
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
void SetMotorSpeed(float speed)
Set the motor speed, usually in radians per second.
A rigid body. These are created via b2World::CreateBody.
float maxMotorTorque
The maximum motor torque, usually in N-m.
float GetMotorTorque(float inv_dt) const
Get the current motor torque given the inverse time step, usually in N-m.
b2Joint * CreateJoint(const b2JointDef *def)
void Set(float x_, float y_)
Set this vector to some specified coordinates.
bool enableMotor
Enable/disable the joint motor.
B2_API void b2LinearStiffness(float &stiffness, float &damping, float frequencyHertz, float dampingRatio, const b2Body *bodyA, const b2Body *bodyB)
Utility to compute linear stiffness values from frequency and damping ratio.
bool enableLimit
Enable/disable the joint limit.
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *format="%.3f", float power=1.0f)
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
IMGUI_API bool Checkbox(const char *label, bool *v)
void DrawString(int x, int y, const char *string,...)
void EnableMotor(bool flag)
Enable/disable the joint motor.
float motorSpeed
The desired motor speed in radians per second.
virtual void Step(Settings &settings)
b2Vec2 GetReactionForce(float inv_dt) const override
Get the reaction force on bodyB at the joint anchor in Newtons.
void EnableLimit(bool flag)
Enable/disable the joint translation limit.
float damping
Suspension damping. Typically in units of N*s/m.
float stiffness
Suspension stiffness. Typically in units N/m.
b2Body * CreateBody(const b2BodyDef *def)
float upperTranslation
The upper translation limit, usually in meters.