15 #include "physxD6Joint.h"
16 #include "physxD6JointDesc.h"
26 link(NxJoint *jointPtr) {
28 _ptr = jointPtr->isD6Joint();
29 _ptr->userData =
this;
35 scene->_joints.add(
this);
46 _ptr->userData = NULL;
47 _error_type = ET_released;
50 scene->_joints.remove(
this);
62 nassertv(_error_type == ET_ok);
63 _ptr->saveToDesc(jointDesc._desc);
75 nassertv(_error_type == ET_ok);
76 _ptr->loadFromDesc(jointDesc._desc);
85 set_drive_angular_velocity(
const LVector3f &v) {
87 nassertv(_error_type == ET_ok);
97 set_drive_linear_velocity(
const LVector3f &v) {
99 nassertv(_error_type == ET_ok);
111 nassertv(_error_type == ET_ok);
121 set_drive_position(
const LPoint3f &pos) {
123 nassertv(_error_type == ET_ok);
static NxQuat quat_to_nxQuat(const LQuaternionf &q)
Converts from LQuaternionf to NxQuat.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
A scene is a collection of bodies, constraints, and effectors which can interact. ...
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
This is the base quaternion class.
void set_name(const char *name)
Sets a name string for this object.
void save_to_desc(PhysxD6JointDesc &jointDesc) const
Saves the state of the joint object to a descriptor.
TypeHandle is the identifier used to differentiate C++ class types.
void load_from_desc(const PhysxD6JointDesc &jointDesc)
Loads the entire state of the joint from a descriptor with a single call.