Panda3D
|
Public Types | |
enum | JointType { JT_none = 0, JT_ball, JT_hinge, JT_slider, JT_contact, JT_universal, JT_hinge2, JT_fixed, JT_null, JT_a_motor, JT_l_motor, JT_plane2d } |
Public Member Functions | |
void | attach_bodies (const OdeBody &body1, const OdeBody &body2) |
Attaches two OdeBody objects to this joint. | |
void | attach_body (const OdeBody &body, int index) |
Attaches a single OdeBody to this joint at the specified index (0 or 1). | |
int | compare_to (const OdeJoint &other) const |
OdeAMotorJoint | convert_to_a_motor () const |
OdeBallJoint | convert_to_ball () const |
OdeContactJoint | convert_to_contact () const |
OdeFixedJoint | convert_to_fixed () const |
OdeHingeJoint | convert_to_hinge () const |
OdeHinge2Joint | convert_to_hinge2 () const |
OdeLMotorJoint | convert_to_l_motor () const |
OdeNullJoint | convert_to_null () const |
OdePlane2dJoint | convert_to_plane2d () const |
OdeSliderJoint | convert_to_slider () const |
OdeUniversalJoint | convert_to_universal () const |
void | destroy () |
void | detach () |
virtual TypeHandle | force_init_type () |
OdeBody | get_body (int index) const |
OdeJointFeedback * | get_feedback () |
dJointID | get_id () const |
Returns the underlying dJointID. | |
int | get_joint_type () const |
virtual TypeHandle | get_type () const |
bool | is_empty () const |
Returns true if the ID is 0, meaning the OdeJoint does not point to a valid joint. | |
operator bool () const | |
bool | operator== (const OdeJoint &other) const |
void | set_feedback (OdeJointFeedback *) |
void | set_feedback (bool flag=true) |
virtual void | write (ostream &out=cout, unsigned int indent=0) const |
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. | |
Protected Member Functions | |
OdeJoint (dJointID id) | |
Protected Attributes | |
dJointID | _id |
Friends | |
class | OdeBody |
class | OdeUtil |
Definition at line 53 of file odeJoint.h.
void OdeJoint::attach_bodies | ( | const OdeBody & | body1, |
const OdeBody & | body2 | ||
) |
Attaches two OdeBody objects to this joint.
Order is important. Consider using the OdeJoint::attach extension function if you're using the Python interface.
Definition at line 53 of file odeJoint.cxx.
References OdeBody::get_id().
void OdeJoint::attach_body | ( | const OdeBody & | body, |
int | index | ||
) |
Attaches a single OdeBody to this joint at the specified index (0 or 1).
The other index will be set to the environment (null). Consider using the OdeJoint::attach extension function if you're using the Python interface.
Definition at line 69 of file odeJoint.cxx.
References OdeBody::get_id().
dJointID OdeJoint::get_id | ( | ) | const [inline] |
Returns the underlying dJointID.
Definition at line 34 of file odeJoint.I.
static void OdeJoint::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 TypedObject.
Reimplemented in OdeHinge2Joint, OdeUniversalJoint, OdeAMotorJoint, OdeHingeJoint, OdeSliderJoint, OdeLMotorJoint, OdeBallJoint, OdePlane2dJoint, OdeFixedJoint, OdeContactJoint, and OdeNullJoint.
Definition at line 118 of file odeJoint.h.
References TypedObject::init_type().
Referenced by OdeNullJoint::init_type(), OdeContactJoint::init_type(), OdeFixedJoint::init_type(), OdePlane2dJoint::init_type(), OdeBallJoint::init_type(), OdeLMotorJoint::init_type(), OdeSliderJoint::init_type(), OdeHingeJoint::init_type(), OdeAMotorJoint::init_type(), OdeUniversalJoint::init_type(), and OdeHinge2Joint::init_type().
bool OdeJoint::is_empty | ( | ) | const [inline] |
Returns true if the ID is 0, meaning the OdeJoint does not point to a valid joint.
It is an error to call a method on an empty joint. Note that an empty OdeJoint also evaluates to False.
Definition at line 24 of file odeJoint.I.