| xoreos
    0.0.5
    | 
#include <placeable.h>


| Public Types | |
| enum | State { kStateDefault = 0, kStateOpen = 1, kStateClosed = 2, kStateDestroyed = 3, kStateActivated = 4, kStateDeactivated = 5 } | 
| The state of a placeable.  More... | |
| Public Member Functions | |
| Placeable (const Aurora::GFF3Struct &placeable) | |
| Load from a placeable instance.  More... | |
| ~Placeable () | |
| void | show () | 
| Show the placeable's model.  More... | |
| void | hide () | 
| Hide the placeable's model.  More... | |
| bool | isOpen () const | 
| Is the placeable open?  More... | |
| bool | isActivated () const | 
| Is the placeable activated?  More... | |
| bool | open (Object *opener) | 
| The opener object opens this placeable.  More... | |
| bool | close (Object *closer) | 
| The closer object closes this placeable.  More... | |
| bool | activate (Object *opener) | 
| The user object activates this placeable.  More... | |
| bool | deactivate (Object *closer) | 
| The user object deactivates this placeable.  More... | |
| void | enter () | 
| The cursor entered the placeable.  More... | |
| void | leave () | 
| The cursor left the placeable.  More... | |
| void | highlight (bool enabled) | 
| (Un)Highlight the placeable.  More... | |
| bool | click (Object *triggerer=0) | 
| The placeable was clicked.  More... | |
|  Public Member Functions inherited from Engines::Witcher::Situated | |
| ~Situated () | |
| void | loadModel () | 
| Load the situated object's model.  More... | |
| void | unloadModel () | 
| Unload the situated object's model.  More... | |
| void | show () | 
| Show the situated object's model.  More... | |
| void | hide () | 
| Hide the situated object's model.  More... | |
| bool | isLocked () const | 
| Is the situated object locked?  More... | |
| virtual void | setLocked (bool locked) | 
| Lock/Unlock the situated object.  More... | |
| Object * | getLastOpenedBy () const | 
| Return the object that last opened this situated object.  More... | |
| Object * | getLastClosedBy () const | 
| Return the object that last closed this situated object.  More... | |
| Object * | getLastUsedBy () const | 
| Return the object that last used this situated object.  More... | |
| void | setPosition (float x, float y, float z) | 
| Set the situated object's position.  More... | |
| void | setOrientation (float x, float y, float z, float angle) | 
| Set the situated object's orientation.  More... | |
|  Public Member Functions inherited from Engines::Witcher::Object | |
| Object (ObjectType type=kObjectTypeInvalid) | |
| virtual | ~Object () | 
| ObjectType | getType () const | 
| Return the exact type of the object.  More... | |
| virtual void | refreshLocalized () | 
| Refresh all localized strings.  More... | |
| const std::list< uint32 > & | getIDs () const | 
| Return the object's model IDs.  More... | |
| const Common::UString & | getUniqueID () const | 
| Return the object's globally unique ID.  More... | |
| const Aurora::LocString & | getName () const | 
| Return the object's name.  More... | |
| const Aurora::LocString & | getDescription () const | 
| Return the object's description.  More... | |
| const Common::UString & | getConversation () const | 
| Return the object's default conversation (DLG).  More... | |
| bool | isStatic () const | 
| Is the object static (not manipulable at all)?  More... | |
| bool | isUsable () const | 
| Can the object be used by the PC?  More... | |
| bool | isClickable () const | 
| Can the player click the object?  More... | |
| Area * | getArea () const | 
| Return the area this object is currently in.  More... | |
| void | setArea (Area *) | 
| Set the area this object is currently in.  More... | |
| virtual void | getPosition (float &x, float &y, float &z) const | 
| Return the object's position within its area.  More... | |
| virtual void | getOrientation (float &x, float &y, float &z, float &angle) const | 
| Return the object's orientation.  More... | |
| Location | getLocation () const | 
| Create a Location out of the object's area, position and orientation.  More... | |
| void | speakString (const Common::UString &string, uint32 volume) | 
| Speak the specified string.  More... | |
| void | speakOneLiner (Common::UString conv, Object *tokenTarget=0) | 
| Speak an one-liner from the specified conversation file.  More... | |
| void | stopSound () | 
| Stop the current object sound.  More... | |
| void | playSound (const Common::UString &sound, bool pitchVariance=false) | 
| Play an object sound.  More... | |
|  Public Member Functions inherited from Aurora::NWScript::Object | |
| Object () | |
| uint32 | getID () const | 
| const Common::UString & | getTag () const | 
|  Public Member Functions inherited from Aurora::NWScript::VariableContainer | |
| VariableContainer () | |
| virtual | ~VariableContainer () | 
| bool | hasVariable (const Common::UString &var) const | 
| Variable & | getVariable (const Common::UString &var, Type type=kTypeVoid) | 
| const Variable & | getVariable (const Common::UString &var) const | 
| void | setVariable (const Common::UString &var, const Variable &value) | 
| void | removeVariable (const Common::UString &var) | 
| void | clearVariables () | 
|  Public Member Functions inherited from Engines::Witcher::ScriptContainer | |
| ScriptContainer () | |
| ~ScriptContainer () | |
| const Common::UString & | getScript (Script script) const | 
| bool | hasScript (Script script) const | 
| bool | runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) | 
| Protected Member Functions | |
| void | loadObject (const Aurora::GFF3Struct &gff) | 
| Load placeable-specific properties.  More... | |
|  Protected Member Functions inherited from Engines::Witcher::Situated | |
| Situated (ObjectType type) | |
| void | load (const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint=0) | 
| Load the situated object from an instance and its blueprint.  More... | |
|  Protected Member Functions inherited from Engines::Witcher::ScriptContainer | |
| void | clearScripts () | 
| void | readScripts (const Aurora::GFF3Struct &gff) | 
| void | readScripts (const ScriptContainer &container) | 
| Private Member Functions | |
| void | load (const Aurora::GFF3Struct &placeable) | 
| Load from a placeable instance.  More... | |
| void | setModelState () | 
| Sync the model's state with the placeable's state.  More... | |
| Private Attributes | |
| State | _state | 
| The current state of the placeable.  More... | |
| bool | _hasInventory | 
| Does this placeable have an inventory?  More... | |
| Additional Inherited Members | |
|  Static Public Member Functions inherited from Engines::Witcher::ScriptContainer | |
| static bool | runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) | 
| static bool | runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) | 
|  Protected Attributes inherited from Engines::Witcher::Situated | |
| Common::UString | _modelName | 
| The model's resource name.  More... | |
| uint32 | _soundAppType | 
| The index within the situated sounds 2DA.  More... | |
| bool | _locked | 
| Is the situated object locked?  More... | |
| Common::UString | _soundOpened | 
| The sound the object makes when opened.  More... | |
| Common::UString | _soundClosed | 
| The sound the object makes when closed.  More... | |
| Common::UString | _soundDestroyed | 
| The sound the object makes when destroyed.  More... | |
| Common::UString | _soundUsed | 
| The sound the object makes when used.  More... | |
| Common::UString | _soundLocked | 
| The sound the object makes when locked.  More... | |
| Object * | _lastOpenedBy | 
| The object that last opened this situated object.  More... | |
| Object * | _lastClosedBy | 
| The object that last closed this situated object.  More... | |
| Object * | _lastUsedBy | 
| The object that last used this situated object.  More... | |
| Common::ScopedPtr< Graphics::Aurora::Model > | _model | 
| The situated object's model.  More... | |
|  Protected Attributes inherited from Engines::Witcher::Object | |
| ObjectType | _type | 
| The object's type.  More... | |
| Common::UString | _uniqueID | 
| A globally unique ID.  More... | |
| Aurora::LocString | _name | 
| The object's name.  More... | |
| Aurora::LocString | _description | 
| The object's description.  More... | |
| Common::UString | _conversation | 
| The object's default conversation.  More... | |
| bool | _static | 
| Is the object static?  More... | |
| bool | _usable | 
| Is the object usable?  More... | |
| std::list< uint32 > | _ids | 
| The object's model IDs.  More... | |
| Area * | _area | 
| The area the object is currently in.  More... | |
| float | _position [3] | 
| The object's position.  More... | |
| float | _orientation [4] | 
| The object's orientation.  More... | |
| Sound::ChannelHandle | _sound | 
| The currently playing object sound.  More... | |
|  Protected Attributes inherited from Aurora::NWScript::Object | |
| uint32 | _id | 
| Common::UString | _tag | 
Definition at line 36 of file placeable.h.
The state of a placeable.
| Enumerator | |
|---|---|
| kStateDefault | Default. | 
| kStateOpen | Open. | 
| kStateClosed | Closed. | 
| kStateDestroyed | Destroyed. | 
| kStateActivated | Activated. | 
| kStateDeactivated | Deactivated. | 
Definition at line 39 of file placeable.h.
| Engines::Witcher::Placeable::Placeable | ( | const Aurora::GFF3Struct & | placeable | ) | 
Load from a placeable instance.
Definition at line 40 of file placeable.cpp.
References load().

| Engines::Witcher::Placeable::~Placeable | ( | ) | 
Definition at line 46 of file placeable.cpp.
| bool Engines::Witcher::Placeable::activate | ( | Object * | opener | ) | 
The user object activates this placeable.
Definition at line 203 of file placeable.cpp.
References _hasInventory, Engines::Witcher::Situated::_soundLocked, Engines::Witcher::Situated::_soundUsed, _state, isActivated(), Engines::Witcher::Situated::isLocked(), Engines::Witcher::kScriptUsed, kStateActivated, Engines::Witcher::Object::playSound(), and Engines::Witcher::ScriptContainer::runScript().
Referenced by click().


| 
 | virtual | 
The placeable was clicked.
Reimplemented from Engines::Witcher::Object.
Definition at line 136 of file placeable.cpp.
References _hasInventory, Engines::Witcher::Situated::_lastUsedBy, Engines::Witcher::Situated::_soundLocked, _state, activate(), close(), deactivate(), isActivated(), Engines::Witcher::Situated::isLocked(), isOpen(), kStateDestroyed, open(), and Engines::Witcher::Object::playSound().

| bool Engines::Witcher::Placeable::close | ( | Object * | closer | ) | 
The closer object closes this placeable.
Definition at line 186 of file placeable.cpp.
References _hasInventory, Engines::Witcher::Situated::_lastClosedBy, Engines::Witcher::Situated::_soundClosed, _state, isOpen(), Engines::Witcher::kScriptClosed, kStateClosed, Engines::Witcher::Object::playSound(), and Engines::Witcher::ScriptContainer::runScript().
Referenced by click().


| bool Engines::Witcher::Placeable::deactivate | ( | Object * | closer | ) | 
The user object deactivates this placeable.
Definition at line 223 of file placeable.cpp.
References _hasInventory, Engines::Witcher::Situated::_soundLocked, Engines::Witcher::Situated::_soundUsed, _state, isActivated(), Engines::Witcher::Situated::isLocked(), Engines::Witcher::kScriptUsed, kStateDeactivated, Engines::Witcher::Object::playSound(), and Engines::Witcher::ScriptContainer::runScript().
Referenced by click().


| 
 | virtual | 
The cursor entered the placeable.
Reimplemented from Engines::Witcher::Object.
Definition at line 115 of file placeable.cpp.
References highlight().

| 
 | virtual | 
Hide the placeable's model.
Reimplemented from Engines::Witcher::Object.
Definition at line 101 of file placeable.cpp.
References Engines::Witcher::Situated::hide(), and leave().

| 
 | virtual | 
(Un)Highlight the placeable.
Reimplemented from Engines::Witcher::Object.
Definition at line 123 of file placeable.cpp.
References Engines::Witcher::Situated::_model.
Referenced by enter(), and leave().

| bool Engines::Witcher::Placeable::isActivated | ( | ) | const | 
Is the placeable activated?
Definition at line 132 of file placeable.cpp.
References isOpen().
Referenced by activate(), click(), and deactivate().


| 
 | virtual | 
Is the placeable open?
Implements Engines::Witcher::Situated.
Definition at line 128 of file placeable.cpp.
References _state, and kStateOpen.
Referenced by click(), close(), isActivated(), and open().

| 
 | virtual | 
The cursor left the placeable.
Reimplemented from Engines::Witcher::Object.
Definition at line 119 of file placeable.cpp.
References highlight().
Referenced by hide().


| 
 | private | 
Load from a placeable instance.
Definition at line 49 of file placeable.cpp.
References Common::UString::empty(), Aurora::GFF3Struct::getString(), Aurora::kFileTypeUTP, Engines::Witcher::Situated::load(), Engines::loadOptionalGFF3(), MKTAG, and Common::ScopedPtrBase< T, Deallocator >::reset().
Referenced by Placeable().


| 
 | protectedvirtual | 
Load placeable-specific properties.
Implements Engines::Witcher::Situated.
Definition at line 107 of file placeable.cpp.
References _hasInventory, _state, Aurora::GFF3Struct::getBool(), and Aurora::GFF3Struct::getUint().

| bool Engines::Witcher::Placeable::open | ( | Object * | opener | ) | 
The opener object opens this placeable.
Definition at line 164 of file placeable.cpp.
References _hasInventory, Engines::Witcher::Situated::_lastOpenedBy, Engines::Witcher::Situated::_soundLocked, Engines::Witcher::Situated::_soundOpened, _state, Engines::Witcher::Situated::isLocked(), isOpen(), Engines::Witcher::kScriptOpen, kStateOpen, Engines::Witcher::Object::playSound(), and Engines::Witcher::ScriptContainer::runScript().
Referenced by click().


| 
 | private | 
Sync the model's state with the placeable's state.
Definition at line 59 of file placeable.cpp.
References Engines::Witcher::Situated::_model, _state, kStateActivated, kStateClosed, kStateDeactivated, kStateDefault, kStateDestroyed, and kStateOpen.
Referenced by show().

| 
 | virtual | 
Show the placeable's model.
Reimplemented from Engines::Witcher::Object.
Definition at line 95 of file placeable.cpp.
References setModelState(), and Engines::Witcher::Situated::show().

| 
 | private | 
Does this placeable have an inventory?
Definition at line 92 of file placeable.h.
Referenced by activate(), click(), close(), deactivate(), loadObject(), and open().
| 
 | private | 
The current state of the placeable.
Definition at line 90 of file placeable.h.
Referenced by activate(), click(), close(), deactivate(), isOpen(), loadObject(), open(), and setModelState().
 1.8.14
 1.8.14