24 enum class Kind { Distance, Revolute, Prismatic, Spherical, Wheel, Weld, Motor, Parallel, Filter };
35 int getId()
const {
return id_; }
39 std::string getKind()
const;
41 int getBodyAId()
const;
43 int getBodyBId()
const;
47 void setCollideConnected(
bool collide);
49 bool getCollideConnected()
const;
51 void setForceThreshold(
float threshold);
53 float getForceThreshold()
const;
55 void setTorqueThreshold(
float threshold);
57 float getTorqueThreshold()
const;
72 float getLinearSeparation()
const;
74 float getAngularSeparation()
const;
77 void setDistanceLength(
float length);
79 float getDistanceLength()
const;
81 float getDistanceCurrentLength()
const;
83 void setDistanceSpring(
bool enabled,
float hertz,
float dampingRatio);
87 void setDistanceMotor(
bool enabled,
float speed,
float maxForce);
90 void setRevoluteSpring(
bool enabled,
float targetAngle,
float hertz,
float dampingRatio);
92 void setRevoluteLimits(
bool enabled,
float lower,
float upper);
94 void setRevoluteMotor(
bool enabled,
float speed,
float maxTorque);
96 float getRevoluteAngle()
const;
98 float getRevoluteMotorTorque()
const;
101 void setPrismaticSpring(
bool enabled,
float targetTranslation,
float hertz,
104 void setPrismaticLimits(
bool enabled,
float lower,
float upper);
106 void setPrismaticMotor(
bool enabled,
float speed,
float maxForce);
108 float getPrismaticTranslation()
const;
110 float getPrismaticSpeed()
const;
112 float getPrismaticMotorForce()
const;
117 void setSphericalTwistLimits(
bool enabled,
float lower,
float upper);
119 void setSphericalMotor(
bool enabled,
float velocityX,
float velocityY,
float velocityZ,
122 float getSphericalConeAngle()
const;
124 float getSphericalTwistAngle()
const;
127 void setWheelSuspension(
bool enabled,
float hertz,
float dampingRatio);
129 void setWheelSuspensionLimits(
bool enabled,
float lower,
float upper);
131 void setWheelSpinMotor(
bool enabled,
float speed,
float maxTorque);
133 void setWheelSteering(
bool enabled,
float targetAngle,
float hertz,
float dampingRatio,
136 void setWheelSteeringLimits(
bool enabled,
float lower,
float upper);
138 float getWheelSpinSpeed()
const;
140 float getWheelSpinTorque()
const;
142 float getWheelSteeringAngle()
const;
144 float getWheelSteeringTorque()
const;
147 void setWeldLinearSpring(
float hertz,
float dampingRatio);
149 void setWeldAngularSpring(
float hertz,
float dampingRatio);
151 float getWeldLinearHertz()
const;
153 float getWeldLinearDampingRatio()
const;
155 float getWeldAngularHertz()
const;
157 float getWeldAngularDampingRatio()
const;
160 void setMotorLinearVelocity(
float vx,
float vy,
float vz);
162 void setMotorAngularVelocity(
float wx,
float wy,
float wz);
164 void setMotorVelocityLimits(
float maxForce,
float maxTorque);
166 void setMotorLinearSpring(
float hertz,
float dampingRatio,
float maxForce);
168 void setMotorAngularSpring(
float hertz,
float dampingRatio,
float maxTorque);
170 float getMotorLinearVelocityX()
const;
172 float getMotorLinearVelocityY()
const;
174 float getMotorLinearVelocityZ()
const;
176 float getMotorAngularVelocityX()
const;
178 float getMotorAngularVelocityY()
const;
180 float getMotorAngularVelocityZ()
const;
183 void setParallelSpring(
float hertz,
float dampingRatio,
float maxTorque);
185 float getParallelHertz()
const;
187 float getParallelDampingRatio()
const;
189 float getParallelMaxTorque()
const;
194 bool isValid()
const;
198 b3JointId
raw()
const {
return jointId_; }
204 void requireKind(
Kind expected,
const char *
operation)
const;
209 b3JointId jointId_{};
211 Kind kind_ = Kind::Distance;
ActionParameterOperation operation
#define EVENGINE_API_WORLD
Process-local, generation-qualified handles owned by the physics domain.
3D rigid body (Box3D) in meter-space coordinates (+Y up by convention). Owned by a World3D; create pr...
Script-facing Box3D joint owned by a World3D.
float getConstraintForceX() const
Current world-space constraint force X in newtons.
float getConstraintForceY() const
Current world-space constraint force Y in newtons.
Kind
Supported joint geometry.
Joint3D(const Joint3D &)=delete
PhysicsJointHandle runtimeHandle() const noexcept
Process-local generation-qualified handle owned by World3D.
float getConstraintTorqueZ() const
Current world-space constraint torque Z in newton-metres.
b3JointId raw() const
Internal raw Box3D identifier.
int getId() const
Stable world-local identifier.
float getConstraintTorqueX() const
Current world-space constraint torque X in newton-metres.
float getConstraintForceZ() const
Current world-space constraint force Z in newtons.
float getConstraintTorqueY() const
Current world-space constraint torque Y in newton-metres.
World3D * getWorld() const noexcept
Owning world, or null after joint destruction.
Joint3D & operator=(const Joint3D &)=delete
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Optional physics backend for vehicle mobility and body attach.