Skyscraper 2.0
SBS::RevolvingDoor Class Reference

#include <revolvingdoor.h>

Inheritance diagram for SBS::RevolvingDoor:
Collaboration diagram for SBS::RevolvingDoor:

Public Member Functions

 RevolvingDoor (Object *parent, DynamicMesh *wrapper, const std::string &name, bool run, const std::string &soundfile, const std::string &texture, Real thickness, bool clockwise, int segments, Real speed, Real rotation, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real tw, Real th)
 
 ~RevolvingDoor ()
 
void Enabled (bool value)
 
void MoveDoor ()
 
bool IsEnabled ()
 
void Loop ()
 
void OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right)
 
void OnHit ()
 
void Report (const std::string &message)
 
bool ReportError (const std::string &message)
 
void Run (bool value)
 
- 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 OnUnclick (bool right)
 
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 ()
 
- Public Member Functions inherited from SBS::Lock
 Lock (Object *parent)
 
virtual ~Lock ()
 
void SetLocked (bool value, int keyid)
 
bool IsLocked ()
 
bool ToggleLock (bool force=false)
 
int GetKeyID ()
 

Public Attributes

bool IsMoving
 
bool Clockwise
 
Real Speed
 
std::string soundfile
 
int Segments
 
- 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

MeshObjectDoorMesh
 
Soundsound
 
bool brake
 
bool is_enabled
 
Real rotation
 
bool run
 

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 31 of file revolvingdoor.h.

Constructor & Destructor Documentation

◆ RevolvingDoor()

SBS::RevolvingDoor::RevolvingDoor ( Object * parent,
DynamicMesh * wrapper,
const std::string & name,
bool run,
const std::string & soundfile,
const std::string & texture,
Real thickness,
bool clockwise,
int segments,
Real speed,
Real rotation,
Real CenterX,
Real CenterZ,
Real width,
Real height,
Real voffset,
Real tw,
Real th )

◆ ~RevolvingDoor()

Member Function Documentation

◆ Enabled()

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

Reimplemented from SBS::Object.

Definition at line 173 of file revolvingdoor.cpp.

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

Here is the call graph for this function:

◆ IsEnabled()

bool SBS::RevolvingDoor::IsEnabled ( )
inline

Definition at line 45 of file revolvingdoor.h.

◆ Loop()

void SBS::RevolvingDoor::Loop ( )
virtual

Reimplemented from SBS::Object.

Definition at line 182 of file revolvingdoor.cpp.

References SBS::Object::EnableLoop(), SBS::SBS::GetPower(), IsMoving, MoveDoor(), SBS::ObjectBase::sbs, and SBS_PROFILE.

Here is the call graph for this function:

◆ MoveDoor()

void SBS::RevolvingDoor::MoveDoor ( )

Definition at line 195 of file revolvingdoor.cpp.

References brake, Clockwise, SBS::SBS::delta, IsMoving, SBS::Object::Rotate(), rotation, run, SBS::ObjectBase::sbs, SBS_PROFILE, and Speed.

Referenced by Loop().

Here is the call graph for this function:

◆ OnClick()

void SBS::RevolvingDoor::OnClick ( Vector3 & position,
bool shift,
bool ctrl,
bool alt,
bool right )
virtual

Reimplemented from SBS::Object.

Definition at line 224 of file revolvingdoor.cpp.

References SBS::Lock::ToggleLock().

Here is the call graph for this function:

◆ OnHit()

void SBS::RevolvingDoor::OnHit ( )
virtual

Reimplemented from SBS::Object.

Definition at line 146 of file revolvingdoor.cpp.

References brake, SBS::Object::EnableLoop(), SBS::SBS::GetPower(), SBS::Lock::IsLocked(), IsMoving, SBS::Sound::Load(), SBS::Sound::Play(), Report(), ReportError(), SBS::ObjectBase::sbs, sound, soundfile, and SBS::SBS::Verbose.

Referenced by Run().

Here is the call graph for this function:

◆ Report()

void SBS::RevolvingDoor::Report ( const std::string & message)
virtual

Reimplemented from SBS::ObjectBase.

Definition at line 234 of file revolvingdoor.cpp.

References SBS::ObjectBase::GetName(), and SBS::ObjectBase::Report().

Referenced by OnHit().

Here is the call graph for this function:

◆ ReportError()

bool SBS::RevolvingDoor::ReportError ( const std::string & message)
virtual

Reimplemented from SBS::ObjectBase.

Definition at line 240 of file revolvingdoor.cpp.

References SBS::ObjectBase::GetName(), and SBS::ObjectBase::ReportError().

Referenced by OnHit().

Here is the call graph for this function:

◆ Run()

void SBS::RevolvingDoor::Run ( bool value)

Definition at line 246 of file revolvingdoor.cpp.

References brake, SBS::SBS::GetPower(), OnHit(), run, and SBS::ObjectBase::sbs.

Referenced by RevolvingDoor(), and SBS::Action::Run().

Here is the call graph for this function:

Member Data Documentation

◆ brake

bool SBS::RevolvingDoor::brake
private

Definition at line 59 of file revolvingdoor.h.

Referenced by MoveDoor(), OnHit(), RevolvingDoor(), and Run().

◆ Clockwise

bool SBS::RevolvingDoor::Clockwise

Definition at line 36 of file revolvingdoor.h.

Referenced by MoveDoor(), and RevolvingDoor().

◆ DoorMesh

MeshObject* SBS::RevolvingDoor::DoorMesh
private

Definition at line 54 of file revolvingdoor.h.

Referenced by Enabled(), RevolvingDoor(), and ~RevolvingDoor().

◆ is_enabled

bool SBS::RevolvingDoor::is_enabled
private

Definition at line 60 of file revolvingdoor.h.

Referenced by Enabled(), and RevolvingDoor().

◆ IsMoving

bool SBS::RevolvingDoor::IsMoving

Definition at line 35 of file revolvingdoor.h.

Referenced by Loop(), MoveDoor(), OnHit(), and RevolvingDoor().

◆ rotation

Real SBS::RevolvingDoor::rotation
private

Definition at line 61 of file revolvingdoor.h.

Referenced by MoveDoor(), and RevolvingDoor().

◆ run

bool SBS::RevolvingDoor::run
private

Definition at line 62 of file revolvingdoor.h.

Referenced by MoveDoor(), RevolvingDoor(), and Run().

◆ Segments

int SBS::RevolvingDoor::Segments

Definition at line 39 of file revolvingdoor.h.

Referenced by RevolvingDoor().

◆ sound

Sound* SBS::RevolvingDoor::sound
private

Definition at line 57 of file revolvingdoor.h.

Referenced by OnHit(), RevolvingDoor(), and ~RevolvingDoor().

◆ soundfile

std::string SBS::RevolvingDoor::soundfile

Definition at line 38 of file revolvingdoor.h.

Referenced by OnHit(), and RevolvingDoor().

◆ Speed

Real SBS::RevolvingDoor::Speed

Definition at line 37 of file revolvingdoor.h.

Referenced by MoveDoor(), and RevolvingDoor().


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