Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::TextureQuadRenderer Class Reference

This class provides functionality for rendering an image, a layer, or a texture onto the current render target. More...

#include <texturequadrenderer.h>

Public Member Functions

 TextureQuadRenderer (std::shared_ptr< Shader > shader)
 
 TextureQuadRenderer (Shader &&shader)
 
ShadergetShader ()
 
const ShadergetShader () const
 
void render (const Image &image, const ivec2 &pos, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders an image at position pos onto the current canvas. The image dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.
 
void render (const Image &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1))
 
void render (const std::shared_ptr< Image > &image, const ivec2 &pos, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void render (const std::shared_ptr< Image > &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1))
 
void render (const Image &image, const ivec2 &pos, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a color layer of an image at position pos onto the current canvas. The layer dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.
 
void render (const Image &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1))
 
void render (const std::shared_ptr< Image > &image, const ivec2 &pos, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void render (const std::shared_ptr< Image > &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1))
 
void render (const Layer &image, const ivec2 &pos, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a layer at position pos onto the current canvas. The layer dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner.
 
void render (const Layer &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void render (const std::shared_ptr< Layer > &image, const ivec2 &pos, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void render (const std::shared_ptr< Layer > &image, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void render (const Texture2D &texture, const ivec2 &pos, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a texture at position pos onto the current canvas. The texture dimensions determine the covered area in pixel. The anchor point of the texture is in the lower left corner.
 
void render (const Texture2D &texture, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void render (const std::shared_ptr< Texture2D > &texture, const ivec2 &pos, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void render (const std::shared_ptr< Texture2D > &texture, const std::vector< ivec2 > &pos, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void renderToRect (const Image &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders an image at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.
 
void renderToRect (const Image &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1))
 
void renderToRect (const std::shared_ptr< Image > &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void renderToRect (const std::shared_ptr< Image > &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, LayerType layerType=LayerType::Color, const mat4 &transformation=mat4(1))
 
void renderToRect (const Image &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a color layer of an image at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.
 
void renderToRect (const Image &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1))
 
void renderToRect (const std::shared_ptr< Image > &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void renderToRect (const std::shared_ptr< Image > &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, std::size_t colorLayerIndex, const mat4 &transformation=mat4(1))
 
void renderToRect (const Layer &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a layer at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the layer is in the lower left corner.
 
void renderToRect (const Layer &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void renderToRect (const std::shared_ptr< Layer > &image, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void renderToRect (const std::shared_ptr< Layer > &image, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void renderToRect (const Texture2D &texture, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a texture at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the texture is in the lower left corner.
 
void renderToRect (const Texture2D &texture, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void renderToRect (const std::shared_ptr< Texture2D > &texture, const ivec2 &pos, const ivec2 &extent, const size2_t &canvasSize, const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void renderToRect (const std::shared_ptr< Texture2D > &texture, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const mat4 &transformation=mat4(1))
 
void renderToRect (const Texture2D &texture, const std::vector< ivec2 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const std::vector< mat4 > &transformation)
 
void renderToRect3D (const Camera &camera, const Texture2D &texture, const vec3 &pos, const ivec2 &extent, const size2_t &canvasSize, const vec2 &anchor=vec2(-1.0f), const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 renders a texture at world position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the texture is defined by anchor (-1 to 1).
 
void renderToRect3D (const Camera &camera, const Texture2D &texture, const std::vector< vec3 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const vec2 &anchor=vec2(-1.0f), const mat4 &transformation=mat4(1))
 
void renderToRect3D (const Camera &camera, const std::shared_ptr< Texture2D > &texture, const vec3 &pos, const ivec2 &extent, const size2_t &canvasSize, const vec2 &anchor=vec2(-1.0f), const mat4 &transformation=mat4(1), const mat4 &texTransform=mat4(1))
 
void renderToRect3D (const Camera &camera, const std::shared_ptr< Texture2D > &texture, const std::vector< vec3 > &pos, const std::vector< ivec2 > &extent, const std::vector< mat4 > &texTransform, const size2_t &canvasSize, const vec2 &anchor=vec2(-1.0f), const mat4 &transformation=mat4(1))
 

Detailed Description

This class provides functionality for rendering an image, a layer, or a texture onto the current render target.

Member Function Documentation

◆ render() [1/4]

void inviwo::TextureQuadRenderer::render ( const Image & image,
const ivec2 & pos,
const size2_t & canvasSize,
LayerType layerType = LayerType::Color,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders an image at position pos onto the current canvas. The image dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.

Parameters
imageinput image which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
canvasSizedimensions of the current render target
layerTypedefines which layer of the input image will be rendered, i.e. Color, Depth, or Picking
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ render() [2/4]

void inviwo::TextureQuadRenderer::render ( const Image & image,
const ivec2 & pos,
const size2_t & canvasSize,
std::size_t colorLayerIndex,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a color layer of an image at position pos onto the current canvas. The layer dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.

Parameters
imageinput image which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
canvasSizedimensions of the current render target
colorLayerIndexdefines which color layer of the input image will be rendered.
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ render() [3/4]

void inviwo::TextureQuadRenderer::render ( const Layer & image,
const ivec2 & pos,
const size2_t & canvasSize,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a layer at position pos onto the current canvas. The layer dimensions determine the covered area in pixel. The anchor point of the image is in the lower left corner.

Parameters
imagelayer which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
canvasSizedimensions of the current render target
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ render() [4/4]

void inviwo::TextureQuadRenderer::render ( const Texture2D & texture,
const ivec2 & pos,
const size2_t & canvasSize,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a texture at position pos onto the current canvas. The texture dimensions determine the covered area in pixel. The anchor point of the texture is in the lower left corner.

Parameters
texturetexture which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
canvasSizedimensions of the current render target
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ renderToRect() [1/4]

void inviwo::TextureQuadRenderer::renderToRect ( const Image & image,
const ivec2 & pos,
const ivec2 & extent,
const size2_t & canvasSize,
LayerType layerType = LayerType::Color,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders an image at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.

Parameters
imageinput image which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
extentextent covered by the rendered texture in screen space coordinates
canvasSizedimensions of the current render target
layerTypedefines which layer of the input image will be rendered, i.e. Color, Depth, or Picking
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ renderToRect() [2/4]

void inviwo::TextureQuadRenderer::renderToRect ( const Image & image,
const ivec2 & pos,
const ivec2 & extent,
const size2_t & canvasSize,
std::size_t colorLayerIndex,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a color layer of an image at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the image is in the lower left corner. By default, the first color layer is rendered.

Parameters
imageinput image which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
extentextent covered by the rendered texture in screen space coordinates
canvasSizedimensions of the current render target
colorLayerIndexdefines which color layer of the input image will be rendered.
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ renderToRect() [3/4]

void inviwo::TextureQuadRenderer::renderToRect ( const Layer & image,
const ivec2 & pos,
const ivec2 & extent,
const size2_t & canvasSize,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a layer at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the layer is in the lower left corner.

Parameters
imagelayer which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
extentextent covered by the rendered texture in screen space coordinates
canvasSizedimensions of the current render target
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ renderToRect() [4/4]

void inviwo::TextureQuadRenderer::renderToRect ( const Texture2D & texture,
const ivec2 & pos,
const ivec2 & extent,
const size2_t & canvasSize,
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a texture at position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the texture is in the lower left corner.

Parameters
texturetexture which is to be rendered onto the current render target
posposition of lower left corner in screen space coordinates
extentextent covered by the rendered texture in screen space coordinates
canvasSizedimensions of the current render target
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

◆ renderToRect3D()

void inviwo::TextureQuadRenderer::renderToRect3D ( const Camera & camera,
const Texture2D & texture,
const vec3 & pos,
const ivec2 & extent,
const size2_t & canvasSize,
const vec2 & anchor = vec2(-1.0f),
const mat4 & transformation = mat4(1),
const mat4 & texTransform = mat4(1) )

renders a texture at world position pos onto the current canvas with the given extent. The covered area is defined by the extent (in pixel). The anchor point of the texture is defined by anchor (-1 to 1).

Parameters
cameracamera used for determining the screen position
texturetexture which is to be rendered onto the current render target
posposition in world coordinates
extentextent covered by the rendered texture in screen space coordinates
canvasSizedimensions of the current render target
anchoranchor position of texture (default lower left, i.e. (-1,-1))
transformationadditional transformation matrix to be applied before rendering. (For example a rotation matrix to rotate the quad)
texTransformoptional transformation for texture coordinates, e.g. for rendering a sub region of the input

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