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

Classes

struct  Impl

Public Member Functions

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