Panda3D
|
A pulley joint simulates a rope between two objects passing over two pulleys. More...
#include "physxPulleyJoint.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
bool | get_flag (PhysxPulleyJointFlag flag) const |
Retrieves the value of a single PulleyJointFlag. | |
PhysxMotorDesc | get_motor () const |
virtual TypeHandle | get_type () const |
void | link (NxJoint *jointPtr) |
void | load_from_desc (const PhysxPulleyJointDesc &jointDesc) |
Loads the entire state of the joint from a descriptor with a single call. | |
NxJoint * | ptr () const |
void | save_to_desc (PhysxPulleyJointDesc &jointDesc) const |
Saves the state of the joint object to a descriptor. | |
void | set_flag (PhysxPulleyJointFlag flag, bool value) |
Sets or clear a single pulley joint flag. | |
void | set_motor (const PhysxMotorDesc &motor) |
Sets motor parameters for the joint. | |
void | unlink () |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. |
A pulley joint simulates a rope between two objects passing over two pulleys.
Definition at line 31 of file physxPulleyJoint.h.
bool PhysxPulleyJoint::get_flag | ( | PhysxPulleyJointFlag | flag | ) | const |
Retrieves the value of a single PulleyJointFlag.
Definition at line 145 of file physxPulleyJoint.cxx.
static void PhysxPulleyJoint::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from PhysxJoint.
Definition at line 61 of file physxPulleyJoint.h.
References PhysxJoint::init_type().
void PhysxPulleyJoint::load_from_desc | ( | const PhysxPulleyJointDesc & | jointDesc | ) |
Loads the entire state of the joint from a descriptor with a single call.
Definition at line 74 of file physxPulleyJoint.cxx.
void PhysxPulleyJoint::save_to_desc | ( | PhysxPulleyJointDesc & | jointDesc | ) | const |
Saves the state of the joint object to a descriptor.
Definition at line 61 of file physxPulleyJoint.cxx.
void PhysxPulleyJoint::set_flag | ( | PhysxPulleyJointFlag | flag, |
bool | value | ||
) |
Sets or clear a single pulley joint flag.
Definition at line 124 of file physxPulleyJoint.cxx.
void PhysxPulleyJoint::set_motor | ( | const PhysxMotorDesc & | motor | ) |
Sets motor parameters for the joint.
For a positive velTarget, the motor pulls the first body towards its pulley, for a negative velTarget, the motor pulls the second body towards its pulley.
velTarget - the relative velocity the motor is trying to achieve. The motor will only be able to reach this velocity if the maxForce is sufficiently large. If the joint is moving faster than this velocity, the motor will actually try to brake. If you set this to infinity then the motor will keep speeding up, unless there is some sort of resistance on the attached bodies.
maxForce - the maximum force the motor can exert. Zero disables the motor. Default is 0, should be >= 0. Setting this to a very large value if velTarget is also very large may not be a good idea.
freeSpin - if this flag is set, and if the joint is moving faster than velTarget, then neither braking nor additional acceleration will result. default: false.
This automatically enables the motor.
Definition at line 112 of file physxPulleyJoint.cxx.