template<UnsignedInt dimensions>
Magnum::DebugTools::ShapeRenderer class

Shape renderer.

Visualizes collision shapes using wireframe primitives. See Debug renderers for more information.

Basic usage

Example code:

// Create some options
DebugTools::ResourceManager::instance().set("red",
    DebugTools::ShapeRendererOptions().setColor({1.0f, 0.0f, 0.0f}));

// Create debug renderer for given shape, use "red" options for it
Shapes::AbstractShape2D* shape;
new DebugTools::ShapeRenderer2D(shape, "red", debugDrawables);

Base classes

template<UnsignedInt dimensions, class T>
class Magnum::SceneGraph::Drawable
Drawable.

Constructors, destructors, conversion operators

ShapeRenderer(Shapes::AbstractShape<dimensions>& shape, ResourceKey options = ResourceKey(), SceneGraph::DrawableGroup<dimensions, Float>* drawables = nullptr) explicit
Constructor.

Function documentation

template<UnsignedInt dimensions>
Magnum::DebugTools::ShapeRenderer<dimensions>::ShapeRenderer(Shapes::AbstractShape<dimensions>& shape, ResourceKey options = ResourceKey(), SceneGraph::DrawableGroup<dimensions, Float>* drawables = nullptr) explicit

Constructor.

Parameters
shape Shape for which to create debug renderer
options Options resource key. See class documentation for more information.
drawables Drawable group

The renderer is automatically added to shape's object features, shape must be available for the whole lifetime of the renderer and if it is group, it must not change its internal structure.