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

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>

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

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...
 
- Public Member Functions inherited from gramods::gmGraphics::MultiscopicView
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...
 
- 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::MultiscopicView
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::MultiscopicView
std::shared_ptr< MultiscopicMultiplexermultiscopic_multiplexer
 
- Protected Attributes inherited from gramods::gmGraphics::ViewBase
Node::list nodes
 
std::vector< std::shared_ptr< Viewpoint > > viewpoints
 

Detailed Description

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.

Member Function Documentation

◆ renderFullPipeline()

void gramods::gmGraphics::TextureProjectedView::renderFullPipeline ( ViewSettings  settings,
Eye  eye 
)
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.

◆ setBufferResolution()

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

◆ setEdgeToEdge()

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

◆ setLinearInterpolation()

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

◆ setTexture()

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

Sets the Texture to use for warping coordinates.

XML-attribute: texture

◆ setWarpOffset()

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

◆ setWarpScale()

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

◆ traverse()

void gramods::gmGraphics::TextureProjectedView::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmGraphics::MultiscopicView.


The documentation for this class was generated from the following files: