Panda3D
|
A specialized kind of CollisionHandler that throws an event for each collision detected. More...
#include "collisionHandlerHighestEvent.h"
Public Member Functions | |
CollisionHandlerHighestEvent () | |
The default CollisionHandlerEvent will throw no events. | |
virtual void | add_entry (CollisionEntry *entry) |
Called between a begin_group() . | |
virtual void | begin_group () |
Will be called by the CollisionTraverser before a new traversal is begun. | |
virtual bool | end_group () |
Called by the CollisionTraverser at the completion of all collision detections for this traversal. | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () 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. |
A specialized kind of CollisionHandler that throws an event for each collision detected.
The event thrown may be based on the name of the moving object or the struck object, or both. The first parameter of the event will be a pointer to the CollisionEntry that triggered it.
Definition at line 36 of file collisionHandlerHighestEvent.h.
CollisionHandlerHighestEvent::CollisionHandlerHighestEvent | ( | ) |
The default CollisionHandlerEvent will throw no events.
Its pattern strings must first be set via a call to add_in_pattern() and/or add_out_pattern().
Definition at line 33 of file collisionHandlerHighestEvent.cxx.
void CollisionHandlerHighestEvent::add_entry | ( | CollisionEntry * | entry | ) | [virtual] |
Called between a begin_group() .
. end_group() sequence for each collision that is detected.
Reimplemented from CollisionHandlerEvent.
Definition at line 66 of file collisionHandlerHighestEvent.cxx.
References CollisionEntry::get_from(), CollisionEntry::get_from_node_path(), CollisionEntry::get_surface_point(), and LVecBase3f::length_squared().
void CollisionHandlerHighestEvent::begin_group | ( | ) | [virtual] |
Will be called by the CollisionTraverser before a new traversal is begun.
It instructs the handler to reset itself in preparation for a number of CollisionEntries to be sent.
Reimplemented from CollisionHandlerEvent.
Definition at line 45 of file collisionHandlerHighestEvent.cxx.
bool CollisionHandlerHighestEvent::end_group | ( | ) | [virtual] |
Called by the CollisionTraverser at the completion of all collision detections for this traversal.
It should do whatever finalization is required for the handler.
Reimplemented from CollisionHandlerEvent.
Definition at line 87 of file collisionHandlerHighestEvent.cxx.
static void CollisionHandlerHighestEvent::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 CollisionHandlerEvent.
Definition at line 53 of file collisionHandlerHighestEvent.h.
References CollisionHandler::init_type().