Panda3D
 All Classes Functions Variables Enumerations
collisionTraverser.I
00001 // Filename: collisionTraverser.I
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 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: CollisionTraverser::set_respect_prev_transform
00018 //       Access: Published
00019 //  Description: Sets the flag that indicates whether the
00020 //               prev_transform stored on a node (as updated via
00021 //               set_fluid_pos(), etc.) is respected to calculate
00022 //               collisions.  If this is true, certain types of
00023 //               collision tests will be enhanced by the information
00024 //               about objects in motion.  If this is false, objects
00025 //               are always considered to be static.  The default is
00026 //               false.
00027 ////////////////////////////////////////////////////////////////////
00028 INLINE void CollisionTraverser::
00029 set_respect_prev_transform(bool flag) {
00030   _respect_prev_transform = flag;
00031 }
00032 
00033 ////////////////////////////////////////////////////////////////////
00034 //     Function: CollisionTraverser::get_respect_prev_transform
00035 //       Access: Published
00036 //  Description: Returns the flag that indicates whether the
00037 //               prev_transform stored on a node is respected to
00038 //               calculate collisions.  See
00039 //               set_respect_prev_transform().
00040 ////////////////////////////////////////////////////////////////////
00041 INLINE bool CollisionTraverser::
00042 get_respect_prev_transform() const {
00043   return _respect_prev_transform;
00044 }
00045 
00046 #ifdef DO_COLLISION_RECORDING
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 //     Function: CollisionTraverser::has_recorder
00050 //       Access: Published
00051 //  Description: Returns true if the CollisionTraverser has a
00052 //               CollisionRecorder object currently assigned, false
00053 //               otherwise.
00054 ////////////////////////////////////////////////////////////////////
00055 INLINE bool CollisionTraverser::
00056 has_recorder() const {
00057   return _recorder != (CollisionRecorder *)NULL;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: CollisionTraverser::get_recorder
00062 //       Access: Published
00063 //  Description: Returns the CollisionRecorder currently assigned, or
00064 //               NULL if no recorder is assigned.
00065 ////////////////////////////////////////////////////////////////////
00066 INLINE CollisionRecorder *CollisionTraverser::
00067 get_recorder() const {
00068   return _recorder;
00069 }
00070 
00071 ////////////////////////////////////////////////////////////////////
00072 //     Function: CollisionTraverser::clear_recorder
00073 //       Access: Published
00074 //  Description: Removes the CollisionRecorder from the traverser and
00075 //               restores normal low-overhead operation.
00076 ////////////////////////////////////////////////////////////////////
00077 INLINE void CollisionTraverser::
00078 clear_recorder() {
00079   set_recorder((CollisionRecorder *)NULL);
00080 }
00081 
00082 #endif  // DO_COLLISION_RECORDING
 All Classes Functions Variables Enumerations