Skyscraper 2.0
|
#include <shaft.h>
Classes | |
class | Level |
Public Member Functions | |
Shaft (Object *parent, int number, Real CenterX, Real CenterZ, int startfloor, int endfloor) | |
~Shaft () | |
void | EnableWhole (bool value, bool EnableShaftDoors, 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, bool EnableShaftDoors) |
void | AddShowFloor (int floor) |
void | RemoveShowFloor (int floor) |
bool | IsShowFloor (int floor) |
void | AddShowOutside (int floor) |
void | RemoveShowOutside (int floor) |
bool | IsShowOutside (int floor) |
void | AddShowInterfloor (int floor) |
void | RemoveShowInterfloor (int floor) |
bool | IsShowInterfloor (int floor) |
bool | IsValidFloor (int floor) |
void | AddElevator (int number) |
void | RemoveElevator (int number) |
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 | Check (Vector3 position, int current_floor) |
void | Loop () |
DynamicMesh * | GetShaftDoorContainer () |
void | SetShowFull (bool value) |
bool | GetShowFull () |
Level * | GetLevel (int floor) |
DynamicMesh * | GetDynamicMesh () |
DynamicMesh * | GetDoorWrapper () |
![]() | |
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 | ShaftNumber |
int | startfloor |
int | endfloor |
std::vector< int > | elevators |
bool | InsideShaft |
Real | bottom |
Real | top |
Vector2 | cutstart |
Vector2 | cutend |
bool | IsEnabled |
int | ShowFloors |
bool | ShowOutside |
bool | ShowInterfloors |
bool | EnableCheck |
![]() | |
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 |
std::vector< int > | ShowOutsideList |
std::vector< int > | ShowInterfloorsList |
bool | ShowFullShaft |
DynamicMesh * | DoorWrapper |
DynamicMesh * | ShaftDoorContainer |
Vector3 | lastposition |
bool | lastcheckresult |
bool | checkfirstrun |
bool | InElevator |
bool | ShowFloorsFull_Enabled |
DynamicMesh * | dynamic_mesh |
Additional Inherited Members | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
SBS::Shaft::Shaft | ( | Object * | parent, |
int | number, | ||
Real | CenterX, | ||
Real | CenterZ, | ||
int | startfloor, | ||
int | endfloor ) |
Definition at line 47 of file shaft.cpp.
References SBS::Floor::Altitude, bottom, checkfirstrun, cutend, cutstart, dynamic_mesh, EnableCheck, SBS::Object::EnableLoop(), endfloor, SBS::SBS::Floors, SBS::Floor::FullHeight(), SBS::SBS::GetFloor(), SBS::ObjectBase::GetName(), SBS::Object::GetSceneNode(), InElevator, InsideShaft, IsEnabled, lastcheckresult, lastposition, Levels, Report(), SBS::ObjectBase::sbs, SBS::ObjectBase::SetName(), SBS::Object::SetPosition(), SBS::Object::SetValues(), ShaftDoorContainer, ShaftNumber, ShowFloors, ShowFloorsFull_Enabled, ShowFullShaft, ShowInterfloors, ShowOutside, startfloor, top, SBS::ToString(), and SBS::TruncateNumber().
SBS::Shaft::~Shaft | ( | ) |
Definition at line 105 of file shaft.cpp.
References DoorWrapper, dynamic_mesh, SBS::SBS::FastDelete, Levels, SBS::Object::parent_deleting, SBS::SBS::RemoveShaft(), SBS::ObjectBase::sbs, and ShaftDoorContainer.
void SBS::Shaft::AddElevator | ( | int | number | ) |
Definition at line 446 of file shaft.cpp.
References elevators.
Referenced by SBS::Elevator::CreateElevator().
void SBS::Shaft::AddShowFloor | ( | int | floor | ) |
Definition at line 322 of file shaft.cpp.
References IsShowFloor(), and ShowFloorsList.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Shaft::AddShowInterfloor | ( | int | floor | ) |
Definition at line 396 of file shaft.cpp.
References IsShowInterfloor(), and ShowInterfloorsList.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Shaft::AddShowOutside | ( | int | floor | ) |
Definition at line 359 of file shaft.cpp.
References IsShowOutside(), and ShowOutsideList.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Shaft::Check | ( | Vector3 | position, |
int | current_floor ) |
Definition at line 501 of file shaft.cpp.
References SBS::SBS::camera, SBS::SBS::CarNumber, SBS::Camera::CurrentFloor, SBS::SBS::ElevatorNumber, SBS::SBS::EnableBuildings(), SBS::Floor::Enabled(), SBS::Floor::EnabledGroup, SBS::Floor::EnabledGroup_Floor, SBS::SBS::EnableExternal(), SBS::SBS::EnableFloorRange(), SBS::Floor::EnableInterfloor(), SBS::SBS::EnableLandscape(), EnableRange(), SBS::SBS::EnableSkybox(), EnableWhole(), SBS::SBS::FloorDisplayRange, SBS::Elevator::GetCar(), SBS::SBS::GetElevator(), SBS::SBS::GetFloor(), SBS::SBS::InElevator, InElevator, SBS::SBS::InShaft, InsideShaft, SBS::Floor::IsEnabled, SBS::Floor::IsInGroup(), IsInside(), SBS::Floor::IsInterfloorEnabled, SBS::Elevator::IsMoving, IsShowOutside(), SBS::Elevator::Leveling, SBS::Floor::Number, SBS::ObjectBase::sbs, SBS_PROFILE, SBS::SBS::ShaftDisplayRange, SBS::ElevatorCar::ShaftDoorsEnabledRange(), ShaftNumber, SBS::SBS::ShaftOutsideDisplayRange, ShowFloors, ShowFloorsFull_Enabled, ShowFloorsList, ShowFullShaft, ShowInterfloors, ShowInterfloorsList, and ShowOutside.
Referenced by SBS::Camera::CheckShaft().
void SBS::Shaft::CutFloors | ( | bool | relative, |
const Vector2 & | start, | ||
const Vector2 & | end, | ||
Real | startvoffset, | ||
Real | endvoffset ) |
Definition at line 208 of file shaft.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::Shaft::EnableRange | ( | int | floor, |
int | range, | ||
bool | value, | ||
bool | EnableShaftDoors ) |
Definition at line 270 of file shaft.cpp.
References SBS::Shaft::Level::Enabled(), endfloor, SBS::SBS::GetFloor(), GetLevel(), SBS::IsEven(), SBS::Floor::IsInGroup(), SBS::ObjectBase::sbs, SBS_PROFILE, ShowFullShaft, and startfloor.
Referenced by Check(), and SBS::Elevator::ResetShaftDoors().
void SBS::Shaft::EnableWhole | ( | bool | value, |
bool | EnableShaftDoors, | ||
bool | force = false ) |
Definition at line 145 of file shaft.cpp.
References dynamic_mesh, EnableCheck, SBS::DoorWrapper::Enabled(), SBS::DynamicMesh::Enabled(), SBS::Shaft::Level::Enabled(), SBS::Shaft::Level::enabled, endfloor, GetLevel(), IsEnabled, ShaftDoorContainer, ShowFullShaft, and startfloor.
Referenced by Check(), SBS::ShaftManager::EnableAll(), Skyscraper::MeshControl::On_chkAllShafts_Click(), and OnInit().
DynamicMesh * SBS::Shaft::GetDoorWrapper | ( | ) |
Definition at line 659 of file shaft.cpp.
References DoorWrapper.
DynamicMesh * SBS::Shaft::GetDynamicMesh | ( | ) |
Definition at line 654 of file shaft.cpp.
References dynamic_mesh.
Referenced by SBS::Shaft::Level::Level().
Shaft::Level * SBS::Shaft::GetLevel | ( | int | floor | ) |
Definition at line 135 of file shaft.cpp.
References Levels.
Referenced by SBS::Elevator::AddRails(), SBS::ElevatorDoor::AddShaftDoorComponent(), SBS::Floor::CutAll(), SBS::Floor::EnableGroup(), EnableRange(), EnableWhole(), SBS::ElevatorDoor::FinishDoors(), Skyscraper::ScriptProcessor::Section::GetMeshObject(), IsValidFloor(), Skyscraper::MeshControl::On_chkShafts_Click(), and Skyscraper::ScriptProcessor::FloorSection::Run().
|
inline |
Definition at line 73 of file shaft.h.
Referenced by SBS::ElevatorDoor::AddDoorComponent().
|
inline |
Definition at line 75 of file shaft.h.
Referenced by SBS::ElevatorManager::EnableAll(), SBS::ElevatorDoor::ShaftDoorsEnabled(), and SBS::ElevatorDoor::ShaftDoorsEnabledRange().
bool SBS::Shaft::IsInside | ( | const Vector3 & | position | ) |
Definition at line 175 of file shaft.cpp.
References bottom, checkfirstrun, lastcheckresult, lastposition, Levels, and top.
Referenced by Check().
bool SBS::Shaft::IsShowFloor | ( | int | floor | ) |
Definition at line 347 of file shaft.cpp.
References ShowFloorsList.
Referenced by AddShowFloor(), SBS::SBS::EnableFloorRange(), and SBS::ElevatorDoor::MoveDoors().
bool SBS::Shaft::IsShowInterfloor | ( | int | floor | ) |
Definition at line 421 of file shaft.cpp.
References ShowInterfloorsList.
Referenced by AddShowInterfloor().
bool SBS::Shaft::IsShowOutside | ( | int | floor | ) |
Definition at line 384 of file shaft.cpp.
References ShowOutsideList.
Referenced by AddShowOutside(), and Check().
bool SBS::Shaft::IsValidFloor | ( | int | floor | ) |
Definition at line 433 of file shaft.cpp.
References endfloor, and GetLevel().
Referenced by SBS::ElevatorCar::CheckServicedFloors(), SBS::SBS::DeleteObject(), and SBS::Floor::GetShaftList().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 647 of file shaft.cpp.
References SBS::Object::LoopChildren().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 491 of file shaft.cpp.
References EnableWhole(), and ShowFullShaft.
void SBS::Shaft::RemoveElevator | ( | int | number | ) |
void SBS::Shaft::RemoveShowFloor | ( | int | floor | ) |
Definition at line 333 of file shaft.cpp.
References ShowFloorsList.
void SBS::Shaft::RemoveShowInterfloor | ( | int | floor | ) |
Definition at line 407 of file shaft.cpp.
References ShowInterfloorsList.
void SBS::Shaft::RemoveShowOutside | ( | int | floor | ) |
Definition at line 370 of file shaft.cpp.
References ShowOutsideList.
void SBS::Shaft::ReplaceTexture | ( | const std::string & | oldtexture, |
const std::string & | newtexture ) |
Definition at line 485 of file shaft.cpp.
References Levels, and ReplaceTexture().
Referenced by ReplaceTexture(), and SBS::Action::Run().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 473 of file shaft.cpp.
References SBS::ObjectBase::Report(), ShaftNumber, and SBS::ToString().
Referenced by CutFloors(), and Shaft().
|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 479 of file shaft.cpp.
References SBS::ObjectBase::ReportError(), ShaftNumber, and SBS::ToString().
void SBS::Shaft::SetShowFull | ( | bool | value | ) |
Definition at line 664 of file shaft.cpp.
References dynamic_mesh, SBS::DynamicMesh::force_combine, ShaftDoorContainer, and ShowFullShaft.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
Real SBS::Shaft::bottom |
Definition at line 39 of file shaft.h.
Referenced by SBS::Shaft::Level::AddFloor(), IsInside(), and Shaft().
|
private |
Definition at line 172 of file shaft.h.
Referenced by IsInside(), and Shaft().
Vector2 SBS::Shaft::cutend |
Definition at line 42 of file shaft.h.
Referenced by CutFloors(), and Shaft().
Vector2 SBS::Shaft::cutstart |
Definition at line 41 of file shaft.h.
Referenced by CutFloors(), and Shaft().
|
private |
Definition at line 164 of file shaft.h.
Referenced by GetDoorWrapper(), and ~Shaft().
|
private |
Definition at line 177 of file shaft.h.
Referenced by EnableWhole(), GetDynamicMesh(), SetShowFull(), Shaft(), and ~Shaft().
std::vector<int> SBS::Shaft::elevators |
Definition at line 37 of file shaft.h.
Referenced by AddElevator(), and RemoveElevator().
bool SBS::Shaft::EnableCheck |
Definition at line 47 of file shaft.h.
Referenced by EnableWhole(), and Shaft().
int SBS::Shaft::endfloor |
Definition at line 36 of file shaft.h.
Referenced by SBS::ElevatorCar::CreateCar(), CutFloors(), EnableRange(), EnableWhole(), IsValidFloor(), and Shaft().
|
private |
bool SBS::Shaft::InsideShaft |
bool SBS::Shaft::IsEnabled |
Definition at line 43 of file shaft.h.
Referenced by SBS::Shaft::Level::Enabled(), SBS::Floor::EnableGroup(), EnableWhole(), SBS::Elevator::ResetShaftDoors(), and Shaft().
|
private |
Definition at line 171 of file shaft.h.
Referenced by IsInside(), and Shaft().
|
private |
Definition at line 170 of file shaft.h.
Referenced by IsInside(), and Shaft().
|
private |
Definition at line 157 of file shaft.h.
Referenced by GetLevel(), IsInside(), ReplaceTexture(), Shaft(), and ~Shaft().
|
private |
Definition at line 167 of file shaft.h.
Referenced by EnableWhole(), SetShowFull(), Shaft(), and ~Shaft().
int SBS::Shaft::ShaftNumber |
Definition at line 34 of file shaft.h.
Referenced by Check(), SBS::SBS::DeleteObject(), SBS::Floor::GetShaftList(), SBS::Shaft::Level::Level(), Report(), ReportError(), and Shaft().
int SBS::Shaft::ShowFloors |
Definition at line 44 of file shaft.h.
Referenced by Check(), SBS::SBS::EnableFloorRange(), SBS::ElevatorDoor::MoveDoors(), Skyscraper::ScriptProcessor::CommandsSection::Run(), and Shaft().
|
private |
|
private |
Definition at line 158 of file shaft.h.
Referenced by AddShowFloor(), Check(), IsShowFloor(), and RemoveShowFloor().
|
private |
Definition at line 161 of file shaft.h.
Referenced by Check(), EnableRange(), EnableWhole(), OnInit(), SetShowFull(), and Shaft().
bool SBS::Shaft::ShowInterfloors |
Definition at line 46 of file shaft.h.
Referenced by Check(), Skyscraper::ScriptProcessor::CommandsSection::Run(), and Shaft().
|
private |
Definition at line 160 of file shaft.h.
Referenced by AddShowInterfloor(), Check(), IsShowInterfloor(), and RemoveShowInterfloor().
bool SBS::Shaft::ShowOutside |
Definition at line 45 of file shaft.h.
Referenced by Check(), Skyscraper::ScriptProcessor::CommandsSection::Run(), and Shaft().
|
private |
Definition at line 159 of file shaft.h.
Referenced by AddShowOutside(), IsShowOutside(), and RemoveShowOutside().
int SBS::Shaft::startfloor |
Definition at line 35 of file shaft.h.
Referenced by CutFloors(), EnableRange(), EnableWhole(), and Shaft().
Real SBS::Shaft::top |
Definition at line 40 of file shaft.h.
Referenced by IsInside(), and Shaft().