Skyscraper 2.0
SBS::Stairwell::Level Class Reference

#include <stairs.h>

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

Public Member Functions

 Level (Stairwell *parent, int number)
 
 ~Level ()
 
WallAddStairs (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)
 
WallAddWall (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)
 
WallAddFloor (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)
 
DoorAddDoor (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)
 
DoorCreateDoor (std::string name, const std::string &open_sound, const std::string &close_sound, bool rotate)
 
DoorGetDoor (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)
 
LightAddLight (const std::string &name, int type)
 
LightGetLight (const std::string &name)
 
MeshObjectGetMeshObject ()
 
ModelAddModel (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)
 
PrimitiveAddPrimitive (const std::string &name)
 
void AddPrimitive (Primitive *primitive)
 
CustomObjectAddCustomObject (const std::string &name, const Vector3 &position, const Vector3 &rotation, Real max_render_distance=0, Real scale_multiplier=1)
 
void AddCustomObject (CustomObject *object)
 
ControlAddControl (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)
 
TriggerAddTrigger (const std::string &name, const std::string &sound_file, Vector3 &area_min, Vector3 &area_max, std::vector< std::string > &action_names)
 
ModelGetModel (std::string name)
 
PrimitiveGetPrimitive (std::string name)
 
CustomObjectGetCustomObject (std::string name)
 
void ReplaceTexture (const std::string &oldtexture, const std::string &newtexture)
 
int GetFloor ()
 
void Loop ()
 
CameraTextureAddCameraTexture (const std::string &name, int quality, Real fov, const Vector3 &position, bool use_rotation, const Vector3 &rotation)
 
void RemoveCameraTexture (CameraTexture *camtex)
 
- 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)
 
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 ()
 
virtual void Report (const std::string &message)
 
virtual bool ReportError (const std::string &message)
 

Public Attributes

bool enabled
 
- 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

MeshObjectmesh
 
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
 
Stairwellparent
 

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 64 of file stairs.h.

Constructor & Destructor Documentation

◆ Level()

◆ ~Level()

SBS::Stairwell::Level::~Level ( )

Definition at line 526 of file stairs.cpp.

Member Function Documentation

◆ AddCameraTexture()

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().

◆ AddControl()

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().

Here is the call graph for this function:

◆ AddCustomObject() [1/2]

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().

◆ AddCustomObject() [2/2]

void SBS::Stairwell::Level::AddCustomObject ( CustomObject * object)

Definition at line 1143 of file stairs.cpp.

◆ AddDoor()

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 )

◆ AddFloor() [1/2]

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().

◆ AddFloor() [2/2]

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.

Here is the call graph for this function:

◆ AddLight()

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().

◆ AddModel() [1/2]

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().

◆ AddModel() [2/2]

void SBS::Stairwell::Level::AddModel ( Model * model)

Definition at line 1095 of file stairs.cpp.

◆ AddPrimitive() [1/2]

Primitive * SBS::Stairwell::Level::AddPrimitive ( const std::string & name)

Definition at line 1111 of file stairs.cpp.

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

◆ AddPrimitive() [2/2]

void SBS::Stairwell::Level::AddPrimitive ( Primitive * primitive)

Definition at line 1119 of file stairs.cpp.

◆ AddStairs()

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 )

◆ AddTrigger()

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.

◆ AddWall() [1/2]

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().

◆ AddWall() [2/2]

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.

Here is the call graph for this function:

◆ CreateDoor()

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().

Here is the call graph for this function:

◆ Cut()

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().

Here is the call graph for this function:

◆ Enabled()

void SBS::Stairwell::Level::Enabled ( bool value)
virtual

◆ GetCustomObject()

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().

Here is the call graph for this function:

◆ GetDoor()

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().

Here is the call graph for this function:

◆ GetFloor()

int SBS::Stairwell::Level::GetFloor ( )

Definition at line 1237 of file stairs.cpp.

◆ GetLight()

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().

Here is the call graph for this function:

◆ GetMeshObject()

MeshObject * SBS::Stairwell::Level::GetMeshObject ( )

◆ GetModel()

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().

Here is the call graph for this function:

◆ GetPrimitive()

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().

Here is the call graph for this function:

◆ IsEnabled()

bool SBS::Stairwell::Level::IsEnabled ( )

Definition at line 959 of file stairs.cpp.

◆ Loop()

void SBS::Stairwell::Level::Loop ( )
virtual

Reimplemented from SBS::Object.

Definition at line 1242 of file stairs.cpp.

References SBS::Object::LoopChildren().

Here is the call graph for this function:

◆ RemoveCameraTexture()

void SBS::Stairwell::Level::RemoveCameraTexture ( CameraTexture * camtex)

Definition at line 1257 of file stairs.cpp.

◆ RemoveControl()

void SBS::Stairwell::Level::RemoveControl ( Control * control)

Definition at line 1029 of file stairs.cpp.

◆ RemoveCustomObject()

void SBS::Stairwell::Level::RemoveCustomObject ( CustomObject * object)

Definition at line 1016 of file stairs.cpp.

◆ RemoveDoor()

void SBS::Stairwell::Level::RemoveDoor ( Door * door)

Definition at line 964 of file stairs.cpp.

◆ RemoveLight()

void SBS::Stairwell::Level::RemoveLight ( Light * light)

Definition at line 977 of file stairs.cpp.

◆ RemoveModel()

void SBS::Stairwell::Level::RemoveModel ( Model * model)

Definition at line 990 of file stairs.cpp.

◆ RemovePrimitive()

void SBS::Stairwell::Level::RemovePrimitive ( Primitive * prim)

Definition at line 1003 of file stairs.cpp.

◆ RemoveTrigger()

void SBS::Stairwell::Level::RemoveTrigger ( Trigger * trigger)

Definition at line 1042 of file stairs.cpp.

◆ ReplaceTexture()

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

Definition at line 1232 of file stairs.cpp.

Member Data Documentation

◆ CameraTextureArray

std::vector<CameraTexture*> SBS::Stairwell::Level::CameraTextureArray
private

Definition at line 134 of file stairs.h.

◆ ControlArray

std::vector<Control*> SBS::Stairwell::Level::ControlArray
private

Definition at line 128 of file stairs.h.

◆ CustomObjectArray

std::vector<CustomObject*> SBS::Stairwell::Level::CustomObjectArray
private

Definition at line 125 of file stairs.h.

◆ DoorArray

std::vector<Door*> SBS::Stairwell::Level::DoorArray
private

Definition at line 113 of file stairs.h.

◆ enabled

bool SBS::Stairwell::Level::enabled

Definition at line 107 of file stairs.h.

Referenced by SBS::Stairwell::EnableWhole(), and Level().

◆ floornum

int SBS::Stairwell::Level::floornum
private

Definition at line 136 of file stairs.h.

Referenced by Level().

◆ lights

std::vector<Light*> SBS::Stairwell::Level::lights
private

Definition at line 116 of file stairs.h.

◆ mesh

MeshObject* SBS::Stairwell::Level::mesh
private

Definition at line 110 of file stairs.h.

Referenced by Level().

◆ ModelArray

std::vector<Model*> SBS::Stairwell::Level::ModelArray
private

Definition at line 119 of file stairs.h.

◆ parent

Stairwell* SBS::Stairwell::Level::parent
private

Definition at line 137 of file stairs.h.

Referenced by Level().

◆ PrimArray

std::vector<Primitive*> SBS::Stairwell::Level::PrimArray
private

Definition at line 122 of file stairs.h.


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