载入中...
搜索中...
未找到
WorldJoints2D.cpp
浏览该文件的文档.
189Mechanism2D *World::newRatchet(Body *frame, Body *wheel, float anchorX, float anchorY, int direction,
constexpr bool isValid() const noexcept
Returns whether both coordinates are usable handle values.
Definition RuntimeHandle.h:146
static constexpr index_type invalidIndex
Reserved index value shared by all invalid handles.
Definition RuntimeHandle.h:124
2D rigid body (Box2D) in pixel-space coordinates. Owned by a World; create shapes with newRectangleFi...
Definition Body.h:21
b2Body * raw()
Exposes the underlying Box2D body for tightly-scoped backend integration.
Definition Body.h:194
int getBodyBId() const
Stable ID of attached body B, or -1 after invalidation.
Definition Joint2D.cpp:90
@ Distance
@ Revolute
@ Prismatic
PhysicsJointHandle runtimeHandle() const
Process-local generation-qualified handle owned by World.
Definition Joint2D.h:40
int getBodyAId() const
Stable ID of attached body A, or -1 after invalidation.
Definition Joint2D.cpp:89
Composed 2D mechanical assembly owned by a World.
Definition Mechanism2D.h:25
@ CrankSlider
void forgetMechanism(Mechanism2D *mechanism)
Internal: removes a mechanism wrapper from ownership bookkeeping.
Definition WorldJoints2D.cpp:57
Joint2D * newDistanceJoint(Body *bodyA, Body *bodyB, float anchorAX, float anchorAY, float anchorBX, float anchorBY, float lengthPixels, bool collideConnected=false)
Connects two pixel-space anchors with a distance constraint.
Definition WorldJoints2D.cpp:79
Joint2D * newWheelJoint(Body *bodyA, Body *bodyB, float anchorX, float anchorY, float axisX, float axisY, bool collideConnected=false)
Creates a wheel joint with a pixel-space suspension axis.
Definition WorldJoints2D.cpp:131
Body * findBodyById(int bodyId) const
Resolves a live body by its world-local stable event/query id.
Definition World.cpp:454
Joint2D * newWeldJoint(Body *bodyA, Body *bodyB, float anchorX, float anchorY, bool collideConnected=false)
Welds two bodies at a shared pixel-space anchor.
Definition WorldJoints2D.cpp:120
Joint2D * findJoint(PhysicsJointHandle handle) const
Resolves a live joint handle; returns null when stale or foreign.
Definition WorldJoints2D.cpp:72
void forgetJoint(Joint2D *joint)
Internal: removes a joint wrapper from ownership bookkeeping.
Definition WorldJoints2D.cpp:45
Joint2D * newPrismaticJoint(Body *bodyA, Body *bodyB, float anchorX, float anchorY, float axisX, float axisY, bool collideConnected=false)
Creates a prismatic slider along a pixel-space axis.
Definition WorldJoints2D.cpp:108
Joint2D * newRevoluteJoint(Body *bodyA, Body *bodyB, float anchorX, float anchorY, bool collideConnected=false)
Creates a revolute hinge at a shared pixel-space anchor.
Definition WorldJoints2D.cpp:97
b2World * raw()
Exposes the underlying Box2D world for tightly-scoped backend integration.
Definition World.h:378
Mechanism2D * newCrankSlider(Body *frame, Body *crank, Body *rod, Body *slider, float crankAnchorX, float crankAnchorY, float crankPinX, float crankPinY, float sliderPinX, float sliderPinY, float slideAxisX, float slideAxisY, bool collideConnected=false)
Builds a planar crank-slider from frame, crank, connecting rod and slider bodies.
Definition WorldJoints2D.cpp:204
PhysicsWorldHandle runtimeHandle() const noexcept
Process-local identity used by PhysicsLink; invalid after destruction.
Definition World.h:111
Joint2D * newGearJoint(Joint2D *joint1, Joint2D *joint2, float ratio)
Creates a gear joint that couples two revolute or prismatic joints.
Definition WorldJoints2D.cpp:151
Mechanism2D * newRatchet(Body *frame, Body *wheel, float anchorX, float anchorY, int direction, float engagementTorque, bool collideConnected=false)
Builds a one-way ratchet around a revolute hinge.
Definition WorldJoints2D.cpp:189
PhysicsJointHandle nextJointRuntimeHandle()
Internal: next generation-qualified joint handle.
Definition WorldJoints2D.cpp:66
Joint2D * newMotorJoint(Body *bodyA, Body *bodyB, bool collideConnected=false)
Creates a motor joint that drives relative pose between bodies.
Definition WorldJoints2D.cpp:143
Mechanism2D * newShaft(Body *support, Body *rotor, float anchorX, float anchorY, bool collideConnected=false)
Builds a shaft (support↔rotor revolute) with optional drive motor helpers.
Definition WorldJoints2D.cpp:178
eve::RuntimeHandle< PhysicsJointHandleTag > PhysicsJointHandle
Generation-qualified runtime identity for a physics joint.
Definition PhysicsHandles.h:32