Inviwo 0.9.12-pre
Inviwo documentation
|
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>
Public Types | |
using | Labels = detail::AxisLabels<ivec2> |
Public Member Functions | |
AxisRenderer (const AxisSettings &settings) | |
AxisRenderer (const AxisRenderer &rhs)=delete | |
AxisRenderer (AxisRenderer &&rhs) noexcept=default | |
AxisRenderer & | operator= (const AxisRenderer &rhs)=delete |
AxisRenderer & | operator= (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 | |
AxisRendererBase & | operator= (const AxisRendererBase &rhs)=delete |
AxisRendererBase & | operator= (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< MeshShaderCache > | getShaders () |
Protected Attributes inherited from inviwo::plot::AxisRendererBase | |
std::reference_wrapper< const AxisSettings > | settings_ |
TextRenderer | textRenderer_ |
TextureQuadRenderer | quadRenderer_ |
size_t | axisPickingId_ = std::numeric_limits<size_t>::max() |
detail::AxisMeshes | meshes_ |
detail::AxisCaption | caption_ |
std::shared_ptr< MeshShaderCache > | shaders_ |
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.
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.
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
outputDims | Dimensions of the currently bound output framebuffer |
startPos | Start point of the axis in 2D screen coordinates [0, outputDims) |
endPos | End point of the axis in 2D screen coordinates [0, outputDims) |
antialiasing | If true, lines will be rendered using an exponential alpha fall-off at the edges and alpha blending |