Joint
The Joint class provides an interface for Scene joints. It defines a connection between two bodies using local anchor transformations. Force and torque limits can be specified to automatically disable the joint when exceeded.
#include <scene/TellusimJoint.h>
Constructors
Joint()
Methods
static Joint create(Type type, const char *name = nullptr)
Clear joint.
void clear()
Joint type.
Type getType() const
static const char *getTypeName(Type type)
const char *getTypeName() const
bool isFixed() const
bool isSixDof() const
bool isSlider() const
bool isHinge() const
bool isRange() const
bool isBall() const
Joint unique identifier.
uint32_t getID() const
Joint index.
uint32_t getIndex() const
Joint address.
uint32_t getAddress() const
Joint name.
void setName(const char *name)
void setName(const String &name)
String getName() const
Joint body.
void setBody0(Body &body, bool check = true)
void setBody1(Body &body, bool check = true)
const Body getBody0() const
const Body getBody1() const
Body getBody0()
Body getBody1()
Joint objects.
const NodeObject getObject0() const
const NodeObject getObject1() const
NodeObject getObject0()
NodeObject getObject1()
Enabled flag.
void setEnabled(bool enabled)
bool isEnabled() const
Disabled flag.
void setDisabled(bool disabled)
bool isDisabled() const
Collision flag.
void setCollision(bool collision)
bool getCollision() const
Object mask.
void setObjectMask(uint32_t mask)
uint32_t getObjectMask() const
Hidden flag.
void setHidden(bool flag)
bool isHidden() const
Internal flag.
void setInternal(bool flag)
bool isInternal() const
Virtual flag.
void setVirtual(bool flag)
bool isVirtual() const
Changed flag.
void setChanged(bool flag)
bool isChanged() const
Joint disable limits.
void setDisableForce(float32_t force)
void setDisableTorque(float32_t torque)
float32_t getDisableForce() const
float32_t getDisableTorque() const
Joint transforms.
void setTransform0(Matrix4x3f transform)
void setTransform1(Matrix4x3f transform)
const Matrix4x3f getTransform0() const
const Matrix4x3f getTransform1() const
Load joint.
bool load(const Xml &xml)
bool load(const Json &json)
bool load(Stream &stream)
Save joint.
bool save(Xml &xml) const
bool save(Json &json) const
bool save(Stream &stream) const
Clone joint.
Joint clone(Body &body) const
Copy joint.
void copy(const Joint &joint)
Updated flags.
bool isUpdated() const
bool isTransform0Updated() const
bool isTransform1Updated() const
Update scene.
void updateScene()
Enums
Type
Joint types.
Name | Value |
---|---|
TypeUnknown | 0 |
TypeFixed | 1 |
TypeSixDof | 2 |
TypeSlider | 3 |
TypeHinge | 4 |
TypeRange | 5 |
TypeBall | 6 |
NumTypes | 7 |