template<UnsignedInt dimensions>
ObjectRenderer class
Object renderer.
Contents
Visualizes object position, rotation and scale using colored axes. See Debug renderers for more information.
Basic usage
Example code:
// Create some options DebugTools::ResourceManager::instance().set("my", DebugTools::ObjectRendererOptions().setSize(0.3f)); // Create debug renderer for given object, use "my" options for it Object3D* object; new DebugTools::ObjectRenderer2D(object, "my", debugDrawables);
Base classes
-
template<UnsignedInt dimensions, class T>class Magnum::SceneGraph::Drawable
- Drawable.
Constructors, destructors, conversion operators
-
ObjectRenderer(SceneGraph::
AbstractObject<dimensions, Float>& object, ResourceKey options = ResourceKey(), SceneGraph:: DrawableGroup<dimensions, Float>* drawables = nullptr) explicit - Constructor.
Private functions
-
void draw(const MatrixTypeFor<dimensions, Float>& transformationMatrix,
SceneGraph::
Camera<dimensions, Float>& camera) override virtual - Draw the object using given camera.
Function documentation
template<UnsignedInt dimensions>
Magnum:: DebugTools:: ObjectRenderer<dimensions>:: ObjectRenderer(SceneGraph:: AbstractObject<dimensions, Float>& object,
ResourceKey options = ResourceKey(),
SceneGraph:: DrawableGroup<dimensions, Float>* drawables = nullptr) explicit
Constructor.
Parameters | |
---|---|
object | Object 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 object's features.
template<UnsignedInt dimensions>
void Magnum:: DebugTools:: ObjectRenderer<dimensions>:: draw(const MatrixTypeFor<dimensions, Float>& transformationMatrix,
SceneGraph:: Camera<dimensions, Float>& camera) override virtual private
Draw the object using given camera.
Parameters | |
---|---|
transformationMatrix | Object transformation relative to camera |
camera | Camera |
Projection matrix can be retrieved from Camera::