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

The TextureWarpedView uses a texture as 0-1 coordinates to warp the output from other views. More...

#include <TextureWarpedView.hh>

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

Classes

struct  Impl
 

Public Member Functions

void renderFullPipeline (ViewSettings settings) override
 Appends local renderers to the view settings, renders the views and warps the result using the specified texture. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
void addView (std::shared_ptr< View >)
 Adds a view to warp. More...
 
void setTexture (std::shared_ptr< TextureInterface > tex)
 Sets the Texture to use for warping coordinates. More...
 
void setEdgeToEdge (bool on)
 De/activates edge-to-edge mode. More...
 
void setWarpScale (Eigen::Vector2f scale)
 Sets a scaling to the texture values to reach outside of the texture. More...
 
void setWarpOffset (Eigen::Vector2f offset)
 Sets an offset to add to the texture values, to reach outside of the texture. More...
 
- Public Member Functions inherited from gramods::gmGraphics::ViewBase
void addNode (std::shared_ptr< Node > node)
 Adds a scenegraph to the view. More...
 
void setViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Sets the viewpoint to use in the views rendered by this ViewBase. More...
 
void addViewpoint (std::shared_ptr< Viewpoint > viewpoint)
 Adds a viewpoint to use in the views rendered by this ViewBase. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. 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::View
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 
- Static Public Attributes inherited from gramods::gmGraphics::ViewBase
static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Additional Inherited Members

- Protected Member Functions inherited from gramods::gmGraphics::ViewBase
void populateViewSettings (ViewSettings &settings)
 Adds the dispatcher's local renderers and viewpoint, if set. More...
 
- Protected Attributes inherited from gramods::gmGraphics::ViewBase
Node::list nodes
 
std::vector< std::shared_ptr< Viewpoint > > viewpoints
 

Detailed Description

The TextureWarpedView uses a texture as 0-1 coordinates to warp the output from other views.

Member Function Documentation

◆ addView()

void gramods::gmGraphics::TextureWarpedView::addView ( std::shared_ptr< View view)

Adds a view to warp.

XML-attribute: view

◆ renderFullPipeline()

void gramods::gmGraphics::TextureWarpedView::renderFullPipeline ( ViewSettings  settings)
overridevirtual

Appends local renderers to the view settings, renders the views and warps the result using the specified texture.

Reimplemented from gramods::gmGraphics::ViewBase.

◆ setEdgeToEdge()

void gramods::gmGraphics::TextureWarpedView::setEdgeToEdge ( bool  on)

De/activates edge-to-edge mode.

If set to true, the middle of the border texel values of the texture correspond to the location of the edge of the pixel buffer to render to, and a color value of (0,0) reads off the center of the first pixel on the buffer to warp. Default is false, meaning that standard OpenGL texture coordinate behavior is used, which probably is what you want if your warp texture has the same resolution as the render target buffer.

XML-attribute: edgeToEdge

◆ setTexture()

void gramods::gmGraphics::TextureWarpedView::setTexture ( std::shared_ptr< TextureInterface tex)

Sets the Texture to use for warping coordinates.

XML-attribute: texture

◆ setWarpOffset()

void gramods::gmGraphics::TextureWarpedView::setWarpOffset ( Eigen::Vector2f  offset)

Sets an offset to add to the texture values, to reach outside of the texture.

Default is [ 0, 0 ].

XML-attribute: warpOffset

◆ setWarpScale()

void gramods::gmGraphics::TextureWarpedView::setWarpScale ( Eigen::Vector2f  scale)

Sets a scaling to the texture values to reach outside of the texture.

Default is [ 1, 1 ].

XML-attribute: warpScale

◆ traverse()

void gramods::gmGraphics::TextureWarpedView::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: