Panda3D
collisionTraverser.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file collisionTraverser.I
10  * @author drose
11  * @date 2002-03-16
12  */
13 
14 /**
15  * Sets the flag that indicates whether the prev_transform stored on a node
16  * (as updated via set_fluid_pos(), etc.) is respected to calculate
17  * collisions. If this is true, certain types of collision tests will be
18  * enhanced by the information about objects in motion. If this is false,
19  * objects are always considered to be static. The default is false.
20  */
21 INLINE void CollisionTraverser::
22 set_respect_prev_transform(bool flag) {
23  _respect_prev_transform = flag;
24 }
25 
26 /**
27  * Returns the flag that indicates whether the prev_transform stored on a node
28  * is respected to calculate collisions. See set_respect_prev_transform().
29  */
30 INLINE bool CollisionTraverser::
31 get_respect_prev_transform() const {
32  return _respect_prev_transform;
33 }
34 
35 #ifdef DO_COLLISION_RECORDING
36 
37 /**
38  * Returns true if the CollisionTraverser has a CollisionRecorder object
39  * currently assigned, false otherwise.
40  */
41 INLINE bool CollisionTraverser::
42 has_recorder() const {
43  return _recorder != nullptr;
44 }
45 
46 /**
47  * Returns the CollisionRecorder currently assigned, or NULL if no recorder is
48  * assigned.
49  */
50 INLINE CollisionRecorder *CollisionTraverser::
51 get_recorder() const {
52  return _recorder;
53 }
54 
55 /**
56  * Removes the CollisionRecorder from the traverser and restores normal low-
57  * overhead operation.
58  */
59 INLINE void CollisionTraverser::
60 clear_recorder() {
61  set_recorder(nullptr);
62 }
63 
64 #endif // DO_COLLISION_RECORDING
set_respect_prev_transform
Sets the flag that indicates whether the prev_transform stored on a node (as updated via set_fluid_po...