24 _desc.distance = distance;
33 _desc.stiffness = stiffness;
49 set_flag(PhysxPulleyJointFlag flag,
bool value) {
55 _desc.flags &= ~(flag);
65 nassertv_always(idx < 2);
75 _desc.motor = motor._desc;
81 float PhysxPulleyJointDesc::
82 get_distance()
const {
84 return _desc.distance;
90 float PhysxPulleyJointDesc::
91 get_stiffness()
const {
93 return _desc.stiffness;
99 float PhysxPulleyJointDesc::
108 bool PhysxPulleyJointDesc::
109 get_flag(PhysxPulleyJointFlag flag)
const {
111 return (_desc.flags & flag) ? true :
false;
117 LPoint3f PhysxPulleyJointDesc::
118 get_pulley(
unsigned int idx)
const {
120 nassertr_always(idx < 2, LPoint3f::zero());
131 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 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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_stiffness(float stiffness)
Sets how stiff the constraint is, between 0 and 1 (stiffest)
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.