载入中...
搜索中...
未找到
World3DJoints.cpp
浏览该文件的文档.
37Joint3D *World3D::newWeldJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ,
41 auto native = worldValue(rigidBackend_->newWeldJoint(*bodyA, *bodyB, anchorX, anchorY, anchorZ, collideConnected));
43 std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Weld, nextJointId());
54 std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Motor, nextJointId());
60Joint3D *World3D::newParallelJoint(Body3D *bodyA, Body3D *bodyB, float axisX, float axisY, float axisZ,
64 auto native = worldValue(rigidBackend_->newParallelJoint(*bodyA, *bodyB, axisX, axisY, axisZ, collideConnected));
65 auto joint = std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Parallel,
77 std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Filter, nextJointId());
139 const PhysicsVector3D hingeAxis = normalizedAxis(axisX, axisY, axisZ, "World3D.newCrankSlider");
140 const PhysicsVector3D slideAxis = normalizedAxis(slideAxisX, slideAxisY, slideAxisZ, "World3D.newCrankSlider");
163Joint3D *World3D::newDistanceJoint(Body3D *bodyA, Body3D *bodyB, float anchorAX, float anchorAY, float anchorAZ,
168 auto native = worldValue(rigidBackend_->newDistanceJoint(*bodyA, *bodyB, anchorAX, anchorAY, anchorAZ, anchorBX,
170 auto joint = std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Distance,
177Joint3D *World3D::newRevoluteJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ,
181 auto native = worldValue(rigidBackend_->newRevoluteJoint(*bodyA, *bodyB, anchorX, anchorY, anchorZ, axisX, axisY,
183 auto joint = std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Revolute,
190Joint3D *World3D::newPrismaticJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ,
194 auto native = worldValue(rigidBackend_->newPrismaticJoint(*bodyA, *bodyB, anchorX, anchorY, anchorZ, axisX, axisY,
196 auto joint = std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Prismatic,
203Joint3D *World3D::newSphericalJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ,
207 auto native = worldValue(rigidBackend_->newSphericalJoint(*bodyA, *bodyB, anchorX, anchorY, anchorZ, axisX, axisY,
209 auto joint = std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Spherical,
216Joint3D *World3D::newWheelJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ,
221 auto native = worldValue(rigidBackend_->newWheelJoint(*bodyA, *bodyB, anchorX, anchorY, anchorZ, suspensionAxisX,
225 std::make_unique<Joint3D>(this, bodyA, bodyB, std::move(native), handle, Joint3D::Kind::Wheel, nextJointId());
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
Script-facing joint owned by a World3D. Legacy scalar/void methods adapt the checked backend contract...
Definition Joint3D.h:27
Composed mechanical assembly owned by a World3D.
Definition Mechanism3D.h:25
@ CrankSlider
PhysicsJointHandle nextJointRuntimeHandle()
Internal: next generation-qualified joint handle.
Definition World3D.cpp:416
Joint3D * newMotorJoint(Body3D *bodyA, Body3D *bodyB, bool collideConnected=false)
Creates a motor joint that drives relative linear/angular velocity between bodies.
Definition World3DJoints.cpp:49
Joint3D * newWeldJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, bool collideConnected=false)
Welds two bodies at a shared world-space anchor, preserving current relative pose.
Definition World3DJoints.cpp:37
Joint3D * newParallelJoint(Body3D *bodyA, Body3D *bodyB, float axisX, float axisY, float axisZ, bool collideConnected=false)
Creates a parallel joint that spring-aligns body local Z axes to a world axis.
Definition World3DJoints.cpp:60
Joint3D * newSphericalJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
Creates a ball-and-socket joint with a world-space twist/cone axis.
Definition World3DJoints.cpp:203
Joint3D * newRevoluteJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
Creates a hinge around a normalized world-space axis at a shared anchor.
Definition World3DJoints.cpp:177
Mechanism3D * newCrankSlider(Body3D *frame, Body3D *crank, Body3D *rod, Body3D *slider, float crankAnchorX, float crankAnchorY, float crankAnchorZ, float axisX, float axisY, float axisZ, float crankPinX, float crankPinY, float crankPinZ, float sliderPinX, float sliderPinY, float sliderPinZ, float slideAxisX, float slideAxisY, float slideAxisZ, bool collideConnected=false)
Builds a planar crank-slider from frame, crank, connecting rod and slider bodies.
Definition World3DJoints.cpp:123
Mechanism3D * newRatchet(Body3D *frame, Body3D *wheel, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, int direction, float engagementTorque, bool collideConnected=false)
Builds a one-way ratchet around a revolute axis.
Definition World3DJoints.cpp:104
Joint3D * newFilterJoint(Body3D *bodyA, Body3D *bodyB)
Disables collision between two specific bodies (filter joint).
Definition World3DJoints.cpp:72
Joint3D * newPrismaticJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
Creates a slider whose permitted world-space translation follows axis.
Definition World3DJoints.cpp:190
Mechanism3D * newShaft(Body3D *support, Body3D *rotor, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected=false)
Builds a shaft (support↔rotor revolute) with optional drive motor helpers.
Definition World3DJoints.cpp:90
void forgetMechanism(Mechanism3D *mechanism)
Internal: removes a mechanism wrapper from ownership bookkeeping.
Definition World3DJoints.cpp:83
Joint3D * newWheelJoint(Body3D *bodyA, Body3D *bodyB, float anchorX, float anchorY, float anchorZ, float suspensionAxisX, float suspensionAxisY, float suspensionAxisZ, float wheelAxisX, float wheelAxisY, float wheelAxisZ, bool collideConnected=false)
Creates a vehicle wheel joint with independent world suspension and spin axes.
Definition World3DJoints.cpp:216
Joint3D * newDistanceJoint(Body3D *bodyA, Body3D *bodyB, float anchorAX, float anchorAY, float anchorAZ, float anchorBX, float anchorBY, float anchorBZ, float length, bool collideConnected=false)
Connects two world-space anchor points with a rigid distance constraint.
Definition World3DJoints.cpp:163
T worldValue(eve::Result< T > result)
Definition World3DInternal.h:45
Allocation-free owning three-dimensional physics value.
Definition RigidTypes3D.h:4