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

An object within a Sonic area. More...

#include <object.h>

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

Public Member Functions

 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
virtual void show ()
 Show the object's model. More...
 
virtual void hide ()
 Hide the object's model. 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...
 
virtual void setPosition (float x, float y, float z)
 Set the object's position within its area. More...
 
virtual void setOrientation (float x, float y, float z, float angle)
 Set the object's orientation. More...
 
virtual void enter ()
 The cursor entered the object. More...
 
virtual void leave ()
 The cursor left the object. More...
 
virtual void highlight (bool enabled)
 (Un)Highlight the object. 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 Attributes

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

An object within a Sonic area.

Definition at line 40 of file object.h.

Constructor & Destructor Documentation

◆ Object()

Engines::Sonic::Object::Object ( ObjectType  type = kObjectTypeInvalid)

Definition at line 31 of file object.cpp.

References Aurora::NWScript::Object::_id, _orientation, and _position.

◆ ~Object()

Engines::Sonic::Object::~Object ( )
virtual

Reimplemented from Aurora::NWScript::Object.

Definition at line 43 of file object.cpp.

Member Function Documentation

◆ enter()

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

The cursor entered the object.

Reimplemented in Engines::Sonic::Area, and Engines::Sonic::Placeable.

Definition at line 87 of file object.cpp.

Referenced by Engines::Sonic::Area::setActive().

Here is the caller graph for this function:

◆ getModelID()

uint32 Engines::Sonic::Object::getModelID ( ) const

Return the ID of the object's model.

Definition at line 56 of file object.cpp.

References _modelID.

Referenced by Engines::Sonic::Area::loadObject().

Here is the caller graph for this function:

◆ getOrientation()

void Engines::Sonic::Object::getOrientation ( float &  x,
float &  y,
float &  z,
float &  angle 
) const
virtual

Return the object's orientation.

Definition at line 66 of file object.cpp.

References _orientation.

Referenced by Engines::Sonic::Placeable::setOrientation().

Here is the caller graph for this function:

◆ getPosition()

void Engines::Sonic::Object::getPosition ( float &  x,
float &  y,
float &  z 
) const
virtual

Return the object's position within its area.

Definition at line 60 of file object.cpp.

References _position.

Referenced by Engines::Sonic::ObjectDistanceSort::getDistance(), Engines::Sonic::ObjectDistanceSort::ObjectDistanceSort(), and Engines::Sonic::Placeable::setPosition().

Here is the caller graph for this function:

◆ getType()

ObjectType Engines::Sonic::Object::getType ( ) const

Return the exact type of the object.

Definition at line 46 of file object.cpp.

References _type.

◆ hide()

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

Hide the object's model.

Reimplemented in Engines::Sonic::Area, and Engines::Sonic::Placeable.

Definition at line 53 of file object.cpp.

◆ highlight()

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

(Un)Highlight the object.

Reimplemented in Engines::Sonic::Placeable.

Definition at line 93 of file object.cpp.

◆ leave()

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

The cursor left the object.

Reimplemented in Engines::Sonic::Area, and Engines::Sonic::Placeable.

Definition at line 90 of file object.cpp.

Referenced by Engines::Sonic::Area::removeFocus(), and Engines::Sonic::Area::setActive().

Here is the caller graph for this function:

◆ setOrientation()

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

Set the object's orientation.

Reimplemented in Engines::Sonic::Placeable.

Definition at line 80 of file object.cpp.

References _orientation.

Referenced by Engines::Sonic::Placeable::setOrientation().

Here is the caller graph for this function:

◆ setPosition()

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

Set the object's position within its area.

Reimplemented in Engines::Sonic::Placeable.

Definition at line 74 of file object.cpp.

References _position.

Referenced by Engines::Sonic::Placeable::setPosition().

Here is the caller graph for this function:

◆ show()

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

Show the object's model.

Reimplemented in Engines::Sonic::Area, and Engines::Sonic::Placeable.

Definition at line 50 of file object.cpp.

Member Data Documentation

◆ _modelID

uint32 Engines::Sonic::Object::_modelID
protected

The ID of the object's model.

Definition at line 81 of file object.h.

Referenced by getModelID(), and Engines::Sonic::Placeable::load().

◆ _orientation

float Engines::Sonic::Object::_orientation[4]
protected

The object's orientation.

Definition at line 84 of file object.h.

Referenced by getOrientation(), Object(), and setOrientation().

◆ _position

float Engines::Sonic::Object::_position[3]
protected

The object's position.

Definition at line 83 of file object.h.

Referenced by getPosition(), Object(), and setPosition().

◆ _type

ObjectType Engines::Sonic::Object::_type
protected

The object's type.

Definition at line 79 of file object.h.

Referenced by getType().


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