Panda3D
|
00001 // Filename: collisionHandler.cxx 00002 // Created by: drose (16Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "collisionHandler.h" 00016 00017 TypeHandle CollisionHandler::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: CollisionHandler::Constructor 00021 // Access: Published 00022 // Description: 00023 //////////////////////////////////////////////////////////////////// 00024 CollisionHandler:: 00025 CollisionHandler() { 00026 _wants_all_potential_collidees = false; 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: CollisionHandler::begin_group 00031 // Access: Public, Virtual 00032 // Description: Will be called by the CollisionTraverser before a new 00033 // traversal is begun. It instructs the handler to 00034 // reset itself in preparation for a number of 00035 // CollisionEntries to be sent. 00036 //////////////////////////////////////////////////////////////////// 00037 void CollisionHandler:: 00038 begin_group() { 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: CollisionHandler::add_entry 00043 // Access: Public, Virtual 00044 // Description: Called between a begin_group() .. end_group() 00045 // sequence for each collision that is detected. 00046 //////////////////////////////////////////////////////////////////// 00047 void CollisionHandler:: 00048 add_entry(CollisionEntry *) { 00049 } 00050 00051 //////////////////////////////////////////////////////////////////// 00052 // Function: CollisionHandler::end_group 00053 // Access: Public, Virtual 00054 // Description: Called by the CollisionTraverser at the completion of 00055 // all collision detections for this traversal. It 00056 // should do whatever finalization is required for the 00057 // handler. 00058 // 00059 // The return value is normally true, but if this 00060 // returns value, the CollisionTraverser will remove the 00061 // handler from its list, allowing the CollisionHandler 00062 // itself to determine when it is no longer needed. 00063 //////////////////////////////////////////////////////////////////// 00064 bool CollisionHandler:: 00065 end_group() { 00066 return true; 00067 }