CollisionVisualizer¶

class CollisionVisualizer

This class is used to help debug the work the collisions system is doing. It shows the polygons that are detected as collisions, as well as those that are simply considered for collisions.

It may be parented anywhere in the scene graph where it will be rendered to achieve this.

Inheritance diagram

explicit CollisionVisualizer(std::string const &name)
CollisionVisualizer(CollisionVisualizer const &copy)

Copy constructor.

void clear(void)

Removes all the visualization data from a previous traversal and resets the visualizer to empty.

static TypeHandle get_class_type(void)
PN_stdfloat get_normal_scale(void) const

Returns the value last set by set_normal_scale().

PN_stdfloat get_point_scale(void) const

Returns the value last set by set_point_scale().

void set_normal_scale(PN_stdfloat normal_scale)

Scales the line segments that are drawn to represent the normals of the collisions. By default, these objects are drawn at an arbitrary scale which is appropriate if the scene units are measured in feet. Change this scale accordinatly if the scene units are measured on some other scale or if you need to observe these normals from farther away.

void set_point_scale(PN_stdfloat point_scale)

Scales the points that are drawn to represent the surface and interior intersection points of the collisions. By default, these objects are drawn at an arbitrary scale which is appropriate if the window units are the default range -1 .. 1. Change this scale accordinatly if the window units are measured on some other scale or if you need to observe these objects in a smaller window.