xoreos
0.0.5
src
graphics
aurora
cube.h
Go to the documentation of this file.
1
/* xoreos - A reimplementation of BioWare's Aurora engine
2
*
3
* xoreos is the legal property of its developers, whose names
4
* can be found in the AUTHORS file distributed with this source
5
* distribution.
6
*
7
* xoreos is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
11
*
12
* xoreos is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
25
#ifndef GRAPHICS_AURORA_CUBE_H
26
#define GRAPHICS_AURORA_CUBE_H
27
28
#include "glm/mat4x4.hpp"
29
30
#include "
src/graphics/types.h
"
31
#include "
src/graphics/glcontainer.h
"
32
#include "
src/graphics/object.h
"
33
34
#include "
src/graphics/aurora/texturehandle.h
"
35
36
namespace
Common
{
37
class
UString;
38
class
SeekableReadStream;
39
}
40
41
namespace
Graphics
{
42
43
namespace
Aurora
{
44
45
class
Cube;
46
48
class
CubeSide
:
public
Object
{
49
public
:
50
CubeSide
(
Cube
&parent,
int
n);
51
~CubeSide
();
52
53
void
calculateDistance
();
54
void
render
(
RenderPass
pass
);
55
56
private
:
57
Cube
*
_parent
;
58
int
_n
;
59
60
friend
class
Cube
;
61
};
62
64
class
Cube
:
public
GLContainer
{
65
public
:
66
Cube
(
const
Common::UString
&texture);
67
~Cube
();
68
69
protected
:
70
// GLContainer
71
void
doRebuild
();
72
void
doDestroy
();
73
74
private
:
75
CubeSide
*
_sides
[6];
76
77
bool
_firstTime
;
78
79
uint32
_lastRotateTime
;
80
float
_rotation
;
81
82
ListID
_list
;
83
84
TextureHandle
_texture
;
85
86
void
applyTransformation
(
int
n);
87
void
applyTransformation
(
int
n, glm::mat4 &m);
88
void
setTexture
();
89
void
callList
();
90
91
void
newFrame
();
92
void
reloadTextures
();
93
94
friend
class
CubeSide
;
95
};
96
97
}
// End of namespace Aurora
98
99
}
// End of namespace Graphics
100
101
#endif // GRAPHICS_AURORA_CUBE_H
Graphics::Aurora::CubeSide::_parent
Cube * _parent
Definition:
cube.h:57
Graphics::Aurora::Cube::_texture
TextureHandle _texture
Definition:
cube.h:84
Common
Definition:
2dafile.h:39
Graphics::Aurora::CubeSide::~CubeSide
~CubeSide()
Definition:
cube.cpp:56
Graphics::Aurora::Cube::_list
ListID _list
Definition:
cube.h:82
Common::UString
A class holding an UTF-8 string.
Definition:
ustring.h:48
object.h
A "normal" renderable game object.
types.h
Basic graphics types.
texturehandle.h
A handle to an Aurora texture.
Graphics::Aurora::CubeSide
A cube side.
Definition:
cube.h:48
Graphics::Aurora::Cube::_rotation
float _rotation
Definition:
cube.h:80
glcontainer.h
A container of OpenGL elements.
Graphics::Aurora::CubeSide::CubeSide
CubeSide(Cube &parent, int n)
Definition:
cube.cpp:50
Graphics::Aurora::CubeSide::render
void render(RenderPass pass)
Render the object.
Definition:
cube.cpp:68
Graphics::RenderPass
RenderPass
Definition:
types.h:97
Aurora
Definition:
2dafile.cpp:51
Graphics::ListID
GLuint ListID
Definition:
types.h:46
Graphics::Aurora::CubeSide::calculateDistance
void calculateDistance()
Calculate the object's distance.
Definition:
cube.cpp:60
Graphics::Aurora::Cube::doRebuild
void doRebuild()
Definition:
cube.cpp:101
Graphics::Aurora::Cube::_lastRotateTime
uint32 _lastRotateTime
Definition:
cube.h:79
Graphics::Aurora::Cube::applyTransformation
void applyTransformation(int n)
Definition:
cube.cpp:152
Graphics::Aurora::Cube::reloadTextures
void reloadTextures()
Graphics::Object
A renderable game object.
Definition:
object.h:33
Graphics::Aurora::Cube::newFrame
void newFrame()
Definition:
cube.cpp:140
Graphics::Aurora::Cube::setTexture
void setTexture()
Definition:
cube.cpp:222
Graphics::Aurora::Cube::_sides
CubeSide * _sides[6]
Definition:
cube.h:75
Graphics::Aurora::CubeSide::_n
int _n
Definition:
cube.h:58
Graphics::Aurora::Cube::callList
void callList()
Definition:
cube.cpp:226
uint32
uint32_t uint32
Definition:
types.h:204
Graphics::Aurora::Cube::_firstTime
bool _firstTime
Definition:
cube.h:77
Graphics::Aurora::Cube
A simple, rotating cube.
Definition:
cube.h:64
Graphics::Aurora::Cube::Cube
Cube(const Common::UString &texture)
Definition:
cube.cpp:82
Graphics::GLContainer
A container of OpenGL elements.
Definition:
glcontainer.h:35
pass
#define pass
Definition:
fft.cpp:257
Graphics::Aurora::Cube::~Cube
~Cube()
Definition:
cube.cpp:91
Graphics
Definition:
loadprogress.h:33
Graphics::Aurora::TextureHandle
A handle to a texture.
Definition:
texturehandle.h:51
Graphics::Aurora::Cube::doDestroy
void doDestroy()
Definition:
cube.cpp:131
Generated on Sun Nov 18 2018 15:13:41 for xoreos by
1.8.14