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);
56 bool remove_collider(
const NodePath &collider);
57 bool has_collider(
const NodePath &collider)
const;
58 int get_num_colliders()
const;
60 MAKE_SEQ(get_colliders, get_num_colliders, get_collider);
62 void clear_colliders();
63 MAKE_SEQ_PROPERTY(colliders, get_num_colliders, get_collider);
67 #ifdef DO_COLLISION_RECORDING 68 void set_recorder(CollisionRecorder *recorder);
69 INLINE
bool has_recorder()
const;
70 INLINE CollisionRecorder *get_recorder()
const;
71 INLINE
void clear_recorder();
72 MAKE_PROPERTY2(recorder, has_recorder, get_recorder,
73 set_recorder, clear_recorder);
75 CollisionVisualizer *show_collisions(
const NodePath &root);
76 void hide_collisions();
77 #endif // DO_COLLISION_RECORDING 79 void output(std::ostream &out)
const;
80 void write(std::ostream &out,
int indent_level)
const;
115 class OrderedColliderDef {
122 Colliders _colliders;
124 OrderedColliders _ordered_colliders;
129 Handlers::iterator remove_handler(Handlers::iterator hi);
131 bool _respect_prev_transform;
132 #ifdef DO_COLLISION_RECORDING 133 CollisionRecorder *_recorder;
135 #endif // DO_COLLISION_RECORDING 146 PassCollectors _pass_collectors;
150 SolidCollideCollectors _solid_collide_collectors;
156 static void init_type() {
163 friend class SortByColliderSort;
166 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...