gramods
|
The TextureWarpedView uses a texture as 0-1 coordinates to warp the output from other views. More...
#include <TextureWarpedView.hh>
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... | |
![]() | |
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... | |
![]() | |
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 gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
![]() | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
![]() | |
void | populateViewSettings (ViewSettings &settings) |
Adds the dispatcher's local renderers and viewpoint, if set. More... | |
![]() | |
Node::list | nodes |
std::vector< std::shared_ptr< Viewpoint > > | viewpoints |
The TextureWarpedView uses a texture as 0-1 coordinates to warp the output from other views.
void gramods::gmGraphics::TextureWarpedView::addView | ( | std::shared_ptr< View > | view | ) |
Adds a view to warp.
XML-attribute: view
|
overridevirtual |
Appends local renderers to the view settings, renders the views and warps the result using the specified texture.
Reimplemented from gramods::gmGraphics::ViewBase.
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
void gramods::gmGraphics::TextureWarpedView::setTexture | ( | std::shared_ptr< TextureInterface > | tex | ) |
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
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
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.