Skyscraper 2.0
SBS::FloorIndicator Class Reference

#include <floorindicator.h>

Inheritance diagram for SBS::FloorIndicator:
Collaboration diagram for SBS::FloorIndicator:

Classes

class  Timer
 

Public Member Functions

 FloorIndicator (Object *parent, int index, int elevator, int car, const std::string &texture_prefix, const std::string &blank_texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real altitude)
 
 ~FloorIndicator ()
 
void Enabled (bool value)
 
void Update (bool blank=false)
 
bool IsEnabled ()
 
void Flash (bool enabled)
 
void Off ()
 
void On ()
 
void Loop ()
 
- Public Member Functions inherited from SBS::Object
 Object (Object *parent)
 
virtual ~Object ()
 
void SetValues (const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)
 
bool IsPermanent ()
 
bool IsMovable ()
 
const std::string & GetType ()
 
int GetNumber ()
 
void AddChild (Object *object)
 
ObjectGetChild (int index)
 
int GetChildrenCount ()
 
void RemoveChild (Object *object)
 
SceneNodeGetSceneNode ()
 
void ShowBoundingBox (bool value)
 
virtual void Move (const Vector3 &vector, Real speed=1.0)
 
virtual void Move (Real X, Real Y, Real Z, Real speed=1.0)
 
virtual void SetPosition (const Vector3 &position)
 
void SetPositionRelative (const Vector3 &position)
 
virtual void SetPosition (Real X, Real Y, Real Z)
 
void SetPositionRelative (Real X, Real Y, Real Z)
 
virtual void SetPositionY (Real value)
 
virtual Vector3 GetPosition (bool relative=false)
 
virtual void Rotate (const Vector3 &vector, Real speed=1.0)
 
virtual void Rotate (Real X, Real Y, Real Z, Real speed=1.0)
 
virtual void SetRotation (const Vector3 &rotation)
 
virtual void SetRotation (Real X, Real Y, Real Z)
 
virtual Vector3 GetRotation ()
 
Quaternion GetOrientation (bool relative=false)
 
void SetOrientation (const Quaternion &q, bool relative=false)
 
virtual void OnMove (bool parent)
 
virtual void OnRotate (bool parent)
 
virtual void OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right)
 
virtual void OnUnclick (bool right)
 
virtual void OnHit ()
 
void NotifyMove (bool parent=false)
 
void NotifyRotate (bool parent=false)
 
virtual void ResetState ()
 
void ChangeParent (Object *new_parent)
 
bool IsGlobal ()
 
void Init (bool children=true)
 
virtual void OnInit ()
 
void RegisterLoop (Object *object)
 
void UnregisterLoop (Object *object)
 
std::string GetNameBase ()
 
template<typename T >
bool IsType ()
 
template<typename T >
T * ConvertTo ()
 
- Public Member Functions inherited from SBS::ObjectBase
 ObjectBase (Object *parent)
 
virtual ~ObjectBase ()
 
ObjectGetParent ()
 
SBSGetRoot ()
 
void SetName (const std::string &name)
 
const std::string & GetName ()
 
std::string GetNameBase ()
 
virtual void Report (const std::string &message)
 
virtual bool ReportError (const std::string &message)
 

Public Attributes

int elev
 
int car
 
std::string Prefix
 
std::string Blank
 
- Public Attributes inherited from SBS::Object
std::string command
 
std::string command_processed
 
std::string context
 
int linenum
 
std::string includefile
 
bool parent_deleting
 

Private Attributes

MeshObjectFloorIndicatorMesh
 
bool is_enabled
 
bool off
 
Timerflash_timer
 

Additional Inherited Members

- Protected Member Functions inherited from SBS::Object
void EnableLoop (bool value)
 
void LoopChildren ()
 
bool SelfDestruct ()
 
- Protected Attributes inherited from SBS::ObjectBase
SBSsbs
 

Detailed Description

Definition at line 29 of file floorindicator.h.

Constructor & Destructor Documentation

◆ FloorIndicator()

SBS::FloorIndicator::FloorIndicator ( Object * parent,
int index,
int elevator,
int car,
const std::string & texture_prefix,
const std::string & blank_texture,
const std::string & direction,
Real CenterX,
Real CenterZ,
Real width,
Real height,
Real altitude )

◆ ~FloorIndicator()

SBS::FloorIndicator::~FloorIndicator ( )

Member Function Documentation

◆ Enabled()

void SBS::FloorIndicator::Enabled ( bool value)
virtual

Reimplemented from SBS::Object.

Definition at line 145 of file floorindicator.cpp.

References SBS::MeshObject::Enabled(), FloorIndicatorMesh, and is_enabled.

Here is the call graph for this function:

◆ Flash()

void SBS::FloorIndicator::Flash ( bool enabled)

Definition at line 190 of file floorindicator.cpp.

References flash_timer, SBS::TimerObject::Start(), SBS::TimerObject::Stop(), and Update().

Here is the call graph for this function:

◆ IsEnabled()

bool SBS::FloorIndicator::IsEnabled ( )
inline

Definition at line 43 of file floorindicator.h.

◆ Loop()

void SBS::FloorIndicator::Loop ( )
virtual

Reimplemented from SBS::Object.

Definition at line 238 of file floorindicator.cpp.

References SBS::SBS::GetPower(), Off(), On(), and SBS::ObjectBase::sbs.

Here is the call graph for this function:

◆ Off()

void SBS::FloorIndicator::Off ( )

Definition at line 216 of file floorindicator.cpp.

References off, and Update().

Referenced by Loop().

Here is the call graph for this function:

◆ On()

void SBS::FloorIndicator::On ( )

Definition at line 227 of file floorindicator.cpp.

References off, and Update().

Referenced by Loop().

Here is the call graph for this function:

◆ Update()

Member Data Documentation

◆ Blank

std::string SBS::FloorIndicator::Blank

Definition at line 36 of file floorindicator.h.

Referenced by FloorIndicator(), and Update().

◆ car

int SBS::FloorIndicator::car

Definition at line 34 of file floorindicator.h.

Referenced by FloorIndicator(), and Update().

◆ elev

int SBS::FloorIndicator::elev

Definition at line 33 of file floorindicator.h.

Referenced by FloorIndicator(), and Update().

◆ flash_timer

Timer* SBS::FloorIndicator::flash_timer
private

Definition at line 57 of file floorindicator.h.

Referenced by Flash(), FloorIndicator(), and ~FloorIndicator().

◆ FloorIndicatorMesh

MeshObject* SBS::FloorIndicator::FloorIndicatorMesh
private

Definition at line 50 of file floorindicator.h.

Referenced by Enabled(), FloorIndicator(), Update(), and ~FloorIndicator().

◆ is_enabled

bool SBS::FloorIndicator::is_enabled
private

Definition at line 51 of file floorindicator.h.

Referenced by Enabled(), and FloorIndicator().

◆ off

bool SBS::FloorIndicator::off
private

Definition at line 52 of file floorindicator.h.

Referenced by FloorIndicator(), Off(), and On().

◆ Prefix

std::string SBS::FloorIndicator::Prefix

Definition at line 35 of file floorindicator.h.

Referenced by FloorIndicator(), and Update().


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