23 void PhysxPulleyJoint::
24 link(NxJoint *jointPtr) {
26 _ptr = jointPtr->isPulleyJoint();
27 _ptr->userData =
this;
33 scene->_joints.add(
this);
39 void PhysxPulleyJoint::
42 _ptr->userData =
nullptr;
43 _error_type = ET_released;
46 scene->_joints.remove(
this);
55 nassertv(_error_type == ET_ok);
56 _ptr->saveToDesc(jointDesc._desc);
65 nassertv(_error_type == ET_ok);
66 _ptr->loadFromDesc(jointDesc._desc);
96 nassertv(_error_type == ET_ok);
97 _ptr->setMotor(motor._desc);
106 nassertv(_error_type == ET_ok);
107 NxU32 flags = _ptr->getFlags();
116 _ptr->setFlags(flags);
125 nassertr(_error_type == ET_ok,
false);
126 return (_ptr->getFlags() & flag) ?
true :
false;
135 nassertr(_error_type == ET_ok,
false);
138 _ptr->getMotor(value._desc);
void set_motor(const PhysxMotorDesc &motor)
Sets motor parameters for the joint.
void load_from_desc(const PhysxPulleyJointDesc &jointDesc)
Loads the entire state of the joint from a descriptor with a single call.
Descriptor class for distance joint.
void set_flag(PhysxPulleyJointFlag flag, bool value)
Sets or clear a single pulley joint flag.
A scene is a collection of bodies, constraints, and effectors which can interact.
bool get_flag(PhysxPulleyJointFlag flag) const
Retrieves the value of a single PulleyJointFlag.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void save_to_desc(PhysxPulleyJointDesc &jointDesc) const
Saves the state of the joint object to a descriptor.
void set_name(const char *name)
Sets a name string for this object.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.