Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Tube.h
Go to the documentation of this file.
1#pragma once
2#include <xgl/TVertexArray.h>
3#include <xgl/global.h>
4
5namespace sf::xgl
6{
7
12class _XGL_CLASS Tube final : public TVertexArray<VertexArrayBase::vmPosition | VertexArrayBase::vmNormal>
13{
14 public:
18 explicit Tube(ShaderProgram* sp);
19
23 void generate() override;
24
28 void setSize(float height, float radius);
29
34 {
36 float height;
38 float radius;
40 int stacks;
43 } parameters;
44};
45
46}// namespace sf::xgl
Shader program having a default vertex and fragment shader.
Definition ShaderProgram.h:13
OpenGL base class and wrapper template for vertex arrays. Automates most of the things needed for pri...
Definition TVertexArray.h:20
Class to render a cylinder in OpenGL. Height of the cone is along the Z-axis where the tip is at (0,...
Definition Tube.h:13
Tube(ShaderProgram *sp)
Qt constructor only accepting a shader program.
void generate() override
Overridden from base class.
void setSize(float height, float radius)
Sets new sizes.
Definition DemoRenderer.h:6
Parameters for generating the data.
Definition Tube.h:34
int sectors
Definition Tube.h:42
int stacks
Definition Tube.h:40
float radius
Definition Tube.h:38
float height
Definition Tube.h:36
#define _XGL_CLASS
Definition xgl/global.h:35