gramods
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
gramods::gmGraphics::Renderer Class Referenceabstract

The base of graphics Renderer implementations. More...

#include <Renderer.hh>

Inheritance diagram for gramods::gmGraphics::Renderer:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::Renderer:
Collaboration graph
[legend]

Public Member Functions

virtual void render (const Camera &camera, const Eigen::Affine3f &Mm)=0
 Performs rendering of 3D objects in the scene. More...
 
virtual void getNearFar (const Camera &camera, const Eigen::Affine3f &Mm, float &near, float &far)=0
 Extracts the currently optimal near and far plane distances. More...
 
void addEye (Eye e)
 Add an eye to render to. More...
 
- 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. More...
 
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 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...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Protected Attributes

std::set< Eyeeyes
 Eyes to render. More...
 

Additional Inherited Members

- Public Types inherited from gramods::gmGraphics::Node
typedef std::vector< std::shared_ptr< Node > > list
 

Detailed Description

The base of graphics Renderer implementations.

Member Function Documentation

◆ addEye()

void gramods::gmGraphics::Renderer::addEye ( Eye  e)

Add an eye to render to.

If no eye is specified, then all eyes should be rendered.

◆ getNearFar()

virtual void gramods::gmGraphics::Renderer::getNearFar ( const Camera camera,
const Eigen::Affine3f &  Mm,
float &  near,
float &  far 
)
pure virtual

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.

Implemented in gramods::gmGraphics::TextureRenderer, gramods::gmGraphics::SphereSceneRenderer, gramods::gmGraphics::SphereRenderer, gramods::gmGraphics::OsgRenderer, gramods::gmGraphics::ObjRenderer, gramods::gmGraphics::CubeSceneRenderer, and gramods::gmGraphics::CallbackRenderer.

◆ render()

virtual void gramods::gmGraphics::Renderer::render ( const Camera camera,
const Eigen::Affine3f &  Mm 
)
pure virtual

Member Data Documentation

◆ eyes

std::set<Eye> gramods::gmGraphics::Renderer::eyes
protected

Eyes to render.

Sub classes should render consider a camera only if its eye is in this set or if the set is empty.


The documentation for this class was generated from the following files: