15 #include "physxPulleyJoint.h" 16 #include "physxPulleyJointDesc.h" 17 #include "physxMotorDesc.h" 26 void PhysxPulleyJoint::
27 link(NxJoint *jointPtr) {
29 _ptr = jointPtr->isPulleyJoint();
30 _ptr->userData =
this;
36 scene->_joints.add(
this);
44 void PhysxPulleyJoint::
47 _ptr->userData = NULL;
48 _error_type = ET_released;
51 scene->_joints.remove(
this);
63 nassertv(_error_type == ET_ok);
64 _ptr->saveToDesc(jointDesc._desc);
76 nassertv(_error_type == ET_ok);
77 _ptr->loadFromDesc(jointDesc._desc);
114 nassertv(_error_type == ET_ok);
115 _ptr->setMotor(motor._desc);
126 nassertv(_error_type == ET_ok);
127 NxU32 flags = _ptr->getFlags();
136 _ptr->setFlags(flags);
147 nassertr(_error_type == ET_ok,
false);
148 return (_ptr->getFlags() & flag) ?
true :
false;
159 nassertr(_error_type == ET_ok,
false);
162 _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.
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.