Skyscraper 2.0
|
#include <stairs.h>
Public Member Functions | |
Level (Stairwell *parent, int number) | |
~Level () | |
Wall * | AddStairs (const std::string &name, const std::string &riser_texture, const std::string &tread_texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real risersize, Real treadsize, int num_stairs, Real voffset, Real tw, Real th) |
Wall * | AddWall (const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height1, Real height2, Real voffset1, Real voffset2, Real tw, Real th) |
bool | AddWall (Wall *wall, const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height1, Real height2, Real voffset1, Real voffset2, Real tw, Real th) |
Wall * | AddFloor (const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real voffset1, Real voffset2, bool reverse_axis, bool texture_direction, Real tw, Real th, bool legacy_behavior=false) |
bool | AddFloor (Wall *wall, const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real voffset1, Real voffset2, bool reverse_axis, bool texture_direction, Real tw, Real th, bool legacy_behavior=false) |
void | Enabled (bool value) |
Door * | AddDoor (std::string name, const std::string &open_sound, const std::string &close_sound, bool open_state, const std::string &texture, const std::string &side_texture, Real thickness, const std::string &face_direction, const std::string &open_direction, bool rotate, Real open_speed, Real close_speed, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th) |
Door * | CreateDoor (std::string name, const std::string &open_sound, const std::string &close_sound, bool rotate) |
Door * | GetDoor (const std::string &name) |
bool | Cut (bool relative, const Vector3 &start, const Vector3 &end, bool cutwalls, bool cutfloors, int checkwallnumber=0) |
bool | IsEnabled () |
void | RemoveDoor (Door *door) |
void | RemoveLight (Light *light) |
void | RemoveModel (Model *model) |
void | RemovePrimitive (Primitive *prim) |
void | RemoveCustomObject (CustomObject *object) |
void | RemoveControl (Control *control) |
void | RemoveTrigger (Trigger *trigger) |
Light * | AddLight (const std::string &name, int type) |
Light * | GetLight (const std::string &name) |
MeshObject * | GetMeshObject () |
Model * | AddModel (const std::string &name, const std::string &filename, bool center, Vector3 position, Vector3 rotation, Real max_render_distance=0, Real scale_multiplier=1, bool enable_physics=false, Real restitution=0, Real friction=0, Real mass=0) |
void | AddModel (Model *model) |
Primitive * | AddPrimitive (const std::string &name) |
void | AddPrimitive (Primitive *primitive) |
CustomObject * | AddCustomObject (const std::string &name, const Vector3 &position, const Vector3 &rotation, Real max_render_distance=0, Real scale_multiplier=1) |
void | AddCustomObject (CustomObject *object) |
Control * | AddControl (const std::string &name, const std::string &sound, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real height, Real voffset, int selection_position, std::vector< std::string > &action_names, std::vector< std::string > &textures) |
Trigger * | AddTrigger (const std::string &name, const std::string &sound_file, Vector3 &area_min, Vector3 &area_max, std::vector< std::string > &action_names) |
Model * | GetModel (std::string name) |
Primitive * | GetPrimitive (std::string name) |
CustomObject * | GetCustomObject (std::string name) |
void | ReplaceTexture (const std::string &oldtexture, const std::string &newtexture) |
int | GetFloor () |
void | Loop () |
CameraTexture * | AddCameraTexture (const std::string &name, int quality, Real fov, const Vector3 &position, bool use_rotation, const Vector3 &rotation) |
void | RemoveCameraTexture (CameraTexture *camtex) |
![]() | |
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) |
virtual void | OnInit () |
void | RegisterLoop (Object *object) |
void | UnregisterLoop (Object *object) |
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 () |
virtual void | Report (const std::string &message) |
virtual bool | ReportError (const std::string &message) |
Public Attributes | |
bool | enabled |
![]() | |
std::string | command |
std::string | command_processed |
std::string | context |
int | linenum |
std::string | includefile |
bool | parent_deleting |
Private Attributes | |
MeshObject * | mesh |
std::vector< Door * > | DoorArray |
std::vector< Light * > | lights |
std::vector< Model * > | ModelArray |
std::vector< Primitive * > | PrimArray |
std::vector< CustomObject * > | CustomObjectArray |
std::vector< Control * > | ControlArray |
std::vector< CameraTexture * > | CameraTextureArray |
int | floornum |
Stairwell * | parent |
Additional Inherited Members | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
SBS::Stairwell::Level::Level | ( | Stairwell * | parent, |
int | number ) |
Definition at line 506 of file stairs.cpp.
References enabled, SBS::Object::EnableLoop(), floornum, SBS::Floor::GetBase(), SBS::Stairwell::GetDynamicMesh(), SBS::SBS::GetFloor(), SBS::ObjectBase::GetName(), mesh, parent, SBS::ObjectBase::sbs, SBS::ObjectBase::SetName(), SBS::Object::SetPositionY(), SBS::Object::SetValues(), SBS::Stairwell::StairsNum, and SBS::ToString().
SBS::Stairwell::Level::~Level | ( | ) |
Definition at line 526 of file stairs.cpp.
CameraTexture * SBS::Stairwell::Level::AddCameraTexture | ( | const std::string & | name, |
int | quality, | ||
Real | fov, | ||
const Vector3 & | position, | ||
bool | use_rotation, | ||
const Vector3 & | rotation ) |
Definition at line 1249 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
Control * SBS::Stairwell::Level::AddControl | ( | const std::string & | name, |
const std::string & | sound, | ||
const std::string & | direction, | ||
Real | CenterX, | ||
Real | CenterZ, | ||
Real | width, | ||
Real | height, | ||
Real | voffset, | ||
int | selection_position, | ||
std::vector< std::string > & | action_names, | ||
std::vector< std::string > & | textures ) |
Definition at line 1160 of file stairs.cpp.
References SBS::Object::Move().
Referenced by Skyscraper::ScriptProcessor::FloorSection::Run().
CustomObject * SBS::Stairwell::Level::AddCustomObject | ( | const std::string & | name, |
const Vector3 & | position, | ||
const Vector3 & | rotation, | ||
Real | max_render_distance = 0, | ||
Real | scale_multiplier = 1 ) |
Definition at line 1135 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Stairwell::Level::AddCustomObject | ( | CustomObject * | object | ) |
Definition at line 1143 of file stairs.cpp.
Door * SBS::Stairwell::Level::AddDoor | ( | std::string | name, |
const std::string & | open_sound, | ||
const std::string & | close_sound, | ||
bool | open_state, | ||
const std::string & | texture, | ||
const std::string & | side_texture, | ||
Real | thickness, | ||
const std::string & | face_direction, | ||
const std::string & | open_direction, | ||
bool | rotate, | ||
Real | open_speed, | ||
Real | close_speed, | ||
Real | CenterX, | ||
Real | CenterZ, | ||
Real | width, | ||
Real | height, | ||
Real | voffset, | ||
Real | tw, | ||
Real | th, | ||
Real | side_tw, | ||
Real | side_th ) |
Definition at line 839 of file stairs.cpp.
References SBS::Utility::AddDoorwayWalls(), SBS::Door::CreateDoor(), SBS::Floor::Cut(), SBS::Floor::GetBase(), SBS::SBS::GetFloor(), SBS::Object::GetPosition(), SBS::SBS::GetUtility(), SBS::Utility::ResetDoorwayWalls(), SBS::ObjectBase::sbs, and SBS::ToString().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run(), and Skyscraper::ScriptProcessor::FloorSection::Run().
Wall * SBS::Stairwell::Level::AddFloor | ( | const std::string & | name, |
const std::string & | texture, | ||
Real | thickness, | ||
Real | x1, | ||
Real | z1, | ||
Real | x2, | ||
Real | z2, | ||
Real | voffset1, | ||
Real | voffset2, | ||
bool | reverse_axis, | ||
bool | texture_direction, | ||
Real | tw, | ||
Real | th, | ||
bool | legacy_behavior = false ) |
Definition at line 755 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::FloorSection::Run().
bool SBS::Stairwell::Level::AddFloor | ( | Wall * | wall, |
const std::string & | name, | ||
const std::string & | texture, | ||
Real | thickness, | ||
Real | x1, | ||
Real | z1, | ||
Real | x2, | ||
Real | z2, | ||
Real | voffset1, | ||
Real | voffset2, | ||
bool | reverse_axis, | ||
bool | texture_direction, | ||
Real | tw, | ||
Real | th, | ||
bool | legacy_behavior = false ) |
Definition at line 769 of file stairs.cpp.
References SBS::SBS::AddFloorMain(), and SBS::ObjectBase::sbs.
Light * SBS::Stairwell::Level::AddLight | ( | const std::string & | name, |
int | type ) |
Definition at line 1055 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
Model * SBS::Stairwell::Level::AddModel | ( | const std::string & | name, |
const std::string & | filename, | ||
bool | center, | ||
Vector3 | position, | ||
Vector3 | rotation, | ||
Real | max_render_distance = 0, | ||
Real | scale_multiplier = 1, | ||
bool | enable_physics = false, | ||
Real | restitution = 0, | ||
Real | friction = 0, | ||
Real | mass = 0 ) |
Definition at line 1081 of file stairs.cpp.
References SBS::Model::load_error.
Referenced by Skyscraper::ScriptProcessor::FloorSection::Run().
void SBS::Stairwell::Level::AddModel | ( | Model * | model | ) |
Definition at line 1095 of file stairs.cpp.
Primitive * SBS::Stairwell::Level::AddPrimitive | ( | const std::string & | name | ) |
Definition at line 1111 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
void SBS::Stairwell::Level::AddPrimitive | ( | Primitive * | primitive | ) |
Definition at line 1119 of file stairs.cpp.
Wall * SBS::Stairwell::Level::AddStairs | ( | const std::string & | name, |
const std::string & | riser_texture, | ||
const std::string & | tread_texture, | ||
const std::string & | direction, | ||
Real | CenterX, | ||
Real | CenterZ, | ||
Real | width, | ||
Real | risersize, | ||
Real | treadsize, | ||
int | num_stairs, | ||
Real | voffset, | ||
Real | tw, | ||
Real | th ) |
Definition at line 621 of file stairs.cpp.
References SBS::SBS::DrawWalls(), SBS::SBS::GetTextureManager(), SBS::ObjectBase::Name, SBS::TextureManager::ResetTextureMapping(), SBS::SBS::ResetWalls(), SBS::ObjectBase::sbs, SBS::SetCase(), SBS::SBS::SetWallOrientation(), SBS::ToString(), and SBS::TrimString().
Referenced by Skyscraper::ScriptProcessor::FloorSection::Run().
Trigger * SBS::Stairwell::Level::AddTrigger | ( | const std::string & | name, |
const std::string & | sound_file, | ||
Vector3 & | area_min, | ||
Vector3 & | area_max, | ||
std::vector< std::string > & | action_names ) |
Definition at line 1171 of file stairs.cpp.
Wall * SBS::Stairwell::Level::AddWall | ( | const std::string & | name, |
const std::string & | texture, | ||
Real | thickness, | ||
Real | x1, | ||
Real | z1, | ||
Real | x2, | ||
Real | z2, | ||
Real | height1, | ||
Real | height2, | ||
Real | voffset1, | ||
Real | voffset2, | ||
Real | tw, | ||
Real | th ) |
Definition at line 732 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::FloorSection::Run().
bool SBS::Stairwell::Level::AddWall | ( | Wall * | wall, |
const std::string & | name, | ||
const std::string & | texture, | ||
Real | thickness, | ||
Real | x1, | ||
Real | z1, | ||
Real | x2, | ||
Real | z2, | ||
Real | height1, | ||
Real | height2, | ||
Real | voffset1, | ||
Real | voffset2, | ||
Real | tw, | ||
Real | th ) |
Definition at line 746 of file stairs.cpp.
References SBS::SBS::AddWallMain(), and SBS::ObjectBase::sbs.
Door * SBS::Stairwell::Level::CreateDoor | ( | std::string | name, |
const std::string & | open_sound, | ||
const std::string & | close_sound, | ||
bool | rotate ) |
Definition at line 899 of file stairs.cpp.
References SBS::ToString().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
bool SBS::Stairwell::Level::Cut | ( | bool | relative, |
const Vector3 & | start, | ||
const Vector3 & | end, | ||
bool | cutwalls, | ||
bool | cutfloors, | ||
int | checkwallnumber = 0 ) |
Definition at line 923 of file stairs.cpp.
References SBS::Utility::Cut(), SBS::SBS::GetFloor(), SBS::Object::GetPosition(), SBS::SBS::GetUtility(), and SBS::ObjectBase::sbs.
Referenced by SBS::Floor::CutAll().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 778 of file stairs.cpp.
References SBS::Stairwell::IsEnabled, and SBS_PROFILE.
Referenced by SBS::Floor::EnableGroup(), SBS::Stairwell::EnableRange(), SBS::Stairwell::EnableWhole(), and Skyscraper::MeshControl::On_chkStairs_Click().
CustomObject * SBS::Stairwell::Level::GetCustomObject | ( | std::string | name | ) |
Definition at line 1217 of file stairs.cpp.
References SBS::ObjectBase::GetName(), SBS::SetCase(), and SBS::SetCaseCopy().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
Door * SBS::Stairwell::Level::GetDoor | ( | const std::string & | name | ) |
Definition at line 913 of file stairs.cpp.
References SBS::ObjectBase::GetName().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
int SBS::Stairwell::Level::GetFloor | ( | ) |
Definition at line 1237 of file stairs.cpp.
Light * SBS::Stairwell::Level::GetLight | ( | const std::string & | name | ) |
Definition at line 1064 of file stairs.cpp.
References SBS::ObjectBase::GetName().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
MeshObject * SBS::Stairwell::Level::GetMeshObject | ( | ) |
Definition at line 1074 of file stairs.cpp.
Referenced by Skyscraper::ScriptProcessor::Section::GetMeshObject(), and SBS::Stairwell::IsInside().
Model * SBS::Stairwell::Level::GetModel | ( | std::string | name | ) |
Definition at line 1187 of file stairs.cpp.
References SBS::ObjectBase::GetName(), SBS::SetCase(), and SBS::SetCaseCopy().
Referenced by Skyscraper::ScriptProcessor::Section::GetMeshObject().
Primitive * SBS::Stairwell::Level::GetPrimitive | ( | std::string | name | ) |
Definition at line 1202 of file stairs.cpp.
References SBS::ObjectBase::GetName(), SBS::SetCase(), and SBS::SetCaseCopy().
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
bool SBS::Stairwell::Level::IsEnabled | ( | ) |
Definition at line 959 of file stairs.cpp.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 1242 of file stairs.cpp.
References SBS::Object::LoopChildren().
void SBS::Stairwell::Level::RemoveCameraTexture | ( | CameraTexture * | camtex | ) |
Definition at line 1257 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveControl | ( | Control * | control | ) |
Definition at line 1029 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveCustomObject | ( | CustomObject * | object | ) |
Definition at line 1016 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveDoor | ( | Door * | door | ) |
Definition at line 964 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveLight | ( | Light * | light | ) |
Definition at line 977 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveModel | ( | Model * | model | ) |
Definition at line 990 of file stairs.cpp.
void SBS::Stairwell::Level::RemovePrimitive | ( | Primitive * | prim | ) |
Definition at line 1003 of file stairs.cpp.
void SBS::Stairwell::Level::RemoveTrigger | ( | Trigger * | trigger | ) |
Definition at line 1042 of file stairs.cpp.
void SBS::Stairwell::Level::ReplaceTexture | ( | const std::string & | oldtexture, |
const std::string & | newtexture ) |
Definition at line 1232 of file stairs.cpp.
|
private |
|
private |
|
private |
|
private |
bool SBS::Stairwell::Level::enabled |
Definition at line 107 of file stairs.h.
Referenced by SBS::Stairwell::EnableWhole(), and Level().
|
private |
|
private |
|
private |
|
private |
|
private |