64 const float y = 15.0f;
68 for (
int32 i = 0; i < N; ++i)
86 sfd.
shape = &circleShape;
96 b2Vec2 anchor(
float(i), y);
105 float extraLength = 0.01f;
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
b2Fixture * CreateFixture(const b2FixtureDef *def)
float density
The density, usually in kg/m^2.
void Initialize(b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor)
float minLength
Minimum length. Clamped to a stable minimum value.
void DestroyJoint(b2Joint *joint)
void SetZero()
Set this vector to all zeros.
void Step(Settings &settings) override
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
void SetAsBox(float hx, float hy)
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
A rigid body. These are created via b2World::CreateBody.
b2Filter filter
Contact filtering data.
b2Joint * CreateJoint(const b2JointDef *def)
b2Joint * m_distanceJoint
bool collideConnected
Set this flag to true if the attached bodies should collide.
void Set(float x_, float y_)
Set this vector to some specified coordinates.
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
float maxLength
Maximum length. Must be greater than or equal to the minimum length.
b2DistanceJointDef m_distanceJointDef
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,...)
virtual void Step(Settings &settings)
b2Body * bodyA
The first attached body.
uint16 categoryBits
The collision category bits. Normally you would just set one bit.
b2Body * CreateBody(const b2BodyDef *def)
b2Body * bodyB
The second attached body.
float friction
The friction coefficient, usually in the range [0,1].