Skyscraper 2.0
|
#include <stairs.h>
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) |
Level * | GetLevel (int floor) |
bool | IsValidFloor (int floor) |
DynamicMesh * | GetDynamicMesh () |
![]() | |
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) |
Object * | GetChild (int index) |
int | GetChildrenCount () |
void | RemoveChild (Object *object) |
SceneNode * | GetSceneNode () |
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 () |
![]() | |
ObjectBase (Object *parent) | |
virtual | ~ObjectBase () |
Object * | GetParent () |
SBS * | GetRoot () |
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 |
![]() | |
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 |
DynamicMesh * | DoorWrapper |
DynamicMesh * | dynamic_mesh |
Vector3 | lastposition |
bool | lastcheckresult |
bool | checkfirstrun |
Additional Inherited Members | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
SBS::Stairwell::Stairwell | ( | Object * | parent, |
int | number, | ||
Real | CenterX, | ||
Real | CenterZ, | ||
int | startfloor, | ||
int | endfloor ) |
Definition at line 45 of file stairs.cpp.
References checkfirstrun, cutend, cutstart, dynamic_mesh, SBS::Object::EnableLoop(), endfloor, SBS::Floor::GetBase(), SBS::SBS::GetFloor(), SBS::ObjectBase::GetName(), SBS::Object::GetSceneNode(), Inside, IsEnabled, lastcheckresult, lastfloor, lastfloorset, lastposition, Levels, Report(), SBS::ObjectBase::sbs, SBS::ObjectBase::SetName(), SBS::Object::SetPosition(), SBS::Object::SetValues(), ShowFloors, ShowFullStairs, StairsNum, startfloor, SBS::ToString(), and SBS::TruncateNumber().
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.
void SBS::Stairwell::AddShowFloor | ( | int | floor | ) |
Definition at line 367 of file stairs.cpp.
References IsShowFloor(), and ShowFloorsList.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Stairwell::Check | ( | Vector3 | position, |
int | current_floor, | ||
int | previous_floor ) |
Definition at line 404 of file stairs.cpp.
References SBS::Floor::Enabled(), SBS::Floor::EnableGroup(), EnableRange(), EnableWhole(), SBS::SBS::GetFloor(), Inside, SBS::SBS::InStairwell, SBS::Floor::IsEnabled, SBS::Floor::IsInGroup(), IsInside(), SBS::ObjectBase::sbs, SBS_PROFILE, ShowFloors, ShowFloorsList, ShowFullStairs, SBS::SBS::StairsDisplayRange, and SBS::SBS::StairsOutsideDisplayRange.
Referenced by SBS::Camera::CheckStairwell().
void SBS::Stairwell::CutFloors | ( | bool | relative, |
const Vector2 & | start, | ||
const Vector2 & | end, | ||
Real | startvoffset, | ||
Real | endvoffset ) |
Definition at line 225 of file stairs.cpp.
References SBS::Floor::Altitude, SBS::Floor::Cut(), SBS::Utility::Cut(), cutend, cutstart, endfloor, SBS::SBS::External, SBS::Floor::FullHeight(), SBS::SBS::GetFloor(), SBS::Object::GetPosition(), SBS::SBS::GetUtility(), Report(), SBS::ObjectBase::sbs, startfloor, and SBS::MeshObject::Walls.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
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().
void SBS::Stairwell::EnableWhole | ( | bool | value, |
bool | force = false ) |
Definition at line 134 of file stairs.cpp.
References dynamic_mesh, SBS::DoorWrapper::Enabled(), SBS::DynamicMesh::Enabled(), SBS::Stairwell::Level::Enabled(), SBS::Stairwell::Level::enabled, endfloor, GetLevel(), IsEnabled, ShowFullStairs, and startfloor.
Referenced by Check(), SBS::StairwellManager::EnableAll(), Skyscraper::MeshControl::On_chkAllStairs_Click(), and OnInit().
DynamicMesh * SBS::Stairwell::GetDynamicMesh | ( | ) |
Definition at line 501 of file stairs.cpp.
References dynamic_mesh.
Referenced by SBS::Stairwell::Level::Level().
Stairwell::Level * SBS::Stairwell::GetLevel | ( | int | floor | ) |
Definition at line 112 of file stairs.cpp.
References Levels.
Referenced by SBS::Floor::CutAll(), SBS::Floor::EnableGroup(), EnableRange(), EnableWhole(), Skyscraper::ScriptProcessor::Section::GetMeshObject(), IsInside(), IsValidFloor(), Skyscraper::MeshControl::On_chkStairs_Click(), and Skyscraper::ScriptProcessor::FloorSection::Run().
bool SBS::Stairwell::IsInside | ( | const Vector3 & | position | ) |
Definition at line 161 of file stairs.cpp.
References SBS::Floor::Altitude, checkfirstrun, endfloor, SBS::Floor::FullHeight(), SBS::Floor::GetBase(), SBS::SBS::GetFloor(), SBS::SBS::GetFloorNumber(), GetLevel(), SBS::Stairwell::Level::GetMeshObject(), SBS::MeshObject::HitBeam(), lastcheckresult, lastfloor, lastfloorset, lastposition, SBS::ObjectBase::sbs, and startfloor.
Referenced by Check().
bool SBS::Stairwell::IsShowFloor | ( | int | floor | ) |
Definition at line 392 of file stairs.cpp.
References ShowFloorsList.
Referenced by AddShowFloor(), and SBS::SBS::EnableFloorRange().
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().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 494 of file stairs.cpp.
References SBS::Object::LoopChildren().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 357 of file stairs.cpp.
References EnableWhole(), and ShowFullStairs.
void SBS::Stairwell::RemoveShowFloor | ( | int | floor | ) |
Definition at line 378 of file stairs.cpp.
References ShowFloorsList.
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().
|
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().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 345 of file stairs.cpp.
References SBS::ObjectBase::ReportError(), StairsNum, and SBS::ToString().
void SBS::Stairwell::SetShowFull | ( | int | value | ) |
Definition at line 122 of file stairs.cpp.
References dynamic_mesh, SBS::DynamicMesh::force_combine, and ShowFullStairs.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
|
private |
Definition at line 156 of file stairs.h.
Referenced by IsInside(), and Stairwell().
Vector2 SBS::Stairwell::cutend |
Definition at line 38 of file stairs.h.
Referenced by CutFloors(), and Stairwell().
Vector2 SBS::Stairwell::cutstart |
Definition at line 37 of file stairs.h.
Referenced by CutFloors(), and Stairwell().
|
private |
Definition at line 148 of file stairs.h.
Referenced by ~Stairwell().
|
private |
Definition at line 151 of file stairs.h.
Referenced by EnableWhole(), GetDynamicMesh(), SetShowFull(), Stairwell(), and ~Stairwell().
int SBS::Stairwell::endfloor |
Definition at line 36 of file stairs.h.
Referenced by CutFloors(), EnableRange(), EnableWhole(), IsInside(), IsValidFloor(), and Stairwell().
bool SBS::Stairwell::Inside |
Definition at line 39 of file stairs.h.
Referenced by Check(), and Stairwell().
bool SBS::Stairwell::IsEnabled |
Definition at line 40 of file stairs.h.
Referenced by SBS::Stairwell::Level::Enabled(), SBS::Floor::EnableGroup(), EnableWhole(), and Stairwell().
|
private |
Definition at line 155 of file stairs.h.
Referenced by IsInside(), and Stairwell().
|
private |
Definition at line 144 of file stairs.h.
Referenced by IsInside(), and Stairwell().
|
private |
Definition at line 145 of file stairs.h.
Referenced by IsInside(), and Stairwell().
|
private |
Definition at line 154 of file stairs.h.
Referenced by IsInside(), and Stairwell().
|
private |
Definition at line 141 of file stairs.h.
Referenced by GetLevel(), ReplaceTexture(), Stairwell(), and ~Stairwell().
bool SBS::Stairwell::ShowFloors |
Definition at line 41 of file stairs.h.
Referenced by Check(), SBS::SBS::EnableFloorRange(), Skyscraper::ScriptProcessor::CommandsSection::Run(), and Stairwell().
|
private |
Definition at line 142 of file stairs.h.
Referenced by AddShowFloor(), Check(), IsShowFloor(), and RemoveShowFloor().
int SBS::Stairwell::ShowFullStairs |
Definition at line 42 of file stairs.h.
Referenced by Check(), EnableWhole(), OnInit(), SetShowFull(), and Stairwell().
int SBS::Stairwell::StairsNum |
Definition at line 34 of file stairs.h.
Referenced by SBS::SBS::DeleteObject(), SBS::Floor::GetStairwellList(), SBS::Stairwell::Level::Level(), Report(), ReportError(), and Stairwell().
int SBS::Stairwell::startfloor |
Definition at line 35 of file stairs.h.
Referenced by CutFloors(), EnableRange(), EnableWhole(), IsInside(), and Stairwell().