SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
d
e
f
h
i
k
l
m
n
r
s
t
Properties
Related Functions
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
b
c
e
f
g
i
j
m
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
v
w
Typedefs
a
c
h
j
o
s
t
Enumerations
a
c
d
e
h
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
p
r
s
t
u
v
Macros
a
b
e
f
g
i
l
m
o
p
s
t
u
w
SLCone.h
Go to the documentation of this file.
1
/**
2
* \file SLCone.h
3
* \date July 2014
4
* \authors Marcus Hudritsch
5
* \copyright http://opensource.org/licenses/GPL-3.0
6
* \remarks Please use clangformat to format the code. See more code style on
7
* https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8
*/
9
10
#ifndef SLCONE_H
11
#define SLCONE_H
12
13
#include <
SLRevolver.h
>
14
15
//-----------------------------------------------------------------------------
16
/**
17
* @brief SLCone creates a cone mesh based on SLRevolver
18
* @remarks It is important that during instantiation NO OpenGL functions (gl*)
19
* get called because this constructor will be most probably called in a parallel
20
* thread from within an SLScene::registerAssetsToLoad or SLScene::assemble
21
* function. All objects that get rendered have to do their OpenGL initialization
22
* when they are used the first time during rendering in the main thread.
23
* For this mesh it means that the objects for OpenGL drawing (_vao, _vaoP,
24
* _vaoN, _vaoT and _vaoS) remain unused until the first frame is rendered.
25
*/
26
class
SLCone
:
public
SLRevolver
27
{
28
public
:
29
SLCone
(
SLAssetManager
* assetMgr,
30
SLfloat
coneRadius,
31
SLfloat
coneHeight,
32
SLuint
stacks
= 36,
33
SLuint
slices
= 36,
34
SLbool
hasBottom
=
true
,
35
SLstring
name
=
"cone mesh"
,
36
SLMaterial
*
mat
=
nullptr
);
37
38
// Getters
39
SLfloat
radius
() {
return
_radius
; }
40
SLfloat
height
() {
return
_height
; }
41
SLbool
hasBottom
() {
return
_hasBottom
; }
42
43
protected
:
44
SLfloat
_radius
;
//!< radius of cone
45
SLfloat
_height
;
//!< height of cone
46
SLbool
_hasBottom
;
//!< Flag if cone has a bottom
47
};
48
//-----------------------------------------------------------------------------
49
#endif
// SLCONE_H
SLfloat
float SLfloat
Definition:
SL.h:173
SLuint
unsigned int SLuint
Definition:
SL.h:171
SLbool
bool SLbool
Definition:
SL.h:175
SLstring
string SLstring
Definition:
SL.h:158
SLRevolver.h
SLAssetManager
Toplevel holder of the assets meshes, materials, textures and shaders.
Definition:
SLAssetManager.h:33
SLCone
SLCone creates a cone mesh based on SLRevolver.
Definition:
SLCone.h:27
SLCone::height
SLfloat height()
Definition:
SLCone.h:40
SLCone::radius
SLfloat radius()
Definition:
SLCone.h:39
SLCone::hasBottom
SLbool hasBottom()
Definition:
SLCone.h:41
SLCone::SLCone
SLCone(SLAssetManager *assetMgr, SLfloat coneRadius, SLfloat coneHeight, SLuint stacks=36, SLuint slices=36, SLbool hasBottom=true, SLstring name="cone mesh", SLMaterial *mat=nullptr)
Definition:
SLCone.cpp:16
SLCone::_hasBottom
SLbool _hasBottom
Flag if cone has a bottom.
Definition:
SLCone.h:46
SLCone::_height
SLfloat _height
height of cone
Definition:
SLCone.h:45
SLCone::_radius
SLfloat _radius
radius of cone
Definition:
SLCone.h:44
SLMaterial
Defines a standard CG material with textures and a shader program.
Definition:
SLMaterial.h:56
SLMesh::mat
SLMaterial * mat() const
Definition:
SLMesh.h:177
SLObject::name
const SLstring & name() const
Definition:
SLObject.h:38
SLRevolver
SLRevolver is an SLMesh object built out of revolving points.
Definition:
SLRevolver.h:38
SLRevolver::stacks
SLuint stacks()
Definition:
SLRevolver.h:54
SLRevolver::slices
SLuint slices()
Definition:
SLRevolver.h:55
modules
sl
source
mesh
SLCone.h
Generated by
1.9.1