xoreos  0.0.5
placeable.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 ENGINES_DRAGONAGE2_PLACEABLE_H
26 #define ENGINES_DRAGONAGE2_PLACEABLE_H
27 
28 #include "src/common/scopedptr.h"
29 #include "src/common/ustring.h"
30 
31 #include "src/aurora/types.h"
32 
34 
36 
37 namespace Engines {
38 
39 namespace DragonAge2 {
40 
41 class Placeable : public Object {
42 public:
44  Placeable(const Aurora::GFF3Struct &placeable);
45  ~Placeable();
46 
47  // Basic visuals
48 
49  void show();
50  void hide();
51 
52  // Object/Cursor interactions
53 
54  void enter();
55  void leave();
56 
58  void highlight(bool enabled);
59 
61  bool click(Object *triggerer = 0);
62 
63  // Positioning
64 
66  void setPosition(float x, float y, float z);
68  void setOrientation(float x, float y, float z, float angle);
69 
70 
71 private:
74 
76 
77 
78  void load(const Aurora::GFF3Struct &placeable);
79  void load(const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint);
80 
81  void loadProperties(const Aurora::GFF3Struct &gff);
82 };
83 
84 } // End of namespace Dragon Age
85 
86 } // End of namespace Engines
87 
88 #endif // ENGINES_DRAGONAGE2_PLACEABLE_H
void load(const Aurora::GFF3Struct &placeable)
Definition: placeable.cpp:102
void highlight(bool enabled)
(Un)Highlight the placeable.
Definition: placeable.cpp:90
void setPosition(float x, float y, float z)
Set the placeable&#39;s position.
Definition: placeable.cpp:53
An object in a Dragon Age II area.
bool click(Object *triggerer=0)
The placeable was clicked.
Definition: placeable.cpp:95
A simple scoped smart pointer template.
void hide()
Hide the placeable&#39;s model.
Definition: placeable.cpp:74
uint32 _appearanceID
The placeable&#39;s appearance; index into the Placeables MGDA.
Definition: placeable.h:73
Basic Aurora graphics types.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The placeable&#39;s model.
Definition: placeable.h:75
Unicode string handling.
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
void show()
Show the placeable&#39;s model.
Definition: placeable.cpp:69
void leave()
The cursor left the placeable.
Definition: placeable.cpp:86
void enter()
The cursor entered the placeable.
Definition: placeable.cpp:79
A struct within a GFF3.
Definition: gff3file.h:164
uint32_t uint32
Definition: types.h:204
Placeable(const Aurora::GFF3Struct &placeable)
Load from a placeable instance.
Definition: placeable.cpp:43
void setOrientation(float x, float y, float z, float angle)
Set the placeable&#39;s orientation.
Definition: placeable.cpp:61
void loadProperties(const Aurora::GFF3Struct &gff)
Definition: placeable.cpp:132