Panda3D
Public Member Functions | Static Public Member Functions | Friends
OdeCollisionEntry Class Reference

A class used to hold information about a collision that has occurred. More...

#include "odeCollisionEntry.h"

Inheritance diagram for OdeCollisionEntry:
TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

Public Member Functions

virtual TypeHandle force_init_type ()
OdeBody get_body1 () const
 Returns the first body in the collision.
OdeBody get_body2 () const
 Returns the second body in the collision.
OdeContactGeom get_contact_geom (size_t n) const
 Returns the nth contact geom in the collision.
LPoint3f get_contact_point (size_t n) const
 Returns the nth contact point in the collision.
OdeGeom get_geom1 () const
 Returns the first geom in the collision.
OdeGeom get_geom2 () const
 Returns the second geom in the collision.
size_t get_num_contacts () const
 Returns the number of contacts in the collision.
virtual TypeHandle get_type () const
bool is_empty () const
 Returns true if the entry holds no contacts.
 MAKE_SEQ (get_contact_points, get_num_contacts, get_contact_point)
 MAKE_SEQ (get_contact_geoms, get_num_contacts, get_contact_geom)
 operator bool () const
 An OdeCollisionEntry evaluates to False if it holds no contacts.
OdeContactGeom operator[] (size_t n) const
 Returns the nth contact geom in the collision.

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.

Friends

class OdeSpace
class OdeUtil

Detailed Description

A class used to hold information about a collision that has occurred.

Definition at line 30 of file odeCollisionEntry.h.


Member Function Documentation

Returns the first body in the collision.

Definition at line 50 of file odeCollisionEntry.I.

Returns the second body in the collision.

Definition at line 60 of file odeCollisionEntry.I.

Returns the nth contact geom in the collision.

Definition at line 80 of file odeCollisionEntry.I.

LPoint3f OdeCollisionEntry::get_contact_point ( size_t  n) const [inline]

Returns the nth contact point in the collision.

This does exactly the same as get_contact_geom(n).get_pos().

Definition at line 104 of file odeCollisionEntry.I.

References LPoint3f::zero().

Returns the first geom in the collision.

Definition at line 30 of file odeCollisionEntry.I.

Returns the second geom in the collision.

Definition at line 40 of file odeCollisionEntry.I.

size_t OdeCollisionEntry::get_num_contacts ( ) const [inline]

Returns the number of contacts in the collision.

Definition at line 70 of file odeCollisionEntry.I.

static void OdeCollisionEntry::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 TypedReferenceCount.

Definition at line 60 of file odeCollisionEntry.h.

References TypedReferenceCount::init_type().

Referenced by OdeGeom::init_type(), and OdeBody::init_type().

bool OdeCollisionEntry::is_empty ( ) const [inline]

Returns true if the entry holds no contacts.

Definition at line 126 of file odeCollisionEntry.I.

OdeCollisionEntry::operator bool ( ) const [inline]

An OdeCollisionEntry evaluates to False if it holds no contacts.

Definition at line 116 of file odeCollisionEntry.I.

OdeContactGeom OdeCollisionEntry::operator[] ( size_t  n) const [inline]

Returns the nth contact geom in the collision.

Definition at line 91 of file odeCollisionEntry.I.


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