gramods
Classes | Public Member Functions | List of all members
gramods::gmGraphics::OsgRenderer Class Reference

A renderer that renders an OpenSceneGraph scenegraph. More...

#include <OsgRenderer.hh>

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

Classes

struct  Impl
 

Public Member Functions

void setFrameNumber (unsigned int n)
 Sets the current frame number. More...
 
void render (const Camera &camera, const Eigen::Affine3f &Mm) override
 Calls the scenegraph root for rendering. 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 setSceneData (osg::Node *node)
 Sets the scenegraph. More...
 
void update (clock::time_point time, size_t frame) override
 Called to make the object up-to-date. More...
 
- Public Member Functions inherited from gramods::gmGraphics::Renderer
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...
 
- Public Member Functions inherited from gramods::gmCore::Updateable
 Updateable (int priority=0)
 Configures the Updateable properties to the specified priority. More...
 

Additional Inherited Members

- Public Types inherited from gramods::gmGraphics::Node
typedef std::vector< std::shared_ptr< Node > > list
 
- Public Types inherited from gramods::gmCore::Updateable
typedef std::chrono::steady_clock clock
 
- Static Public Member Functions inherited from gramods::gmCore::Updateable
static void updateAll (clock::time_point t=clock::now(), std::optional< size_t > frame=std::nullopt)
 Updates all currently instanciated updateable objects. More...
 
- Static Public Attributes inherited from gramods::gmGraphics::Renderer
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Protected Attributes inherited from gramods::gmGraphics::Renderer
std::set< Eyeeyes
 Eyes to render. More...
 

Detailed Description

A renderer that renders an OpenSceneGraph scenegraph.

Member Function Documentation

◆ getNearFar()

void gramods::gmGraphics::OsgRenderer::getNearFar ( const Camera camera,
const Eigen::Affine3f &  Mm,
float &  near,
float &  far 
)
overridevirtual

Extracts the currently optimal near and far plane distances.

Implements gramods::gmGraphics::Renderer.

◆ render()

void gramods::gmGraphics::OsgRenderer::render ( const Camera camera,
const Eigen::Affine3f &  Mm 
)
overridevirtual

Calls the scenegraph root for rendering.

Implements gramods::gmGraphics::Renderer.

◆ setFrameNumber()

void gramods::gmGraphics::OsgRenderer::setFrameNumber ( unsigned int  n)

Sets the current frame number.

This is propagated to the OSG viewer to be used for example in animation updates. This is automatically incremented if not set.

◆ setSceneData()

void gramods::gmGraphics::OsgRenderer::setSceneData ( osg::Node *  node)

Sets the scenegraph.

◆ update()

void gramods::gmGraphics::OsgRenderer::update ( clock::time_point  time,
size_t  frame 
)
overridevirtual

Called to make the object up-to-date.

Implements gramods::gmCore::Updateable.


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