Panda3D

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
OdeBody Class Reference
Inheritance diagram for OdeBody:

## Public Types
typedef void(* | DestroyCallback) (OdeBody &body)

## Public Member Functions
| OdeBody (dBodyID id)
| OdeBody (OdeWorld &world)
void | add_force (const LVecBase3f &f)
void | add_force (dReal fx, dReal fy, dReal fz)
void | add_force_at_pos (const LVecBase3f &f, const LVecBase3f &pos)
void | add_force_at_pos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz)
void | add_force_at_rel_pos (const LVecBase3f &f, const LVecBase3f &pos)
void | add_force_at_rel_pos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz)
void | add_rel_force (const LVecBase3f &f)
void | add_rel_force (dReal fx, dReal fy, dReal fz)
void | add_rel_force_at_pos (const LVecBase3f &f, const LVecBase3f &pos)
void | add_rel_force_at_pos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz)
void | add_rel_force_at_rel_pos (const LVecBase3f &f, const LVecBase3f &pos)
void | add_rel_force_at_rel_pos (dReal fx, dReal fy, dReal fz, dReal px, dReal py, dReal pz)
void | add_rel_torque (const LVecBase3f &f)
void | add_rel_torque (dReal fx, dReal fy, dReal fz)
void | add_torque (const LVecBase3f &f)
void | add_torque (dReal fx, dReal fy, dReal fz)
int | compare_to (const OdeBody &other) const
void | destroy ()
void | disable ()
void | enable ()
virtual TypeHandle | force_init_type ()
LVecBase3f | get_angular_vel () const
dReal | get_auto_disable_angular_threshold () const
int | get_auto_disable_flag () const
dReal | get_auto_disable_linear_threshold () const
int | get_auto_disable_steps () const
dReal | get_auto_disable_time () const
void * | get_data () const
LVecBase3f | get_finite_rotation_axis () const
int | get_finite_rotation_mode () const
int | get_gravity_mode () const
dBodyID | get_id () const
| Returns the underlying dBodyID.
OdeJoint | get_joint (int index) const
LVecBase3f | get_linear_vel () const
OdeMass | get_mass () const
int | get_num_joints () const
LPoint3f | get_point_vel (const LVecBase3f &pos) const
LPoint3f | get_point_vel (dReal px, dReal py, dReal pz) const
LPoint3f | get_pos_rel_point (const LVecBase3f &pos) const
LPoint3f | get_pos_rel_point (dReal px, dReal py, dReal pz) const
LVecBase3f | get_position () const
LVecBase4f | get_quaternion () const
LPoint3f | get_rel_point_pos (const LVecBase3f &pos) const
LPoint3f | get_rel_point_pos (dReal px, dReal py, dReal pz) const
LPoint3f | get_rel_point_vel (const LVecBase3f &pos) const
LPoint3f | get_rel_point_vel (dReal px, dReal py, dReal pz) const
LMatrix3f | get_rotation () const
virtual TypeHandle | get_type () const
bool | is_empty () const
| Returns true if the ID is 0, meaning the OdeBody does not point to a valid body.
int | is_enabled () const
| operator bool () const
void | set_angular_vel (const LVecBase3f &vel)
void | set_angular_vel (dReal x, dReal y, dReal z)
void | set_auto_disable_angular_threshold (dReal angular_threshold)
void | set_auto_disable_defaults ()
void | set_auto_disable_flag (int do_auto_disable)
void | set_auto_disable_linear_threshold (dReal linear_threshold)
void | set_auto_disable_steps (int steps)
void | set_auto_disable_time (dReal time)
void | set_data (void *data)
void | set_finite_rotation_axis (const LVecBase3f &axis)
void | set_finite_rotation_axis (dReal x, dReal y, dReal z)
void | set_finite_rotation_mode (int mode)
void | set_force (const LVecBase3f &f)
void | set_force (dReal x, dReal y, dReal z)
void | set_gravity_mode (int mode)
void | set_linear_vel (const LVecBase3f &vel)
void | set_linear_vel (dReal x, dReal y, dReal z)
void | set_mass (OdeMass &mass)
void | set_position (const LVecBase3f &pos)
void | set_position (dReal x, dReal y, dReal z)
void | set_quaternion (const LQuaternionf &q)
void | set_rotation (const LMatrix3f &r)
void | set_torque (const LVecBase3f &f)
void | set_torque (dReal x, dReal y, dReal z)
LVecBase3f | vector_from_world (const LVecBase3f &pos) const
LVecBase3f | vector_from_world (dReal px, dReal py, dReal pz) const
LVecBase3f | vector_to_world (const LVecBase3f &pos) const
LVecBase3f | vector_to_world (dReal px, dReal py, dReal pz) const
virtual void | write (std::ostream &out=std::cout, unsigned int indent=0) const
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
TypedObject * | as_typed_object ()
| Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObject * | as_typed_object () const
| Returns the object, upcast (if necessary) to a TypedObject pointer.
int | get_best_parent_from_Set (const std::set< int > &) const
int | get_type_index () const
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool | is_exact_type (TypeHandle handle) const
| Returns true if the current object is the indicated type exactly.
bool | is_of_type (TypeHandle handle) const
| Returns true if the current object is or derives from the indicated type.
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)

## Static Public Member Functions
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
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.

## Public Attributes
DestroyCallback | _destroy_callback = nullptr
| get_converted_joint
| get_joint
| get_num_joints
Public Attributes inherited from TypedObject
| get_type

## Friends
class | OdeCollisionEntry
class | OdeGeom
class | OdeJoint

## Detailed Description

Definition at line 32 of file odeBody.h.

## Member Typedef Documentation

## ◆ DestroyCallback

typedef void(* OdeBody::DestroyCallback) (OdeBody &body)

Definition at line 152 of file odeBody.h.

## Constructor & Destructor Documentation

## ◆ OdeBody() [1/2]

OdeBody::OdeBody | ( | dBodyID | id | ) |

Definition at line 20 of file odeBody.cxx.

## ◆ OdeBody() [2/2]

OdeBody::OdeBody | ( | OdeWorld & | world | ) |

Definition at line 25 of file odeBody.cxx.

## ◆ ~OdeBody()

OdeBody::~OdeBody | ( |  | ) |
| virtual

Definition at line 31 of file odeBody.cxx.

## Member Function Documentation

## ◆ add_force() [1/2]

void OdeBody::add_force | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 191 of file odeBody.I.

## ◆ add_force() [2/2]

void OdeBody::add_force | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz )
| inline

Definition at line 186 of file odeBody.I.

## ◆ add_force_at_pos() [1/2]

void OdeBody::add_force_at_pos | ( | const LVecBase3f & | f,
|  | const LVecBase3f & | pos )
| inline

Definition at line 231 of file odeBody.I.

## ◆ add_force_at_pos() [2/2]

void OdeBody::add_force_at_pos | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz,
|  | dReal | px,
|  | dReal | py,
|  | dReal | pz )
| inline

Definition at line 226 of file odeBody.I.

## ◆ add_force_at_rel_pos() [1/2]

void OdeBody::add_force_at_rel_pos | ( | const LVecBase3f & | f,
|  | const LVecBase3f & | pos )
| inline

Definition at line 241 of file odeBody.I.

## ◆ add_force_at_rel_pos() [2/2]

void OdeBody::add_force_at_rel_pos | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz,
|  | dReal | px,
|  | dReal | py,
|  | dReal | pz )
| inline

Definition at line 236 of file odeBody.I.

## ◆ add_rel_force() [1/2]

void OdeBody::add_rel_force | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 211 of file odeBody.I.

## ◆ add_rel_force() [2/2]

void OdeBody::add_rel_force | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz )
| inline

Definition at line 206 of file odeBody.I.

## ◆ add_rel_force_at_pos() [1/2]

void OdeBody::add_rel_force_at_pos | ( | const LVecBase3f & | f,
|  | const LVecBase3f & | pos )
| inline

Definition at line 251 of file odeBody.I.

## ◆ add_rel_force_at_pos() [2/2]

void OdeBody::add_rel_force_at_pos | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz,
|  | dReal | px,
|  | dReal | py,
|  | dReal | pz )
| inline

Definition at line 246 of file odeBody.I.

## ◆ add_rel_force_at_rel_pos() [1/2]

void OdeBody::add_rel_force_at_rel_pos | ( | const LVecBase3f & | f,
|  | const LVecBase3f & | pos )
| inline

Definition at line 261 of file odeBody.I.

## ◆ add_rel_force_at_rel_pos() [2/2]

void OdeBody::add_rel_force_at_rel_pos | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz,
|  | dReal | px,
|  | dReal | py,
|  | dReal | pz )
| inline

Definition at line 256 of file odeBody.I.

## ◆ add_rel_torque() [1/2]

void OdeBody::add_rel_torque | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 221 of file odeBody.I.

## ◆ add_rel_torque() [2/2]

void OdeBody::add_rel_torque | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz )
| inline

Definition at line 216 of file odeBody.I.

## ◆ add_torque() [1/2]

void OdeBody::add_torque | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 201 of file odeBody.I.

## ◆ add_torque() [2/2]

void OdeBody::add_torque | ( | dReal | fx,
|  | dReal | fy,
|  | dReal | fz )
| inline

Definition at line 196 of file odeBody.I.

## ◆ compare_to()

int OdeBody::compare_to | ( | const OdeBody & | other | ) | const
| inline

Definition at line 415 of file odeBody.I.

## ◆ destroy()

void OdeBody::destroy | ( |  | ) |

Definition at line 35 of file odeBody.cxx.

## ◆ disable()

void OdeBody::disable | ( |  | ) |
| inline

Definition at line 395 of file odeBody.I.

## ◆ enable()

void OdeBody::enable | ( |  | ) |
| inline

Definition at line 390 of file odeBody.I.

## ◆ force_init_type()

virtual TypeHandle OdeBody::force_init_type | ( |  | ) |
| inline virtual

Implements TypedObject.

Definition at line 167 of file odeBody.h.

## ◆ get_angular_vel()

LVecBase3f OdeBody::get_angular_vel | ( |  | ) | const
| inline

Definition at line 168 of file odeBody.I.

## ◆ get_auto_disable_angular_threshold()

dReal OdeBody::get_auto_disable_angular_threshold | ( |  | ) | const
| inline

Definition at line 42 of file odeBody.I.

## ◆ get_auto_disable_flag()

int OdeBody::get_auto_disable_flag | ( |  | ) | const
| inline

Definition at line 72 of file odeBody.I.

## ◆ get_auto_disable_linear_threshold()

dReal OdeBody::get_auto_disable_linear_threshold | ( |  | ) | const
| inline

Definition at line 32 of file odeBody.I.

## ◆ get_auto_disable_steps()

int OdeBody::get_auto_disable_steps | ( |  | ) | const
| inline

Definition at line 52 of file odeBody.I.

## ◆ get_auto_disable_time()

dReal OdeBody::get_auto_disable_time | ( |  | ) | const
| inline

Definition at line 62 of file odeBody.I.

## ◆ get_class_type()

static TypeHandle OdeBody::get_class_type | ( |  | ) |
| inline static

Definition at line 156 of file odeBody.h.

## ◆ get_data()

void * OdeBody::get_data | ( |  | ) | const
| inline

Definition at line 92 of file odeBody.I.

## ◆ get_finite_rotation_axis()

LVecBase3f OdeBody::get_finite_rotation_axis | ( |  | ) | const
| inline

Definition at line 378 of file odeBody.I.

## ◆ get_finite_rotation_mode()

int OdeBody::get_finite_rotation_mode | ( |  | ) | const
| inline

Definition at line 373 of file odeBody.I.

## ◆ get_gravity_mode()

int OdeBody::get_gravity_mode | ( |  | ) | const
| inline

Definition at line 410 of file odeBody.I.

## ◆ get_id()

dBodyID OdeBody::get_id | ( |  | ) | const
| inline

Returns the underlying dBodyID.

Definition at line 27 of file odeBody.I.

Referenced by OdeUtil::are_connected(), OdeUtil::are_connected_excluding(), OdeJoint::attach_bodies(), OdeJoint::attach_body(), OdeUtil::get_connecting_joint(), and OdeUtil::get_connecting_joint_list().

## ◆ get_linear_vel()

LVecBase3f OdeBody::get_linear_vel | ( |  | ) | const
| inline

Definition at line 162 of file odeBody.I.

## ◆ get_mass()

OdeMass OdeBody::get_mass | ( |  | ) | const
| inline

Definition at line 179 of file odeBody.I.

## ◆ get_point_vel() [1/2]

LPoint3f OdeBody::get_point_vel | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 317 of file odeBody.I.

## ◆ get_point_vel() [2/2]

LPoint3f OdeBody::get_point_vel | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 310 of file odeBody.I.

## ◆ get_pos_rel_point() [1/2]

LPoint3f OdeBody::get_pos_rel_point | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 329 of file odeBody.I.

## ◆ get_pos_rel_point() [2/2]

LPoint3f OdeBody::get_pos_rel_point | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 322 of file odeBody.I.

## ◆ get_position()

LVecBase3f OdeBody::get_position | ( |  | ) | const
| inline

Definition at line 142 of file odeBody.I.

## ◆ get_quaternion()

LVecBase4f OdeBody::get_quaternion | ( |  | ) | const
| inline

Definition at line 156 of file odeBody.I.

## ◆ get_rel_point_pos() [1/2]

LPoint3f OdeBody::get_rel_point_pos | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 293 of file odeBody.I.

## ◆ get_rel_point_pos() [2/2]

LPoint3f OdeBody::get_rel_point_pos | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 286 of file odeBody.I.

## ◆ get_rel_point_vel() [1/2]

LPoint3f OdeBody::get_rel_point_vel | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 305 of file odeBody.I.

## ◆ get_rel_point_vel() [2/2]

LPoint3f OdeBody::get_rel_point_vel | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 298 of file odeBody.I.

## ◆ get_rotation()

LMatrix3f OdeBody::get_rotation | ( |  | ) | const
| inline

Definition at line 148 of file odeBody.I.

## ◆ get_type()

virtual TypeHandle OdeBody::get_type | ( |  | ) | const
| inline virtual

Implements TypedObject.

Definition at line 164 of file odeBody.h.

## ◆ init_type()

static void OdeBody::init_type | ( |  | ) |
| inline static

Definition at line 159 of file odeBody.h.

## ◆ is_empty()

bool OdeBody::is_empty | ( |  | ) | const
| inline

Returns true if the ID is 0, meaning the OdeBody does not point to a valid body.

It is an error to call a method on an empty body. Note that an empty OdeBody also evaluates to False.

Definition at line 19 of file odeBody.I.

## ◆ is_enabled()

int OdeBody::is_enabled | ( |  | ) | const
| inline

Definition at line 400 of file odeBody.I.

## ◆ operator bool()

OdeBody::operator bool | ( |  | ) | const

Definition at line 59 of file odeBody.cxx.

## ◆ set_angular_vel() [1/2]

void OdeBody::set_angular_vel | ( | const LVecBase3f & | vel | ) |
| inline

Definition at line 137 of file odeBody.I.

## ◆ set_angular_vel() [2/2]

void OdeBody::set_angular_vel | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 132 of file odeBody.I.

## ◆ set_auto_disable_angular_threshold()

void OdeBody::set_auto_disable_angular_threshold | ( | dReal | angular_threshold | ) |
| inline

Definition at line 47 of file odeBody.I.

## ◆ set_auto_disable_defaults()

void OdeBody::set_auto_disable_defaults | ( |  | ) |
| inline

Definition at line 82 of file odeBody.I.

## ◆ set_auto_disable_flag()

void OdeBody::set_auto_disable_flag | ( | int | do_auto_disable | ) |
| inline

Definition at line 77 of file odeBody.I.

## ◆ set_auto_disable_linear_threshold()

void OdeBody::set_auto_disable_linear_threshold | ( | dReal | linear_threshold | ) |
| inline

Definition at line 37 of file odeBody.I.

## ◆ set_auto_disable_steps()

void OdeBody::set_auto_disable_steps | ( | int | steps | ) |
| inline

Definition at line 57 of file odeBody.I.

## ◆ set_auto_disable_time()

void OdeBody::set_auto_disable_time | ( | dReal | time | ) |
| inline

Definition at line 67 of file odeBody.I.

## ◆ set_data()

void OdeBody::set_data | ( | void * | data | ) |
| inline

Definition at line 87 of file odeBody.I.

## ◆ set_finite_rotation_axis() [1/2]

void OdeBody::set_finite_rotation_axis | ( | const LVecBase3f & | axis | ) |
| inline

Definition at line 368 of file odeBody.I.

## ◆ set_finite_rotation_axis() [2/2]

void OdeBody::set_finite_rotation_axis | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 363 of file odeBody.I.

## ◆ set_finite_rotation_mode()

void OdeBody::set_finite_rotation_mode | ( | int | mode | ) |
| inline

Definition at line 358 of file odeBody.I.

## ◆ set_force() [1/2]

void OdeBody::set_force | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 271 of file odeBody.I.

## ◆ set_force() [2/2]

void OdeBody::set_force | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 266 of file odeBody.I.

## ◆ set_gravity_mode()

void OdeBody::set_gravity_mode | ( | int | mode | ) |
| inline

Definition at line 405 of file odeBody.I.

## ◆ set_linear_vel() [1/2]

void OdeBody::set_linear_vel | ( | const LVecBase3f & | vel | ) |
| inline

Definition at line 127 of file odeBody.I.

## ◆ set_linear_vel() [2/2]

void OdeBody::set_linear_vel | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 122 of file odeBody.I.

## ◆ set_mass()

void OdeBody::set_mass | ( | OdeMass & | mass | ) |
| inline

Definition at line 174 of file odeBody.I.

## ◆ set_position() [1/2]

void OdeBody::set_position | ( | const LVecBase3f & | pos | ) |
| inline

Definition at line 102 of file odeBody.I.

## ◆ set_position() [2/2]

void OdeBody::set_position | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 97 of file odeBody.I.

## ◆ set_quaternion()

void OdeBody::set_quaternion | ( | const LQuaternionf & | q | ) |
| inline

Definition at line 116 of file odeBody.I.

## ◆ set_rotation()

void OdeBody::set_rotation | ( | const LMatrix3f & | r | ) |
| inline

Definition at line 107 of file odeBody.I.

## ◆ set_torque() [1/2]

void OdeBody::set_torque | ( | const LVecBase3f & | f | ) |
| inline

Definition at line 281 of file odeBody.I.

## ◆ set_torque() [2/2]

void OdeBody::set_torque | ( | dReal | x,
|  | dReal | y,
|  | dReal | z )
| inline

Definition at line 276 of file odeBody.I.

## ◆ vector_from_world() [1/2]

LVecBase3f OdeBody::vector_from_world | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 353 of file odeBody.I.

## ◆ vector_from_world() [2/2]

LVecBase3f OdeBody::vector_from_world | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 346 of file odeBody.I.

## ◆ vector_to_world() [1/2]

LVecBase3f OdeBody::vector_to_world | ( | const LVecBase3f & | pos | ) | const
| inline

Definition at line 341 of file odeBody.I.

## ◆ vector_to_world() [2/2]

LVecBase3f OdeBody::vector_to_world | ( | dReal | px,
|  | dReal | py,
|  | dReal | pz ) const
| inline

Definition at line 334 of file odeBody.I.

## ◆ write()

void OdeBody::write | ( | std::ostream & | out = std::cout,
|  | unsigned int | indent = 0 ) const
| virtual

Definition at line 52 of file odeBody.cxx.

## Friends And Related Symbol Documentation

## ◆ OdeCollisionEntry

friend class OdeCollisionEntry
| friend

Definition at line 35 of file odeBody.h.

## ◆ OdeGeom

friend class OdeGeom
| friend

Definition at line 34 of file odeBody.h.

## ◆ OdeJoint

friend class OdeJoint
| friend

Definition at line 33 of file odeBody.h.

## Member Data Documentation

## ◆ _destroy_callback

DestroyCallback OdeBody::_destroy_callback = nullptr

Definition at line 153 of file odeBody.h.

## ◆ get_converted_joint

OdeBody::get_converted_joint

Definition at line 136 of file odeBody.h.

## ◆ get_joint

OdeJoint OdeBody::get_joint

Definition at line 134 of file odeBody.h.

## ◆ get_num_joints

int OdeBody::get_num_joints
| inline

Definition at line 134 of file odeBody.h.

The documentation for this class was generated from the following files:

- panda/src/ode/odeBody.h
- panda/src/ode/odeBody.cxx
- panda/src/ode/odeBody.I