ome-qtwidgets 5.3.2

Public Member Functions | Private Attributes | List of all members
ome::qtwidgets::gl::v33::Grid2D Class Reference

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

`#include <ome/qtwidgets/gl/v33/V33Grid2D.h>`

Inheritance diagram for ome::qtwidgets::gl::v33::Grid2D:
[legend]
Collaboration diagram for ome::qtwidgets::gl::v33::Grid2D:
[legend]

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

## Private Attributes
glsl::v330::GLLineShader2D * | grid_shader
| The shader program for grid shading.

## Additional Inherited Members
Protected Member Functions inherited from ome::qtwidgets::gl::Grid2D
virtual void | setSize (const glm::vec2 &xlim, const glm::vec2 &ylim)
| Set the size of the x and y axes. More...
Protected Attributes inherited from ome::qtwidgets::gl::Grid2D
QOpenGLVertexArrayObject | vertices
| The vertex array.
QOpenGLBuffer | grid_vertices
| The vertices for the grid.
QOpenGLBuffer | grid_elements
| The elements for the grid.
ome::compat::shared_ptr< ome::files::FormatReader > | reader
| The image reader.
ome::files::dimension_size_type | series
| The image series.

## Detailed Description

2D (xy) grid renderer.

Draws x and y gridlines for the specified image.

## Constructor & Destructor Documentation

## § Grid2D()

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

Create a 2D grid.

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

## § render()

void ome::qtwidgets::gl::v33::Grid2D::render | ( | const glm::mat4 & | mvp,
|  | float | zoom
| ) |  |
| virtual

Render the grid.

The zoom level is used to selectively draw gridlines of differing magnitude depending upon the magnification.

Parameters

  mvp | the model view projection matrix.
  zoom | the zoom level.

Implements ome::qtwidgets::gl::Grid2D.

References ome::qtwidgets::gl::check_gl(), ome::qtwidgets::glsl::v330::GLLineShader2D::disableColour(), ome::qtwidgets::glsl::v330::GLLineShader2D::disableCoords(), ome::qtwidgets::glsl::v330::GLLineShader2D::enableColour(), ome::qtwidgets::glsl::v330::GLLineShader2D::enableCoords(), ome::qtwidgets::gl::Grid2D::grid_elements, grid_shader, ome::qtwidgets::gl::Grid2D::grid_vertices, ome::qtwidgets::glsl::v330::GLLineShader2D::setColour(), ome::qtwidgets::glsl::v330::GLLineShader2D::setCoords(), ome::qtwidgets::glsl::v330::GLLineShader2D::setModelViewProjection(), ome::qtwidgets::glsl::v330::GLLineShader2D::setZoom(), and ome::qtwidgets::gl::Grid2D::vertices.

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

- ome/qtwidgets/gl/v33/V33Grid2D.h
- ome/qtwidgets/gl/v33/V33Grid2D.cpp