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

#include <placeable.h>

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

Public Member Functions

 Placeable (const Aurora::GFF4Struct &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...
 
virtual void setPosition (float x, float y, float z)
 Set the placeable's position within its area. More...
 
virtual void setOrientation (float x, float y, float z, float angle)
 Set the placeable's orientation. More...
 
- Public Member Functions inherited from Engines::Sonic::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
uint32 getModelID () const
 Return the ID of the object's model. 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 ()
 

Protected Member Functions

void load (const Aurora::GFF4Struct &placeable)
 Load from a placeable instance. More...
 

Protected Attributes

Common::ChangeID _modelTexture
 The resource change created by indexing the model's texture. More...
 
Common::ScopedPtr< Graphics::Aurora::Model_model
 The placeable's model. More...
 
uint32 _placeableID
 The placeable's identifer from GFF. More...
 
uint32 _typeID
 The placeable's type. More...
 
uint32 _appearanceID
 The placeable's appearance. More...
 
Common::UString _modelName
 The name of the model representing this placeable. More...
 
float _scale
 The scale modifying this placeable's model. More...
 
- Protected Attributes inherited from Engines::Sonic::Object
ObjectType _type
 The object's type. More...
 
uint32 _modelID
 The ID of the object's model. 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::Sonic::Placeable::Placeable ( const Aurora::GFF4Struct placeable)

Load from a placeable instance.

Definition at line 57 of file placeable.cpp.

References Aurora::NWScript::Object::_id, Common::generateIDNumber(), load(), and ObjectMan.

Here is the call graph for this function:

◆ ~Placeable()

Engines::Sonic::Placeable::~Placeable ( )

Definition at line 65 of file placeable.cpp.

References _modelTexture, Engines::deindexResources(), hide(), and ObjectMan.

Here is the call graph for this function:

Member Function Documentation

◆ enter()

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

The cursor entered the placeable.

Reimplemented from Engines::Sonic::Object.

Definition at line 86 of file placeable.cpp.

References Aurora::NWScript::Object::_id, Aurora::NWScript::Object::_tag, Common::UString::c_str(), highlight(), and warning().

Here is the call graph for this function:

◆ hide()

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

Hide the placeable's model.

Reimplemented from Engines::Sonic::Object.

Definition at line 81 of file placeable.cpp.

References _model.

Referenced by ~Placeable().

Here is the caller graph for this function:

◆ highlight()

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

(Un)Highlight the placeable.

Reimplemented from Engines::Sonic::Object.

Definition at line 96 of file placeable.cpp.

References _model.

Referenced by enter(), and leave().

Here is the caller graph for this function:

◆ leave()

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

The cursor left the placeable.

Reimplemented from Engines::Sonic::Object.

Definition at line 92 of file placeable.cpp.

References highlight().

Here is the call graph for this function:

◆ load()

void Engines::Sonic::Placeable::load ( const Aurora::GFF4Struct placeable)
protected

◆ setOrientation()

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

Set the placeable's orientation.

Reimplemented from Engines::Sonic::Object.

Definition at line 112 of file placeable.cpp.

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

Referenced by load().

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

◆ setPosition()

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

Set the placeable's position within its area.

Reimplemented from Engines::Sonic::Object.

Definition at line 101 of file placeable.cpp.

References _model, Engines::Sonic::Object::getPosition(), Engines::Sonic::Area::getWorldPosition(), and Engines::Sonic::Object::setPosition().

Referenced by load().

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

◆ show()

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

Show the placeable's model.

Reimplemented from Engines::Sonic::Object.

Definition at line 76 of file placeable.cpp.

References _model.

Member Data Documentation

◆ _appearanceID

uint32 Engines::Sonic::Placeable::_appearanceID
protected

The placeable's appearance.

Definition at line 75 of file placeable.h.

Referenced by load().

◆ _model

Common::ScopedPtr<Graphics::Aurora::Model> Engines::Sonic::Placeable::_model
protected

The placeable's model.

Definition at line 71 of file placeable.h.

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

◆ _modelName

Common::UString Engines::Sonic::Placeable::_modelName
protected

The name of the model representing this placeable.

Definition at line 78 of file placeable.h.

Referenced by load().

◆ _modelTexture

Common::ChangeID Engines::Sonic::Placeable::_modelTexture
protected

The resource change created by indexing the model's texture.

Definition at line 69 of file placeable.h.

Referenced by load(), and ~Placeable().

◆ _placeableID

uint32 Engines::Sonic::Placeable::_placeableID
protected

The placeable's identifer from GFF.

Definition at line 73 of file placeable.h.

Referenced by load().

◆ _scale

float Engines::Sonic::Placeable::_scale
protected

The scale modifying this placeable's model.

Definition at line 81 of file placeable.h.

Referenced by load().

◆ _typeID

uint32 Engines::Sonic::Placeable::_typeID
protected

The placeable's type.

Definition at line 74 of file placeable.h.

Referenced by load().


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