|
gramods
|
A renderer that defers rendering to a callback function. More...
#include <CallbackRenderer.hh>


Public Types | |
| typedef std::function< void(void)> | SetupFunction |
| The signature of a setup function that prepares a renderer. | |
| typedef std::function< void(const Camera &, const Eigen::Affine3f &)> | RenderFunction |
| The signature of the rendering function that provides the actual graphics. | |
| typedef std::function< void(const Camera &, const Eigen::Affine3f &, float &, float &)> | NearFarFunction |
| The signature of an optional function that returns the currently optimal near and far plane distances. | |
Public Types inherited from gramods::gmGraphics::Node | |
| typedef std::vector< std::shared_ptr< Node > > | list |
Public Member Functions | |
| void | render (const Camera &camera, const Eigen::Affine3f &Mm) override |
| Performs rendering of 3D objects in the scene. | |
| void | getNearFar (const Camera &camera, const Eigen::Affine3f &Mm, float &near, float &far) override |
| Extracts the currently optimal near and far plane distances. | |
| void | setCallback (SetupFunction func) |
| Sets the callback that should be called to set up GL for rendering. | |
| void | setCallback (RenderFunction func) |
| Sets the callback that should be called upon calls to the render method. | |
| void | setCallback (NearFarFunction func) |
| Sets the callback that should be called to get optimal near and far plane distances. | |
Public Member Functions inherited from gramods::gmGraphics::Renderer | |
| void | addEye (Eye e) |
| Add an eye to render to. | |
Public Member Functions inherited from gramods::gmGraphics::Node | |
| virtual std::vector< float > | getIntersections (const IntersectionLine &line) |
| Check and return intersections between the provided line and the shape represented by this node. | |
| virtual std::string | getDefaultKey () override |
| Returns the default key, in Configuration, for the Object. | |
Public Member Functions inherited from gramods::gmCore::Object | |
| Object () | |
| Initializes internal data. | |
| virtual | ~Object () |
| Cleaning up internal data. | |
| virtual void | initialize () |
| Called to initialize the Object. | |
| virtual void | accept (Visitor *visitor) |
| Calls the visitors apply method with this as argument. | |
| virtual void | traverse (Visitor *visitor) |
| Calls the child Object's accept method, if such exist. | |
| bool | isInitialized () |
| Returns true if the Object is initialized. | |
Additional Inherited Members | |
Static Public Attributes inherited from gramods::gmGraphics::Renderer | |
| static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Protected Attributes inherited from gramods::gmGraphics::Renderer | |
| std::set< Eye > | eyes |
| Eyes to render. | |
A renderer that defers rendering to a callback function.
Typical usage:
| typedef std::function<void( const Camera &, const Eigen::Affine3f &, float &, float &)> gramods::gmGraphics::CallbackRenderer::NearFarFunction |
The signature of an optional function that returns the currently optimal near and far plane distances.
This is typically used by a View if there are multiple renderers that need to be rendered with the same near and far planes for correct depth testing.
| typedef std::function<void(const Camera &, const Eigen::Affine3f &)> gramods::gmGraphics::CallbackRenderer::RenderFunction |
The signature of the rendering function that provides the actual graphics.
| typedef std::function<void(void)> gramods::gmGraphics::CallbackRenderer::SetupFunction |
The signature of a setup function that prepares a renderer.
This is called once, the first time the render function is called by its view.
|
inlineoverridevirtual |
Extracts the currently optimal near and far plane distances.
This is typically used by a View if there are multiple renderers that need to be rendered with the same near and far planes for correct depth testing.
Implements gramods::gmGraphics::Renderer.
|
inlineoverridevirtual |
Performs rendering of 3D objects in the scene.
Implements gramods::gmGraphics::Renderer.
|
inline |
Sets the callback that should be called to get optimal near and far plane distances.
|
inline |
Sets the callback that should be called upon calls to the render method.
|
inline |
Sets the callback that should be called to set up GL for rendering.