Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
OdeJoint Class Reference
Inheritance diagram for OdeJoint:
TypedObject MemoryBase OdeAMotorJoint OdeBallJoint OdeContactJoint OdeFixedJoint OdeHinge2Joint OdeHingeJoint OdeLMotorJoint OdeNullJoint OdePlane2dJoint OdeSliderJoint OdeUniversalJoint

List of all members.

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
OdeJointFeedbackget_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

Detailed Description

Definition at line 53 of file odeJoint.h.


Member Function Documentation

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]
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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations