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. More... | |
typedef std::function< void(const Camera &, const Eigen::Affine3f &)> | RenderFunction |
The signature of the rendering function that provides the actual graphics. More... | |
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. More... | |
![]() | |
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. More... | |
void | getNearFar (const Camera &camera, const Eigen::Affine3f &Mm, float &near, float &far) override |
Extracts the currently optimal near and far plane distances. More... | |
void | setCallback (SetupFunction func) |
Sets the callback that should be called to set up GL for rendering. More... | |
void | setCallback (RenderFunction func) |
Sets the callback that should be called upon calls to the render method. More... | |
void | setCallback (NearFarFunction func) |
Sets the callback that should be called to get optimal near and far plane distances. More... | |
![]() | |
void | addEye (Eye e) |
Add an eye to render to. More... | |
![]() | |
virtual std::vector< float > | getIntersections (const IntersectionLine &line) |
Check and return intersections between the provided line and the shape represented by this node. More... | |
virtual std::string | getDefaultKey () override |
Returns the default key, in Configuration, for the Object. More... | |
![]() | |
Object () | |
Initializes internal data. More... | |
virtual | ~Object () |
Cleaning up internal data. More... | |
virtual void | initialize () |
Called to initialize the Object. More... | |
virtual void | accept (Visitor *visitor) |
Calls the visitors apply method with this as argument. More... | |
virtual void | traverse (Visitor *visitor) |
Calls the child Object's accept method, if such exist. More... | |
bool | isInitialized () |
Returns true if the Object is initialized. More... | |
Additional Inherited Members | |
![]() | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
![]() | |
std::set< Eye > | eyes |
Eyes to render. More... | |
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.