gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmGraphics::TextureRenderer Class Reference

A renderer that renders a texture flat (2D) filling the view, thereby ignoring camera and view specific projection. More...

#include <TextureRenderer.hh>

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

Classes

struct  Impl
 

Public Member Functions

void render (const Camera &camera, const Eigen::Affine3f &Mm) override
 Performs rendering of 3D objects in the scene. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. 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 setTexture (std::shared_ptr< TextureInterface > tex)
 Sets the Texture that should be called upon calls to the render method. More...
 
void setFlip (bool on)
 Flip the image up-down for upside-down textures. 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...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Static Public Attributes inherited from gramods::gmGraphics::Renderer
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Additional Inherited Members

- Public Types inherited from gramods::gmGraphics::Node
typedef std::vector< std::shared_ptr< Node > > list
 
- Protected Attributes inherited from gramods::gmGraphics::Renderer
std::set< Eyeeyes
 Eyes to render. More...
 

Detailed Description

A renderer that renders a texture flat (2D) filling the view, thereby ignoring camera and view specific projection.

Member Function Documentation

◆ getNearFar()

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

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.

◆ render()

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

Performs rendering of 3D objects in the scene.

Implements gramods::gmGraphics::Renderer.

◆ setFlip()

void gramods::gmGraphics::TextureRenderer::setFlip ( bool  on)

Flip the image up-down for upside-down textures.

XML-attribute: flip

◆ setTexture()

gramods::gmCore::OFactory::PointerSetterInsert gm_ofi_TextureRenderer_pointer_texture &TextureRenderer::_gm_ofi(& gramods::gmGraphics::TextureRenderer::setTexture ( std::shared_ptr< TextureInterface tex)
inline

Sets the Texture that should be called upon calls to the render method.

XML-attribute: texture

◆ traverse()

void gramods::gmGraphics::TextureRenderer::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.


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