Skip to main content

JointHinge

The JointHinge class represents a hinge connection between bodies in the Scene. It provides a single rotational degree of freedom around the Z axis. The Joint can operate as a servo motor with a specified angular velocity.

#include <scene/TellusimJointHinge.h>

Inheritance

Constructors

explicit JointHinge(const char *name = nullptr)
explicit JointHinge(Body &body, const char *name = nullptr)
JointHinge(Body &body_0, Body &body_1, const char *name = nullptr)

Methods

Angular servo flag.

void setServo(bool servo)
bool isServo() const

Current angular rotation.

void setRotation(float32_t rotation)
float32_t getRotation() const

Current angular velocity.

void setVelocity(float32_t velocity)
float32_t getVelocity() const

Angular friction.

void setFriction(float32_t friction)
float32_t getFriction() const

Angular restitution.

void setRestitution(float32_t restitution)
float32_t getRestitution() const

Angular stiffness.

void setStiffness(float32_t stiffness)
float32_t getStiffness() const

Angular damping.

void setDamping(float32_t damping)
float32_t getDamping() const

Angular rotation range.

void setMinRotation(float32_t min_rotation)
void setMaxRotation(float32_t max_rotation)
void setRotationRange(float32_t min_rotation, float32_t max_rotation)
float32_t getMinRotation() const
float32_t getMaxRotation() const
bool hasRotationRange() const

Servo motor rotation.

void setMotorRotation(float32_t rotation)
float32_t getMotorRotation() const

Motor velocity.

void setMotorVelocity(float32_t velocity)
float32_t getMotorVelocity() const

Motor torque.

void setMotorTorque(float32_t torque)
float32_t getMotorTorque() const

Motor stiffness.

void setMotorStiffness(float32_t stiffness)
float32_t getMotorStiffness() const

Motor damping.

void setMotorDamping(float32_t damping)
float32_t getMotorDamping() const

Updated flags.

bool isFrictionUpdated() const
bool isLimitsUpdated() const
bool isMotorUpdated() const