Skyscraper 2.0
SBS::Stairwell Class Reference

#include <stairs.h>

Inheritance diagram for SBS::Stairwell:
Collaboration diagram for SBS::Stairwell:

Classes

class  Level
 

Public Member Functions

 Stairwell (Object *parent, int number, Real CenterX, Real CenterZ, int startfloor, int endfloor)
 
 ~Stairwell ()
 
void EnableWhole (bool value, bool force=false)
 
bool IsInside (const Vector3 &position)
 
void CutFloors (bool relative, const Vector2 &start, const Vector2 &end, Real startvoffset, Real endvoffset)
 
void EnableRange (int floor, int range, bool value)
 
void Report (const std::string &message)
 
bool ReportError (const std::string &message)
 
void ReplaceTexture (const std::string &oldtexture, const std::string &newtexture)
 
void OnInit ()
 
void AddShowFloor (int floor)
 
void RemoveShowFloor (int floor)
 
bool IsShowFloor (int floor)
 
void Check (Vector3 position, int current_floor, int previous_floor)
 
void Loop ()
 
void SetShowFull (int value)
 
LevelGetLevel (int floor)
 
bool IsValidFloor (int floor)
 
DynamicMeshGetDynamicMesh ()
 
- 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)
 
void RegisterLoop (Object *object)
 
void UnregisterLoop (Object *object)
 
virtual void Enabled (bool value)
 
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

int StairsNum
 
int startfloor
 
int endfloor
 
Vector2 cutstart
 
Vector2 cutend
 
bool Inside
 
bool IsEnabled
 
bool ShowFloors
 
int ShowFullStairs
 
- 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

std::vector< Level * > Levels
 
std::vector< int > ShowFloorsList
 
int lastfloor
 
bool lastfloorset
 
DynamicMeshDoorWrapper
 
DynamicMeshdynamic_mesh
 
Vector3 lastposition
 
bool lastcheckresult
 
bool checkfirstrun
 

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

Constructor & Destructor Documentation

◆ Stairwell()

◆ ~Stairwell()

SBS::Stairwell::~Stairwell ( )

Definition at line 88 of file stairs.cpp.

References DoorWrapper, dynamic_mesh, SBS::SBS::FastDelete, Levels, SBS::Object::parent_deleting, SBS::SBS::RemoveStairwell(), and SBS::ObjectBase::sbs.

Here is the call graph for this function:

Member Function Documentation

◆ AddShowFloor()

void SBS::Stairwell::AddShowFloor ( int floor)

Definition at line 367 of file stairs.cpp.

References IsShowFloor(), and ShowFloorsList.

Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().

Here is the call graph for this function:

◆ Check()

◆ CutFloors()

void SBS::Stairwell::CutFloors ( bool relative,
const Vector2 & start,
const Vector2 & end,
Real startvoffset,
Real endvoffset )

◆ EnableRange()

void SBS::Stairwell::EnableRange ( int floor,
int range,
bool value )

Definition at line 278 of file stairs.cpp.

References SBS::Stairwell::Level::Enabled(), endfloor, SBS::SBS::GetFloor(), GetLevel(), SBS::IsEven(), SBS::Floor::IsInGroup(), SBS::ObjectBase::sbs, SBS_PROFILE, and startfloor.

Referenced by Check().

Here is the call graph for this function:

◆ EnableWhole()

void SBS::Stairwell::EnableWhole ( bool value,
bool force = false )

◆ GetDynamicMesh()

DynamicMesh * SBS::Stairwell::GetDynamicMesh ( )

Definition at line 501 of file stairs.cpp.

References dynamic_mesh.

Referenced by SBS::Stairwell::Level::Level().

◆ GetLevel()

◆ IsInside()

◆ IsShowFloor()

bool SBS::Stairwell::IsShowFloor ( int floor)

Definition at line 392 of file stairs.cpp.

References ShowFloorsList.

Referenced by AddShowFloor(), and SBS::SBS::EnableFloorRange().

◆ IsValidFloor()

bool SBS::Stairwell::IsValidFloor ( int floor)

Definition at line 326 of file stairs.cpp.

References endfloor, and GetLevel().

Referenced by SBS::SBS::DeleteObject(), and SBS::Floor::GetStairwellList().

Here is the call graph for this function:

◆ Loop()

void SBS::Stairwell::Loop ( )
virtual

Reimplemented from SBS::Object.

Definition at line 494 of file stairs.cpp.

References SBS::Object::LoopChildren().

Here is the call graph for this function:

◆ OnInit()

void SBS::Stairwell::OnInit ( )
virtual

Reimplemented from SBS::Object.

Definition at line 357 of file stairs.cpp.

References EnableWhole(), and ShowFullStairs.

Here is the call graph for this function:

◆ RemoveShowFloor()

void SBS::Stairwell::RemoveShowFloor ( int floor)

Definition at line 378 of file stairs.cpp.

References ShowFloorsList.

◆ ReplaceTexture()

void SBS::Stairwell::ReplaceTexture ( const std::string & oldtexture,
const std::string & newtexture )

Definition at line 351 of file stairs.cpp.

References Levels, and ReplaceTexture().

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

Here is the call graph for this function:

◆ Report()

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

Reimplemented from SBS::ObjectBase.

Definition at line 339 of file stairs.cpp.

References SBS::ObjectBase::Report(), StairsNum, and SBS::ToString().

Referenced by CutFloors(), and Stairwell().

Here is the call graph for this function:

◆ ReportError()

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

Reimplemented from SBS::ObjectBase.

Definition at line 345 of file stairs.cpp.

References SBS::ObjectBase::ReportError(), StairsNum, and SBS::ToString().

Here is the call graph for this function:

◆ SetShowFull()

void SBS::Stairwell::SetShowFull ( int value)

Member Data Documentation

◆ checkfirstrun

bool SBS::Stairwell::checkfirstrun
private

Definition at line 156 of file stairs.h.

Referenced by IsInside(), and Stairwell().

◆ cutend

Vector2 SBS::Stairwell::cutend

Definition at line 38 of file stairs.h.

Referenced by CutFloors(), and Stairwell().

◆ cutstart

Vector2 SBS::Stairwell::cutstart

Definition at line 37 of file stairs.h.

Referenced by CutFloors(), and Stairwell().

◆ DoorWrapper

DynamicMesh* SBS::Stairwell::DoorWrapper
private

Definition at line 148 of file stairs.h.

Referenced by ~Stairwell().

◆ dynamic_mesh

DynamicMesh* SBS::Stairwell::dynamic_mesh
private

Definition at line 151 of file stairs.h.

Referenced by EnableWhole(), GetDynamicMesh(), SetShowFull(), Stairwell(), and ~Stairwell().

◆ endfloor

int SBS::Stairwell::endfloor

Definition at line 36 of file stairs.h.

Referenced by CutFloors(), EnableRange(), EnableWhole(), IsInside(), IsValidFloor(), and Stairwell().

◆ Inside

bool SBS::Stairwell::Inside

Definition at line 39 of file stairs.h.

Referenced by Check(), and Stairwell().

◆ IsEnabled

bool SBS::Stairwell::IsEnabled

◆ lastcheckresult

bool SBS::Stairwell::lastcheckresult
private

Definition at line 155 of file stairs.h.

Referenced by IsInside(), and Stairwell().

◆ lastfloor

int SBS::Stairwell::lastfloor
private

Definition at line 144 of file stairs.h.

Referenced by IsInside(), and Stairwell().

◆ lastfloorset

bool SBS::Stairwell::lastfloorset
private

Definition at line 145 of file stairs.h.

Referenced by IsInside(), and Stairwell().

◆ lastposition

Vector3 SBS::Stairwell::lastposition
private

Definition at line 154 of file stairs.h.

Referenced by IsInside(), and Stairwell().

◆ Levels

std::vector<Level*> SBS::Stairwell::Levels
private

Definition at line 141 of file stairs.h.

Referenced by GetLevel(), ReplaceTexture(), Stairwell(), and ~Stairwell().

◆ ShowFloors

bool SBS::Stairwell::ShowFloors

◆ ShowFloorsList

std::vector<int> SBS::Stairwell::ShowFloorsList
private

Definition at line 142 of file stairs.h.

Referenced by AddShowFloor(), Check(), IsShowFloor(), and RemoveShowFloor().

◆ ShowFullStairs

int SBS::Stairwell::ShowFullStairs

Definition at line 42 of file stairs.h.

Referenced by Check(), EnableWhole(), OnInit(), SetShowFull(), and Stairwell().

◆ StairsNum

int SBS::Stairwell::StairsNum

◆ startfloor

int SBS::Stairwell::startfloor

Definition at line 35 of file stairs.h.

Referenced by CutFloors(), EnableRange(), EnableWhole(), IsInside(), and Stairwell().


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