# panda3d.core.CollisionVisualizer¶

from panda3d.core import 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

__init__(copy: CollisionVisualizer) → None

Copy constructor.

__init__(name: str) → None
setPointScale(point_scale: float) → None

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.

getPointScale() → float

Returns the value last set by setPointScale().

setNormalScale(normal_scale: float) → None

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.

getNormalScale() → float

Returns the value last set by setNormalScale().

clear() → None

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

static getClassType() → TypeHandle
Return type

TypeHandle

property point_scale
Getter

Returns the value last set by setPointScale().

Setter

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.

Return type

float

property normal_scale
Getter

Returns the value last set by setNormalScale().

Setter

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.

Return type

float