Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Axes.h
Go to the documentation of this file.
1#pragma once
2#include <xgl/Color.h>
3#include <xgl/TVertexArray.h>
4#include <xgl/global.h>
5
6namespace sf::xgl
7{
8
13class _XGL_CLASS Axes final : public TVertexArray<VertexArrayBase::vmPosition | VertexArrayBase::vmColor>
14{
15 public:
16 // Use the constructors from the base class.
17 using TVertexArray::TVertexArray;
18
39
40 protected:
42 void generate() override;
44 void modifyContext(bool before, bool draw, size_t mode_index) override;
45};
46
47}// namespace sf::xgl
Class to render axis lines in OpenGL. Length is both positive and negative direction.
Definition Axes.h:14
void modifyContext(bool before, bool draw, size_t mode_index) override
Overridden from base class.
void generate() override
Overridden from base class.
Color class used in vertex arrays and a layout of 4 x GLfloat.
Definition Color.h:14
OpenGL base class and wrapper template for vertex arrays. Automates most of the things needed for pri...
Definition TVertexArray.h:19
Definition DemoRenderer.h:6
Parameters for generating the data.
Definition Axes.h:23
Parameters()
Constructor setting the defaults of the data members.
Color color_z
Z-axis color.
Definition Axes.h:37
Color color_y
Y-axis color.
Definition Axes.h:35
float width
Specifies the width of a line to be rendered.
Definition Axes.h:31
float length
Length of the axis line in positive and optional negative direction.
Definition Axes.h:29
bool both
Render axes in the positive direction only.
Definition Axes.h:27
Color color_x
X-axis color.
Definition Axes.h:33
#define _XGL_CLASS
Definition xgl/global.h:35