gramods
|
The TextureProjectedView uses a texture to define the 3D position of each render target buffer pixel, and then projects the specified renderers onto this "surface", from the viewpoint. More...
#include <TextureProjectedView.hh>
Classes | |
struct | Impl |
Public Member Functions | |
void | setBufferResolution (gmCore::size2 R) |
Sets the resolution of the intermediate buffer, in pixels. More... | |
void | setLinearInterpolation (bool on) |
Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space. More... | |
void | renderFullPipeline (ViewSettings settings, Eye eye) override |
Appends local renderers to the view settings, renders the views and projects the result onto the texture's "surface", from the viewpoint. More... | |
void | traverse (Visitor *visitor) override |
Propagates the specified visitor. 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::Vector3f scale) |
Sets a scaling to the texture values, so that the 3D position is calculated by p' = p * scale + offset. More... | |
void | setWarpOffset (Eigen::Vector3f offset) |
Sets an offset to add to the texture values, so that the 3D position is calculated by p' = p * scale + offset. More... | |
![]() | |
void | renderFullPipeline (ViewSettings settings) override final |
Dispatches specified renders, both method argument and class members. More... | |
void | setMultiscopicMultiplexer (std::shared_ptr< MultiscopicMultiplexer > sm) |
Sets the multiscopic multiplexing to use for rendering. 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 |
![]() | |
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... | |
![]() | |
std::shared_ptr< MultiscopicMultiplexer > | multiscopic_multiplexer |
![]() | |
Node::list | nodes |
std::vector< std::shared_ptr< Viewpoint > > | viewpoints |
The TextureProjectedView uses a texture to define the 3D position of each render target buffer pixel, and then projects the specified renderers onto this "surface", from the viewpoint.
This is useful for rendering a dynamic view on a static projection surface.
|
overridevirtual |
Appends local renderers to the view settings, renders the views and projects the result onto the texture's "surface", from the viewpoint.
Implements gramods::gmGraphics::MultiscopicView.
void gramods::gmGraphics::TextureProjectedView::setBufferResolution | ( | gmCore::size2 | R | ) |
Sets the resolution of the intermediate buffer, in pixels.
Default is 2048 x 2048.
XML-attribute: bufferResolution
void gramods::gmGraphics::TextureProjectedView::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. Default is false, meaning that standard OpenGL texture coordinate behavior is used, which probably is what you want if your texture has the same resolution as the render target buffer.
XML-attribute: edgeToEdge
void gramods::gmGraphics::TextureProjectedView::setLinearInterpolation | ( | bool | on | ) |
Turn on or off linear interpolation in the projection from linear graphics to non-linear projection space.
Default is off.
XML-attribute: linearInterpolation
void gramods::gmGraphics::TextureProjectedView::setTexture | ( | std::shared_ptr< TextureInterface > | tex | ) |
void gramods::gmGraphics::TextureProjectedView::setWarpOffset | ( | Eigen::Vector3f | offset | ) |
Sets an offset to add to the texture values, so that the 3D position is calculated by p' = p * scale + offset.
Default is [ 0, 0, 0 ].
XML-attribute: warpOffset
void gramods::gmGraphics::TextureProjectedView::setWarpScale | ( | Eigen::Vector3f | scale | ) |
Sets a scaling to the texture values, so that the 3D position is calculated by p' = p * scale + offset.
Default is [ 1, 1, 1 ].
XML-attribute: warpScale
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmGraphics::MultiscopicView.