Go to the documentation of this file.
178 vertices[0].
Set(-0.5
f, 0.0
f);
179 vertices[1].
Set(0.5
f, 0.0
f);
180 vertices[2].
Set(0.0
f, 1.5
f);
186 vertices[0].
Set(-0.1
f, 0.0
f);
187 vertices[1].
Set(0.1
f, 0.0
f);
188 vertices[2].
Set(0.0
f, 1.5
f);
194 float b = w / (2.0f +
b2Sqrt(2.0
f));
198 vertices[0].
Set(0.5
f *
s, 0.0
f);
199 vertices[1].
Set(0.5
f * w, b);
200 vertices[2].
Set(0.5
f * w, b +
s);
201 vertices[3].
Set(0.5
f *
s, w);
202 vertices[4].
Set(-0.5
f *
s, w);
203 vertices[5].
Set(-0.5
f * w, b +
s);
204 vertices[6].
Set(-0.5
f * w, b);
205 vertices[7].
Set(-0.5
f *
s, 0.0
f);
419 b2Vec2 head = p + 0.5f * n;
438 input.
p1.
Set(10.2725
f,1.71372
f);
439 input.
p2.
Set(10.2353
f,2.21807
f);
445 xf.position.
Set(23.0
f, 5.0
f);
449 hit = shape.
RayCast(&output, input, xf);
454 for (
int32 i = 0; i < 4; ++i)
IMGUI_API bool RadioButton(const char *label, bool active)
b2Vec2 m_vertices[b2_maxPolygonVertices]
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
IMGUI_API void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond=0, const ImVec2 &pivot=ImVec2(0, 0))
b2FixtureUserData userData
Use this to store application specific fixture data.
float ReportFixture(b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float) override
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
void DrawSegment(const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color) override
Draw a line segment.
A rigid body. These are created via b2World::CreateBody.
b2Vec2 b2Mul(const b2Mat22 &A, const b2Vec2 &v)
void Set(float x_, float y_)
Set this vector to some specified coordinates.
uintptr_t pointer
For legacy compatibility.
void SetTwoSided(const b2Vec2 &v1, const b2Vec2 &v2)
Set this as an isolated edge. Collision is two-sided.
void Set(const b2Vec2 *points, int32 count)
float friction
The friction coefficient, usually in the range [0,1].
void DrawPolygon(const b2Vec2 *vertices, int32 vertexCount, const b2Color &color) override
Draw a closed polygon provided in CCW order.
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)
void RayCast(b2RayCastCallback *callback, const b2Vec2 &point1, const b2Vec2 &point2) const
float angle
The world angle of the body in radians.
RayCastMultipleCallback()
Color for debug drawing. Each value has the range [0,1].
float ReportFixture(b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float) override
b2FixtureUserData & GetUserData()
float RandomFloat()
Random number in range [-1,1].
void SetAsBox(float hx, float hy)
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
b2Vec2 m_normals[e_maxCount]
void DrawPoint(const b2Vec2 &p, float size, const b2Color &color) override
Draw a point.
b2Body * CreateBody(const b2BodyDef *def)
@ ImGuiWindowFlags_NoMove
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
b2PolygonShape m_polygons[4]
b2Vec2 m_points[e_maxCount]
void DestroyBody(b2Body *body)
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
b2Body * m_bodies[e_maxBodies]
void Step(Settings &settings) override
virtual void Step(Settings &settings)
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input, const b2Transform &transform, int32 childIndex) const override
@ ImGuiWindowFlags_NoResize
float ReportFixture(b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float fraction) override
b2Fixture * CreateFixture(const b2FixtureDef *def)
mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:08