xoreos  0.0.5
geometryobject.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_GEOMETRYOBJECT_H
26 #define GRAPHICS_AURORA_GEOMETRYOBJECT_H
27 
31 
32 namespace Graphics {
33 
34 namespace Aurora {
35 
36 class GeometryObject : public Renderable {
37 public:
38  GeometryObject(const VertexBuffer &vBuf, const IndexBuffer &iBuf);
40 
41  // Positioning
42 
44  void getPosition(float &x, float &y, float &z) const;
46  void getRotation(float &x, float &y, float &z) const;
47 
49  void setPosition(float x, float y, float z);
51  void setRotation(float x, float y, float z);
52 
54  void move (float x, float y, float z);
56  void rotate(float x, float y, float z);
57 
58  // Renderable
59  void calculateDistance();
60  void render(RenderPass pass);
61 
62 private:
65 
66  float _position[3];
67  float _rotation[3];
68 };
69 
70 } // End of namespace Aurora
71 
72 } // End of namespace Graphics
73 
74 #endif // GRAPHICS_AURORA_GEOMETRYOBJECT_H
GeometryObject(const VertexBuffer &vBuf, const IndexBuffer &iBuf)
void calculateDistance()
Calculate the object&#39;s distance.
A index buffer.
void setPosition(float x, float y, float z)
Set the current position of the model.
void getPosition(float &x, float &y, float &z) const
Get the current position of the model.
RenderPass
Definition: types.h:97
void rotate(float x, float y, float z)
Rotate the model, relative to its current rotation.
void render(RenderPass pass)
Render the object.
Buffer containing vertex data.
Definition: vertexbuffer.h:68
void getRotation(float &x, float &y, float &z) const
Get the current rotation of the model.
An object that can be displayed by the graphics manager.
Definition: renderable.h:42
Buffer containing indices data.
Definition: indexbuffer.h:33
#define pass
Definition: fft.cpp:257
void setRotation(float x, float y, float z)
Set the current rotation of the model.
An object that can be displayed by the graphics manager.
A vertex buffer.
void move(float x, float y, float z)
Move the model, relative to its current position.