27 INLINE
const LVector3f get_force1()
const {
return LVector3f(f1[0], f1[1], f1[2]); };
28 INLINE
const LVector3f get_force2()
const {
return LVector3f(f2[0], f2[1], f2[2]); };
29 INLINE
const LVector3f get_torque1()
const {
return LVector3f(t1[0], t1[1], t1[2]); };
30 INLINE
const LVector3f get_torque2()
const {
return LVector3f(t2[0], t2[1], t2[2]); };
51class EXPCL_PANDAODE OdeJoint :
public TypedObject {
57 OdeJoint(dJointID
id);
60 enum JointType { JT_none = 0,
76 INLINE dJointID
get_id()
const;
80 INLINE
int get_joint_type()
const;
81 OdeBody get_body(
int index)
const;
83 INLINE
void set_feedback(
bool flag =
true);
86 EXTENSION(
void attach(PyObject *body1, PyObject *body2));
87 void attach_bodies(
const OdeBody &body1,
const OdeBody &body2);
91 virtual void write(std::ostream &out = std::cout,
unsigned int indent=0)
const;
92 INLINE
int compare_to(
const OdeJoint &other)
const;
93 INLINE
bool operator == (
const OdeJoint &other)
const;
94 operator bool ()
const;
96 EXTENSION(PyObject *convert()
const);
116 static void init_type() {
119 TypedObject::get_class_type());
122 return get_class_type();
124 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
bool is_empty() const
Returns true if the ID is 0, meaning the OdeJoint does not point to a valid joint.
void attach_body(const OdeBody &body, int index)
Attaches a single OdeBody to this joint at the specified index (0 or 1).
void attach_bodies(const OdeBody &body1, const OdeBody &body2)
Attaches two OdeBody objects to this joint.
dJointID get_id() const
Returns the underlying dJointID.
TypeHandle is the identifier used to differentiate C++ class types.
static void init_type()
This function is declared non-inline to work around a compiler bug in g++ 2.96.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.