Scanframe Modular Application
0.1.0
Loading...
Searching...
No Matches
Cylinder.h
Go to the documentation of this file.
1
#pragma once
2
#include <
xgl/TVertexArray.h
>
3
#include <
xgl/global.h
>
4
5
namespace
sf::xgl
6
{
7
13
class
_XGL_CLASS
Cylinder
final :
public
TVertexArray
<VertexArrayBase::vmPosition | VertexArrayBase::vmNormal>
14
{
15
public
:
16
// Use the constructors from the base class.
17
using
TVertexArray::TVertexArray;
18
22
struct
Parameters
23
{
25
float
height
;
27
float
radius
;
29
int
stacks
;
31
int
sectors
;
33
bool
top
;
35
bool
bottom
;
36
} parameters{0.5f, 0.25f, 20, 20,
true
,
true
};
37
41
void
setSize
(
float
height,
float
radius);
42
43
protected
:
47
void
generate
()
override
;
48
};
49
50
}
// namespace sf::xgl
TVertexArray.h
sf::xgl::Cylinder
Class to render a cylinder in OpenGL. Has a single color. Height of the cone is along the Z-axis wher...
Definition
Cylinder.h:14
sf::xgl::Cylinder::setSize
void setSize(float height, float radius)
Sets new sizes.
sf::xgl::Cylinder::generate
void generate() override
Overridden from base class.
sf::xgl::TVertexArray
OpenGL base class and wrapper template for vertex arrays. Automates most of the things needed for pri...
Definition
TVertexArray.h:20
sf::xgl
Definition
DemoRenderer.h:6
sf::xgl::Cylinder::Parameters
Parameters for generating the data.
Definition
Cylinder.h:23
sf::xgl::Cylinder::Parameters::bottom
bool bottom
Definition
Cylinder.h:35
sf::xgl::Cylinder::Parameters::height
float height
Definition
Cylinder.h:25
sf::xgl::Cylinder::Parameters::top
bool top
Definition
Cylinder.h:33
sf::xgl::Cylinder::Parameters::stacks
int stacks
Definition
Cylinder.h:29
sf::xgl::Cylinder::Parameters::radius
float radius
Definition
Cylinder.h:27
sf::xgl::Cylinder::Parameters::sectors
int sectors
Definition
Cylinder.h:31
global.h
_XGL_CLASS
#define _XGL_CLASS
Definition
xgl/global.h:35
src
com
xgl
Cylinder.h
Generated by
1.9.8