ome-qtwidgets 5.3.2

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ome::qtwidgets::gl::Axis2D Class Referenceabstract

2D (xy) axis renderer. More...

`#include <ome/qtwidgets/gl/Axis2D.h>`

Inheritance diagram for ome::qtwidgets::gl::Axis2D:
[legend]
Collaboration diagram for ome::qtwidgets::gl::Axis2D:
[legend]

## Public Member Functions
| Axis2D (ome::compat::shared_ptr< ome::files::FormatReader > reader, ome::files::dimension_size_type series, QObject *parent=0)
| Create a 2D axis. More...
virtual | ~Axis2D ()=0
| Destructor.
virtual void | create ()
| Create GL buffers. More...
virtual void | render (const glm::mat4 &mvp)=0
| Render the axis. More...

## Protected Member Functions
virtual void | setSize (glm::vec2 xlim, glm::vec2 ylim, glm::vec2 soff, glm::vec2 slim)
| Set the size of the x and y axes. More...

## Protected Attributes
QOpenGLVertexArrayObject | vertices
| The vertex array.
QOpenGLBuffer | xaxis_vertices
| The vertices for the x axis.
QOpenGLBuffer | yaxis_vertices
| The vertices for the y axis.
QOpenGLBuffer | axis_elements
| The elements for both axes.
ome::compat::shared_ptr< ome::files::FormatReader > | reader
| The image reader.
ome::files::dimension_size_type | series
| The image series.

## Detailed Description

2D (xy) axis renderer.

Draws x and y axes for the specified image.

## Constructor & Destructor Documentation

## § Axis2D()

ome::qtwidgets::gl::Axis2D::Axis2D | ( | ome::compat::shared_ptr< ome::files::FormatReader > | reader,
|  | ome::files::dimension_size_type | series,
|  | QObject * | parent = `0`
| ) |  |
| explicit

Create a 2D axis.

The size and position will be taken from the specified image.

Parameters

  reader | the image reader.
  series | the image series.
  parent | the parent of this object.

## Member Function Documentation

## § create()

void ome::qtwidgets::gl::Axis2D::create | ( |  | ) |
| virtual

Create GL buffers.

Note
  Requires a valid GL context. Must be called before rendering.

References reader, series, and setSize().

Referenced by ome::qtwidgets::GLView2D::initialize().

Here is the caller graph for this function:

## § render()

virtual void ome::qtwidgets::gl::Axis2D::render | ( | const glm::mat4 & | mvp | ) |
| pure virtual

Render the axis.

Parameters

  mvp | the model view projection matrix.

Implemented in ome::qtwidgets::gl::v33::Axis2D.

Referenced by ome::qtwidgets::GLView2D::render().

Here is the caller graph for this function:

## § setSize()

void ome::qtwidgets::gl::Axis2D::setSize | ( | glm::vec2 | xlim,
|  | glm::vec2 | ylim,
|  | glm::vec2 | soff,
|  | glm::vec2 | slim
| ) |  |
| protectedvirtual

Set the size of the x and y axes.

Parameters

  xlim | the x axis limits (range).
  ylim | the y axis limits (range).
  soff | shaft offset (x and y offsets from midline).
  slim | the axis shaft width (min and max from midline).

References axis_elements, vertices, xaxis_vertices, and yaxis_vertices.

Referenced by create().

Here is the caller graph for this function:

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

- ome/qtwidgets/gl/Axis2D.h
- ome/qtwidgets/gl/Axis2D.cpp