xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::DragonAge2::Placeable Class Reference

#include <placeable.h>

Inheritance diagram for Engines::DragonAge2::Placeable:
Inheritance graph
[legend]
Collaboration diagram for Engines::DragonAge2::Placeable:
Collaboration graph
[legend]

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...
 
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...
 
void setPosition (float x, float y, float z)
 Set the placeable's position. More...
 
void setOrientation (float x, float y, float z, float angle)
 Set the placeable's orientation. More...
 
- Public Member Functions inherited from Engines::DragonAge2::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
const std::list< uint32 > & getIDs () const
 Return the object's model IDs. More...
 
const Common::UStringgetResRef () const
 Return the object's resource reference. More...
 
const Aurora::LocStringgetName () const
 Return the object's name. More...
 
const Aurora::LocStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetConversation () const
 Return the object's default conversation (DLG). More...
 
const Common::UStringgetNonLocalizedName () const
 Return the object's non-localized name. More...
 
void setNonLocalizedName (const Common::UString &name)
 Set the object's non-localized name. 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...
 
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...
 
- Public Member Functions inherited from Aurora::NWScript::Object
 Object ()
 
uint32 getID () const
 
const Common::UStringgetTag () const
 
- Public Member Functions inherited from Aurora::NWScript::VariableContainer
 VariableContainer ()
 
virtual ~VariableContainer ()
 
bool hasVariable (const Common::UString &var) const
 
VariablegetVariable (const Common::UString &var, Type type=kTypeVoid)
 
const VariablegetVariable (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::DragonAge2::ScriptContainer
 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript () const
 
bool hasScript () const
 
void enableEvent (EventType event, bool enabled)
 Enable/Disable the handling of a specific event. More...
 
void enableEvents (bool enabled)
 Enable/Disable the handling of all events. More...
 
bool runScript (EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
bool runScript (Event &event)
 

Private Member Functions

void load (const Aurora::GFF3Struct &placeable)
 
void load (const Aurora::GFF3Struct &instance, const Aurora::GFF3Struct *blueprint)
 
void loadProperties (const Aurora::GFF3Struct &gff)
 

Private Attributes

uint32 _appearanceID
 The placeable's appearance; index into the Placeables MGDA. More...
 
Common::ScopedPtr< Graphics::Aurora::Model_model
 The placeable's model. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::DragonAge2::ScriptContainer
static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, EventType event, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
 
static bool runScript (const Common::UString &script, Event &event)
 
static bool runScript (const Common::UString &script, Event &event, const Aurora::NWScript::ScriptState &state)
 
- Protected Member Functions inherited from Engines::DragonAge2::Object
void syncPosition ()
 
void syncOrientation ()
 
void readVarTable (const Aurora::GFF3List &varTable)
 
void readVarTable (const Aurora::GFF3Struct &gff)
 
void readVarTable (const Aurora::GFF4List &varTable)
 
void readVarTable (const Aurora::GFF4Struct &gff)
 
- Protected Member Functions inherited from Engines::DragonAge2::ScriptContainer
void clearScript ()
 
void readScript (const Aurora::GFF3Struct &gff)
 
void readScript (const Aurora::GFF4Struct &gff)
 
- Protected Attributes inherited from Engines::DragonAge2::Object
ObjectType _type
 The object's type. More...
 
Common::UString _resRef
 The object's resource reference. More...
 
Aurora::LocString _name
 The object's display name. More...
 
Aurora::LocString _description
 The object's description. More...
 
Common::UString _nonLocalizedName
 The object's non-localized name. More...
 
Common::UString _conversation
 The object's default conversation. More...
 
Common::UString _soundSet
 The object's sound set. 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...
 
float _position [3]
 The object's position. More...
 
float _orientation [4]
 The object's orientation. More...
 
- Protected Attributes inherited from Aurora::NWScript::Object
uint32 _id
 
Common::UString _tag
 

Detailed Description

Definition at line 41 of file placeable.h.

Constructor & Destructor Documentation

◆ Placeable()

Engines::DragonAge2::Placeable::Placeable ( const Aurora::GFF3Struct placeable)

Load from a placeable instance.

Definition at line 43 of file placeable.cpp.

References load().

Here is the call graph for this function:

◆ ~Placeable()

Engines::DragonAge2::Placeable::~Placeable ( )

Definition at line 49 of file placeable.cpp.

References hide().

Here is the call graph for this function:

Member Function Documentation

◆ click()

bool Engines::DragonAge2::Placeable::click ( Object triggerer = 0)
virtual

The placeable was clicked.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 95 of file placeable.cpp.

References Engines::DragonAge2::kEventTypeClick, Engines::DragonAge2::kEventTypeUse, and Engines::DragonAge2::ScriptContainer::runScript().

Here is the call graph for this function:

◆ enter()

void Engines::DragonAge2::Placeable::enter ( )
virtual

The cursor entered the placeable.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 79 of file placeable.cpp.

References Engines::DragonAge2::Object::_description, Engines::DragonAge2::Object::_name, Aurora::NWScript::Object::_tag, Common::UString::c_str(), Aurora::LocString::getString(), highlight(), and status().

Here is the call graph for this function:

◆ hide()

void Engines::DragonAge2::Placeable::hide ( )
virtual

Hide the placeable's model.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 74 of file placeable.cpp.

References _model.

Referenced by ~Placeable().

Here is the caller graph for this function:

◆ highlight()

void Engines::DragonAge2::Placeable::highlight ( bool  enabled)
virtual

(Un)Highlight the placeable.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 90 of file placeable.cpp.

References _model.

Referenced by enter(), and leave().

Here is the caller graph for this function:

◆ leave()

void Engines::DragonAge2::Placeable::leave ( )
virtual

The cursor left the placeable.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 86 of file placeable.cpp.

References highlight().

Here is the call graph for this function:

◆ load() [1/2]

void Engines::DragonAge2::Placeable::load ( const Aurora::GFF3Struct placeable)
private

Definition at line 102 of file placeable.cpp.

References Engines::DragonAge2::Object::_resRef, Common::UString::empty(), Aurora::GFF3Struct::getString(), Aurora::kFileTypeUTP, Engines::loadOptionalGFF3(), MKTAG, and Common::ScopedPtrBase< T, Deallocator >::reset().

Referenced by Placeable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load() [2/2]

void Engines::DragonAge2::Placeable::load ( const Aurora::GFF3Struct instance,
const Aurora::GFF3Struct blueprint = 0 
)
private

◆ loadProperties()

void Engines::DragonAge2::Placeable::loadProperties ( const Aurora::GFF3Struct gff)
private

◆ setOrientation()

void Engines::DragonAge2::Placeable::setOrientation ( float  x,
float  y,
float  z,
float  angle 
)
virtual

Set the placeable's orientation.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 61 of file placeable.cpp.

References _model, Engines::DragonAge2::Object::getOrientation(), and Engines::DragonAge2::Object::setOrientation().

Referenced by loadProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPosition()

void Engines::DragonAge2::Placeable::setPosition ( float  x,
float  y,
float  z 
)
virtual

Set the placeable's position.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 53 of file placeable.cpp.

References _model, Engines::DragonAge2::Object::getPosition(), and Engines::DragonAge2::Object::setPosition().

Referenced by loadProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show()

void Engines::DragonAge2::Placeable::show ( )
virtual

Show the placeable's model.

Reimplemented from Engines::DragonAge2::Object.

Definition at line 69 of file placeable.cpp.

References _model.

Member Data Documentation

◆ _appearanceID

uint32 Engines::DragonAge2::Placeable::_appearanceID
private

The placeable's appearance; index into the Placeables MGDA.

Definition at line 73 of file placeable.h.

Referenced by load(), and loadProperties().

◆ _model

Common::ScopedPtr<Graphics::Aurora::Model> Engines::DragonAge2::Placeable::_model
private

The placeable's model.

Definition at line 75 of file placeable.h.

Referenced by hide(), highlight(), load(), setOrientation(), setPosition(), and show().


The documentation for this class was generated from the following files: