14 #ifndef COLLISIONTRAVERSER_H 15 #define COLLISIONTRAVERSER_H 29 class CollisionRecorder;
30 class CollisionVisualizer;
50 INLINE
void set_respect_prev_transform(
bool flag);
51 INLINE
bool get_respect_prev_transform()
const;
52 MAKE_PROPERTY(respect_preV_transform, get_respect_prev_transform,
53 set_respect_prev_transform);
54 MAKE_PROPERTY(respect_prev_transform, get_respect_prev_transform,
55 set_respect_prev_transform);
58 bool remove_collider(
const NodePath &collider);
59 bool has_collider(
const NodePath &collider)
const;
60 int get_num_colliders()
const;
62 MAKE_SEQ(get_colliders, get_num_colliders, get_collider);
64 void clear_colliders();
65 MAKE_SEQ_PROPERTY(colliders, get_num_colliders, get_collider);
69 #ifdef DO_COLLISION_RECORDING 70 void set_recorder(CollisionRecorder *recorder);
71 INLINE
bool has_recorder()
const;
72 INLINE CollisionRecorder *get_recorder()
const;
73 INLINE
void clear_recorder();
74 MAKE_PROPERTY2(recorder, has_recorder, get_recorder,
75 set_recorder, clear_recorder);
77 CollisionVisualizer *show_collisions(
const NodePath &root);
78 void hide_collisions();
79 #endif // DO_COLLISION_RECORDING 81 void output(std::ostream &out)
const;
82 void write(std::ostream &out,
int indent_level)
const;
117 class OrderedColliderDef {
124 Colliders _colliders;
126 OrderedColliders _ordered_colliders;
131 Handlers::iterator remove_handler(Handlers::iterator hi);
133 bool _respect_prev_transform;
134 #ifdef DO_COLLISION_RECORDING 135 CollisionRecorder *_recorder;
137 #endif // DO_COLLISION_RECORDING 148 PassCollectors _pass_collectors;
152 SolidCollideCollectors _solid_collide_collectors;
158 static void init_type() {
165 friend class SortByColliderSort;
168 INLINE std::ostream &operator << (std::ostream &out,
const CollisionTraverser &trav) {
The abstract interface to a number of classes that decide what to do when a collision is detected.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
This is the state information the CollisionTraverser retains for each level during traversal.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
void output(std::ostream &out) const
Outputs the Namable.
A lightweight class that represents a single element that may be timed and/or counted via stats.
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
A base class for all things which can have a name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Defines a single collision event.
A container for geometry primitives.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A node in the scene graph that can hold any number of CollisionSolids.
This class manages the traversal through the scene graph to detect collisions.
TypeHandle is the identifier used to differentiate C++ class types.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...