Skyscraper 2.0
SBS::MovingWalkway Class Reference

#include <movingwalkway.h>

Inheritance diagram for SBS::MovingWalkway:
Collaboration diagram for SBS::MovingWalkway:

Public Member Functions

 MovingWalkway (Object *parent, const std::string &name, int run, Real speed, const std::string &sound_file, const std::string &texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real treadsize, int num_steps, Real voffset, Real tw, Real th)
 
 ~MovingWalkway ()
 
void Enabled (bool value)
 
void Report (const std::string &message)
 
bool ReportError (const std::string &message)
 
void Loop ()
 
bool IsEnabled ()
 
void OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right)
 
void ResetState ()
 
void SetRun (int value)
 
int GetRun ()
 
- 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)
 
virtual void OnHit ()
 
void NotifyMove (bool parent=false)
 
void NotifyRotate (bool parent=false)
 
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 Attributes

Real Speed
 
- 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 Member Functions

void CreateSteps (const std::string &texture, const std::string &direction, Real width, Real treadsize, Real tw, Real th)
 
void MoveSteps ()
 

Private Attributes

Soundsound
 
int Run
 
bool is_enabled
 
Vector3 start
 
Vector3 end
 
std::string Direction
 
Real treadsize
 
std::vector< Step * > Steps
 

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 movingwalkway.h.

Constructor & Destructor Documentation

◆ MovingWalkway()

SBS::MovingWalkway::MovingWalkway ( Object * parent,
const std::string & name,
int run,
Real speed,
const std::string & sound_file,
const std::string & texture,
const std::string & direction,
Real CenterX,
Real CenterZ,
Real width,
Real treadsize,
int num_steps,
Real voffset,
Real tw,
Real th )

◆ ~MovingWalkway()

SBS::MovingWalkway::~MovingWalkway ( )

Member Function Documentation

◆ CreateSteps()

void SBS::MovingWalkway::CreateSteps ( const std::string & texture,
const std::string & direction,
Real width,
Real treadsize,
Real tw,
Real th )
private

◆ Enabled()

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

Reimplemented from SBS::Object.

Definition at line 118 of file movingwalkway.cpp.

References Enabled(), SBS::Object::EnableLoop(), is_enabled, SBS::Sound::IsPlaying(), sound, Steps, and SBS::Sound::Stop().

Referenced by Enabled().

Here is the call graph for this function:

◆ GetRun()

int SBS::MovingWalkway::GetRun ( )
inline

◆ IsEnabled()

bool SBS::MovingWalkway::IsEnabled ( )
inline

Definition at line 40 of file movingwalkway.h.

Referenced by Loop().

◆ Loop()

void SBS::MovingWalkway::Loop ( )
virtual

◆ MoveSteps()

void SBS::MovingWalkway::MoveSteps ( )
private

Definition at line 257 of file movingwalkway.cpp.

References SBS::SBS::camera, SBS::SBS::delta, Direction, end, SBS::Camera::GetPosition(), SBS::Object::GetPosition(), Run, SBS::ObjectBase::sbs, Speed, start, Steps, and treadsize.

Referenced by Loop().

Here is the call graph for this function:

◆ OnClick()

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

Reimplemented from SBS::Object.

Definition at line 337 of file movingwalkway.cpp.

References SBS::SBS::GetPower(), Run, SBS::ObjectBase::sbs, and Steps.

Here is the call graph for this function:

◆ Report()

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

Reimplemented from SBS::ObjectBase.

Definition at line 150 of file movingwalkway.cpp.

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

Here is the call graph for this function:

◆ ReportError()

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

Reimplemented from SBS::ObjectBase.

Definition at line 156 of file movingwalkway.cpp.

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

Here is the call graph for this function:

◆ ResetState()

void SBS::MovingWalkway::ResetState ( )
virtual

Reimplemented from SBS::Object.

Definition at line 363 of file movingwalkway.cpp.

References Run, start, and Steps.

◆ SetRun()

void SBS::MovingWalkway::SetRun ( int value)

Definition at line 136 of file movingwalkway.cpp.

References Run, and Steps.

Referenced by MovingWalkway(), Skyscraper::WalkwayControl::On_Slider1_Scroll(), and SBS::Action::Run().

Member Data Documentation

◆ Direction

std::string SBS::MovingWalkway::Direction
private

Definition at line 51 of file movingwalkway.h.

Referenced by CreateSteps(), and MoveSteps().

◆ end

Vector3 SBS::MovingWalkway::end
private

Definition at line 50 of file movingwalkway.h.

Referenced by CreateSteps(), MoveSteps(), and MovingWalkway().

◆ is_enabled

bool SBS::MovingWalkway::is_enabled
private

Definition at line 49 of file movingwalkway.h.

Referenced by Enabled(), and MovingWalkway().

◆ Run

int SBS::MovingWalkway::Run
private

Definition at line 48 of file movingwalkway.h.

Referenced by Loop(), MoveSteps(), OnClick(), ResetState(), and SetRun().

◆ sound

Sound* SBS::MovingWalkway::sound
private

Definition at line 47 of file movingwalkway.h.

Referenced by Enabled(), Loop(), MovingWalkway(), and ~MovingWalkway().

◆ Speed

Real SBS::MovingWalkway::Speed

Definition at line 32 of file movingwalkway.h.

Referenced by MoveSteps(), and MovingWalkway().

◆ start

Vector3 SBS::MovingWalkway::start
private

Definition at line 50 of file movingwalkway.h.

Referenced by CreateSteps(), MoveSteps(), MovingWalkway(), and ResetState().

◆ Steps

std::vector<Step*> SBS::MovingWalkway::Steps
private

◆ treadsize

Real SBS::MovingWalkway::treadsize
private

Definition at line 52 of file movingwalkway.h.

Referenced by CreateSteps(), MoveSteps(), and MovingWalkway().


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