14 #ifndef COLLISIONVISUALIZER_H 15 #define COLLISIONVISUALIZER_H 25 #ifdef DO_COLLISION_RECORDING 35 class EXPCL_PANDA_COLLIDE CollisionVisualizer :
public PandaNode,
public CollisionRecorder {
37 explicit CollisionVisualizer(
const std::string &name);
38 CollisionVisualizer(
const CollisionVisualizer ©);
39 virtual ~CollisionVisualizer();
41 INLINE
void set_point_scale(PN_stdfloat point_scale);
42 INLINE PN_stdfloat get_point_scale()
const;
44 INLINE
void set_normal_scale(PN_stdfloat normal_scale);
45 INLINE PN_stdfloat get_normal_scale()
const;
50 MAKE_PROPERTY(point_scale, get_point_scale, set_point_scale);
51 MAKE_PROPERTY(normal_scale, get_normal_scale, set_normal_scale);
58 virtual void output(std::ostream &out)
const;
61 virtual void begin_traversal();
62 virtual void collision_tested(
const CollisionEntry &entry,
bool detected);
80 class CollisionPoint {
82 LPoint3 _surface_point;
83 LVector3 _surface_normal;
84 LPoint3 _interior_point;
98 PN_stdfloat _point_scale;
99 PN_stdfloat _normal_scale;
106 static void init_type() {
107 PandaNode::init_type();
108 CollisionRecorder::init_type();
110 PandaNode::get_class_type(),
111 CollisionRecorder::get_class_type());
114 return get_class_type();
116 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
124 #endif // DO_COLLISION_RECORDING PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for all things that can collide with other things in the world,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
This collects together the pieces of data that are accumulated for each node while walking the scene ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is an abstract class that all classes which use TypeHandle, and also provide virtual functions t...
This is our own Panda specialization on the default STL vector.
Defines a single collision event.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
TypedObject * as_typed_object()
Returns the object, upcast (if necessary) to a TypedObject pointer.
TypeHandle is the identifier used to differentiate C++ class types.
This is a standard, non-reentrant mutex, similar to the Mutex class.
virtual bool is_renderable() const
Returns true if there is some value to visiting this particular node during the cull traversal for an...
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.