15 #include "physxPulleyJointDesc.h"
16 #include "physxMotorDesc.h"
17 #include "physxManager.h"
28 _desc.distance = distance;
40 _desc.stiffness = stiffness;
60 set_flag(PhysxPulleyJointFlag flag,
bool value) {
66 _desc.flags &= ~(flag);
79 nassertv_always(idx < 2);
91 _desc.motor = motor._desc;
99 float PhysxPulleyJointDesc::
100 get_distance()
const {
102 return _desc.distance;
110 float PhysxPulleyJointDesc::
111 get_stiffness()
const {
113 return _desc.stiffness;
121 float PhysxPulleyJointDesc::
132 bool PhysxPulleyJointDesc::
133 get_flag(PhysxPulleyJointFlag flag)
const {
135 return (_desc.flags & flag) ?
true :
false;
144 get_pulley(
unsigned int idx)
const {
159 value._desc = _desc.motor;
void set_motor(const PhysxMotorDesc &motor)
Sets an optional joint motor.
void set_pulley(unsigned int idx, const LPoint3f pos)
Sets the suspension points of two bodies in world space.
static const LPoint3f & zero()
Returns a zero-length point.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
void set_distance(float distance)
Sets the rest length of the rope connecting the two objects.
void set_ratio(float ration)
Sets the transmission ratio.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
void set_stiffness(float stiffness)
Sets how stiff the constraint is, between 0 and 1 (stiffest)
void set_flag(PhysxPulleyJointFlag flag, bool value)
Sets or clears a single PulleyJointFlag flag.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.