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_SONIC_PLACEABLE_H
26 #define ENGINES_SONIC_PLACEABLE_H
27 
28 #include "src/common/scopedptr.h"
29 #include "src/common/changeid.h"
30 
31 #include "src/aurora/types.h"
32 
34 
36 
37 namespace Engines {
38 
39 namespace Sonic {
40 
41 class Placeable : public Object {
42 public:
44  Placeable(const Aurora::GFF4Struct &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 
60  // Positioning
61 
63  virtual void setPosition(float x, float y, float z);
65  virtual void setOrientation(float x, float y, float z, float angle);
66 
67 protected:
72 
76 
79 
81  float _scale;
82 
83 
85  void load(const Aurora::GFF4Struct &placeable);
86 };
87 
88 } // End of namespace Sonic
89 
90 } // End of namespace Engines
91 
92 #endif // ENGINES_SONIC_PLACEABLE_H
Common::ChangeID _modelTexture
The resource change created by indexing the model&#39;s texture.
Definition: placeable.h:69
virtual void setPosition(float x, float y, float z)
Set the placeable&#39;s position within its area.
Definition: placeable.cpp:101
A class holding an UTF-8 string.
Definition: ustring.h:48
virtual void setOrientation(float x, float y, float z, float angle)
Set the placeable&#39;s orientation.
Definition: placeable.cpp:112
uint32 _placeableID
The placeable&#39;s identifer from GFF.
Definition: placeable.h:73
uint32 _appearanceID
The placeable&#39;s appearance.
Definition: placeable.h:75
A simple scoped smart pointer template.
An object within a Sonic area.
Definition: object.h:40
Common::UString _modelName
The name of the model representing this placeable.
Definition: placeable.h:78
uint32 _typeID
The placeable&#39;s type.
Definition: placeable.h:74
Basic Aurora graphics types.
Helper class to represent an undoable change.
void hide()
Hide the placeable&#39;s model.
Definition: placeable.cpp:81
void enter()
The cursor entered the placeable.
Definition: placeable.cpp:86
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
A class representing an undoable change.
Definition: changeid.h:35
uint32_t uint32
Definition: types.h:204
An object in a Sonic Chronicles: The Dark Brotherhood area.
void leave()
The cursor left the placeable.
Definition: placeable.cpp:92
void show()
Show the placeable&#39;s model.
Definition: placeable.cpp:76
Common::ScopedPtr< Graphics::Aurora::Model > _model
The placeable&#39;s model.
Definition: placeable.h:71
void highlight(bool enabled)
(Un)Highlight the placeable.
Definition: placeable.cpp:96
float _scale
The scale modifying this placeable&#39;s model.
Definition: placeable.h:81
void load(const Aurora::GFF4Struct &placeable)
Load from a placeable instance.
Definition: placeable.cpp:120
Placeable(const Aurora::GFF4Struct &placeable)
Load from a placeable instance.
Definition: placeable.cpp:57