gramods
Loading...
Searching...
No Matches
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:
Collaboration diagram for gramods::gmGraphics::TextureRenderer:

Classes

struct  Impl

Public Member Functions

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

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< Eye > eyes
 Eyes to render.

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: