Panda3D
collisionHandler.cxx
1 // Filename: collisionHandler.cxx
2 // Created by: drose (16Mar02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "collisionHandler.h"
16 
17 TypeHandle CollisionHandler::_type_handle;
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function: CollisionHandler::Constructor
21 // Access: Published
22 // Description:
23 ////////////////////////////////////////////////////////////////////
24 CollisionHandler::
25 CollisionHandler() {
26  _wants_all_potential_collidees = false;
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: CollisionHandler::begin_group
31 // Access: Public, Virtual
32 // Description: Will be called by the CollisionTraverser before a new
33 // traversal is begun. It instructs the handler to
34 // reset itself in preparation for a number of
35 // CollisionEntries to be sent.
36 ////////////////////////////////////////////////////////////////////
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: CollisionHandler::add_entry
43 // Access: Public, Virtual
44 // Description: Called between a begin_group() .. end_group()
45 // sequence for each collision that is detected.
46 ////////////////////////////////////////////////////////////////////
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: CollisionHandler::end_group
53 // Access: Public, Virtual
54 // Description: Called by the CollisionTraverser at the completion of
55 // all collision detections for this traversal. It
56 // should do whatever finalization is required for the
57 // handler.
58 //
59 // The return value is normally true, but if this
60 // returns value, the CollisionTraverser will remove the
61 // handler from its list, allowing the CollisionHandler
62 // itself to determine when it is no longer needed.
63 ////////////////////////////////////////////////////////////////////
66  return true;
67 }
virtual bool end_group()
Called by the CollisionTraverser at the completion of all collision detections for this traversal...
Defines a single collision event.
virtual void begin_group()
Will be called by the CollisionTraverser before a new traversal is begun.
virtual void add_entry(CollisionEntry *entry)
Called between a begin_group() .
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85