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

Renderer for 2D axes in screen coordinates. The side to the right of the line from start to end position of the axis is defined as the "outside". As an example, consider the x axis at the bottom of a 2D plot, the outside is below the axis while the inside lies within the plot area. Mirroring the axis exchanges "outside" and "inside", that is labels and ticks will appear on the opposing side of the axis. More...

#include <axisrenderer.h>

+ Inheritance diagram for inviwo::plot::AxisRenderer:

Public Types

using Labels = detail::AxisLabels<ivec2>
 

Public Member Functions

 AxisRenderer (const AxisSettings &settings)
 
 AxisRenderer (const AxisRenderer &rhs)=delete
 
 AxisRenderer (AxisRenderer &&rhs) noexcept=default
 
AxisRendereroperator= (const AxisRenderer &rhs)=delete
 
AxisRendereroperator= (AxisRenderer &&rhs) noexcept=default
 
void render (const size2_t &outputDims, const ivec2 &startPos, const ivec2 &endPos, bool antialiasing=true)
 
std::pair< vec2, vec2 > boundingRect (const ivec2 &startPos, const ivec2 &endPos)
 
- Public Member Functions inherited from inviwo::plot::AxisRendererBase
 AxisRendererBase (const AxisSettings &settings)
 
 AxisRendererBase (const AxisRendererBase &rhs)=delete
 
 AxisRendererBase (AxisRendererBase &&rhs) noexcept=default
 
AxisRendererBaseoperator= (const AxisRendererBase &rhs)=delete
 
AxisRendererBaseoperator= (AxisRendererBase &&rhs) noexcept=default
 
void setAxisPickingId (size_t id)
 
size_t getAxisPickingId () const
 

Additional Inherited Members

- Protected Member Functions inherited from inviwo::plot::AxisRendererBase
void renderAxis (Camera *camera, const vec3 &start, const vec3 &end, const vec3 &tickdir, const size2_t &outputDims, bool antialiasing)
 
- Static Protected Member Functions inherited from inviwo::plot::AxisRendererBase
static std::shared_ptr< MeshShaderCachegetShaders ()
 
- Protected Attributes inherited from inviwo::plot::AxisRendererBase
std::reference_wrapper< const AxisSettingssettings_
 
TextRenderer textRenderer_
 
TextureQuadRenderer quadRenderer_
 
size_t axisPickingId_ = std::numeric_limits<size_t>::max()
 
detail::AxisMeshes meshes_
 
detail::AxisCaption caption_
 
std::shared_ptr< MeshShaderCacheshaders_
 

Detailed Description

Renderer for 2D axes in screen coordinates. The side to the right of the line from start to end position of the axis is defined as the "outside". As an example, consider the x axis at the bottom of a 2D plot, the outside is below the axis while the inside lies within the plot area. Mirroring the axis exchanges "outside" and "inside", that is labels and ticks will appear on the opposing side of the axis.

Member Function Documentation

◆ boundingRect()

std::pair< vec2, vec2 > inviwo::plot::AxisRenderer::boundingRect ( const ivec2 & startPos,
const ivec2 & endPos )

Returns the bounding rect (lower left, upper right) of the axis in pixels.

◆ render()

void inviwo::plot::AxisRenderer::render ( const size2_t & outputDims,
const ivec2 & startPos,
const ivec2 & endPos,
bool antialiasing = true )

Render the axis into the current framebuffer from pixel position startPos to endPos

Parameters
outputDimsDimensions of the currently bound output framebuffer
startPosStart point of the axis in 2D screen coordinates [0, outputDims)
endPosEnd point of the axis in 2D screen coordinates [0, outputDims)
antialiasingIf true, lines will be rendered using an exponential alpha fall-off at the edges and alpha blending

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