|
Skyscraper 2.0
|
#include <door.h>


Classes | |
| class | Timer |
Public Member Functions | |
| Door (Object *parent, DynamicMesh *wrapper, const std::string &name, const std::string &open_sound, const std::string &close_sound, bool rotate) | |
| ~Door () | |
| bool | Open (Vector3 &position, bool playsound=true, bool force=false) |
| void | Close (bool playsound=true) |
| bool | IsOpen () |
| void | Enabled (bool value) |
| bool | IsEnabled () |
| void | Loop () |
| void | ClickDoor (Vector3 &position) |
| void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
| void | Report (const std::string &message) |
| bool | ReportError (const std::string &message) |
| bool | GetDoorChanged () |
| bool | GetPreviousOpen () |
| DoorWrapper * | CreateDoor (bool open_state, const std::string &texture, const std::string &side_texture, Real thickness, const std::string &face_direction, const std::string &open_direction, 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) |
| DoorWrapper * | AddDoorComponent (const std::string &name, const std::string &texture, const std::string &sidetexture, Real thickness, const std::string &face_direction, const std::string &open_direction, bool OpenClockwise, Real OpenSpeed, Real CloseSpeed, Real x1, Real z1, Real x2, Real z2, Real height, Real voffset, Real tw, Real th, Real side_tw, Real side_th) |
| DoorWrapper * | FinishDoor (bool open_state) |
| void | AutoClose (int interval) |
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) |
| 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, bool force=false) |
| virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0, bool force=false) |
| virtual void | SetPosition (const Vector3 &position, bool relative=false, bool force=false) |
| virtual void | SetPosition (Real X, Real Y, Real Z, bool relative=false, bool force=false) |
| virtual void | SetPositionY (Real value, bool force=false) |
| 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 | 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 () |
| Object * | GetParent () |
| SBS * | GetRoot () |
| void | SetName (const std::string &name) |
| const std::string & | GetName () |
| std::string | GetNameBase () |
Public Member Functions inherited from SBS::DoorLock | |
| DoorLock (Object *parent) | |
| virtual | ~DoorLock () |
| void | SetDirection (bool direction) |
| void | SetLocked (int side, int keyid) |
| bool | GetSide (const Vector3 &position) |
| bool | IsLocked (const Vector3 &position) |
| bool | ToggleLock (const Vector3 &position, bool force=false) |
| int | GetKeyID () |
Public Attributes | |
| bool | DoorDirection |
| bool | OpenState |
| bool | IsMoving |
| bool | OpenDoor |
| std::string | OpenSound |
| std::string | CloseSound |
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 Member Functions | |
| void | MoveDoor () |
Private Attributes | |
| DoorWrapper * | door |
| DynamicMesh * | wrapper |
| Sound * | sound |
| bool | is_enabled |
| bool | door_changed |
| bool | previous_open |
| bool | running |
| Timer * | timer |
| int | timer_interval |
Additional Inherited Members | |
Protected Member Functions inherited from SBS::Object | |
| void | EnableLoop (bool value) |
| void | LoopChildren () |
| bool | SelfDestruct () |
Protected Attributes inherited from SBS::ObjectBase | |
| SBS * | sbs |
| SBS::Door::Door | ( | Object * | parent, |
| DynamicMesh * | wrapper, | ||
| const std::string & | name, | ||
| const std::string & | open_sound, | ||
| const std::string & | close_sound, | ||
| bool | rotate ) |
Definition at line 53 of file door.cpp.
References CloseSound, door, door_changed, DoorDirection, is_enabled, IsMoving, OpenDoor, OpenSound, OpenState, previous_open, running, SBS::Object::SetValues(), sound, timer, timer_interval, and wrapper.

| SBS::Door::~Door | ( | ) |
Definition at line 85 of file door.cpp.
References door, SBS::SBS::FastDelete, SBS::SBS::GetDoorManager(), SBS::ObjectBase::GetParent(), SBS::Object::GetType(), SBS::Object::parent_deleting, SBS::DoorManager::RemoveDoor(), SBS::ObjectBase::sbs, sound, and timer.

| DoorWrapper * SBS::Door::AddDoorComponent | ( | const std::string & | name, |
| const std::string & | texture, | ||
| const std::string & | sidetexture, | ||
| Real | thickness, | ||
| const std::string & | face_direction, | ||
| const std::string & | open_direction, | ||
| bool | OpenClockwise, | ||
| Real | OpenSpeed, | ||
| Real | CloseSpeed, | ||
| Real | x1, | ||
| Real | z1, | ||
| Real | x2, | ||
| Real | z2, | ||
| Real | height, | ||
| Real | voffset, | ||
| Real | tw, | ||
| Real | th, | ||
| Real | side_tw, | ||
| Real | side_th ) |
Definition at line 357 of file door.cpp.
References SBS::SBS::AddWallMain(), SBS::DoorWrapper::CreateDoor(), SBS::MeshObject::CreateWallObject(), door, SBS::SBS::DrawWalls(), SBS::DoorComponent::extents_max, SBS::DoorComponent::extents_min, SBS::SBS::GetTextureManager(), SBS::DoorComponent::mesh, SBS::TextureManager::ResetTextureMapping(), SBS::SBS::ResetWalls(), SBS::ObjectBase::sbs, SBS::TextureManager::SetTextureFlip(), and wrapper.
Referenced by CreateDoor(), and Skyscraper::ScriptProcessor::CommandsSection::Run().

| void SBS::Door::AutoClose | ( | int | interval | ) |
Definition at line 493 of file door.cpp.
References SBS::TimerObject::Start(), SBS::TimerObject::Stop(), timer, and timer_interval.
Referenced by Open(), SBS::Action::Run(), and Skyscraper::ScriptProcessor::CommandsSection::Run().

| void SBS::Door::ClickDoor | ( | Vector3 & | position | ) |
| void SBS::Door::Close | ( | bool | playsound = true | ) |
Definition at line 165 of file door.cpp.
References CloseSound, door, SBS::Object::EnableLoop(), IsMoving, SBS::Sound::Load(), OpenDoor, OpenState, SBS::Sound::Play(), Report(), SBS::DoorWrapper::ResetFinished(), and sound.
Referenced by ClickDoor(), SBS::Door::Timer::Notify(), and SBS::Action::Run().

| DoorWrapper * SBS::Door::CreateDoor | ( | bool | open_state, |
| const std::string & | texture, | ||
| const std::string & | side_texture, | ||
| Real | thickness, | ||
| const std::string & | face_direction, | ||
| const std::string & | open_direction, | ||
| 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 294 of file door.cpp.
References AddDoorComponent(), door, FinishDoor(), SBS::SBS::GetConfigFloat(), SBS::ObjectBase::GetName(), SBS::Object::Move(), and SBS::ObjectBase::sbs.
Referenced by SBS::DoorManager::AddDoor(), SBS::ElevatorCar::AddDoor(), SBS::Floor::AddDoor(), SBS::Shaft::Level::AddDoor(), and SBS::Stairwell::Level::AddDoor().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 189 of file door.cpp.
References door, SBS::DoorWrapper::Enabled(), and is_enabled.

| DoorWrapper * SBS::Door::FinishDoor | ( | bool | open_state | ) |
Definition at line 414 of file door.cpp.
References door, DoorDirection, SBS::DoorWrapper::doors, SBS::Object::GetPosition(), SBS::DoorWrapper::Height, Open(), ReportError(), SBS::ObjectBase::sbs, SBS::DoorLock::SetDirection(), SBS::DoorWrapper::Shift, SBS::DoorWrapper::Thickness, SBS::SBS::ToLocal(), SBS::DoorWrapper::voffset, and SBS::DoorWrapper::Width.
Referenced by CreateDoor(), and Skyscraper::ScriptProcessor::CommandsSection::Run().

| bool SBS::Door::GetDoorChanged | ( | ) |
Definition at line 284 of file door.cpp.
References door_changed.
Referenced by SBS::DoorComponent::MoveDoors().
| bool SBS::Door::GetPreviousOpen | ( | ) |
Definition at line 289 of file door.cpp.
References previous_open.
Referenced by SBS::DoorComponent::MoveDoors().
|
inlinevirtual |
Reimplemented from SBS::Object.
| bool SBS::Door::IsOpen | ( | ) |
|
virtual |
Reimplemented from SBS::Object.
Definition at line 198 of file door.cpp.
References SBS::Object::EnableLoop(), IsMoving, MoveDoor(), and SBS_PROFILE.

|
private |
Definition at line 208 of file door.cpp.
References SBS::DoorWrapper::CheckDoorsOpen(), door, door_changed, SBS::DoorWrapper::IsFinished(), IsMoving, SBS::DoorWrapper::MoveDoors(), OpenDoor, OpenState, previous_open, and running.
Referenced by Loop().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 260 of file door.cpp.
References ClickDoor(), and SBS::DoorLock::ToggleLock().
Referenced by SBS::DoorWrapper::OnClick().

| bool SBS::Door::Open | ( | Vector3 & | position, |
| bool | playsound = true, | ||
| bool | force = false ) |
Definition at line 131 of file door.cpp.
References AutoClose(), door, SBS::Object::EnableLoop(), SBS::DoorLock::IsLocked(), IsMoving, SBS::Sound::Load(), OpenDoor, OpenSound, OpenState, SBS::Sound::Play(), Report(), ReportError(), SBS::DoorWrapper::ResetFinished(), sound, and timer_interval.
Referenced by ClickDoor(), FinishDoor(), and SBS::Action::Run().

|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 272 of file door.cpp.
References SBS::ObjectBase::GetName(), and SBS::ObjectBase::Report().
Referenced by Close(), and Open().

|
virtual |
Reimplemented from SBS::ObjectBase.
Definition at line 278 of file door.cpp.
References SBS::ObjectBase::GetName(), and SBS::ObjectBase::ReportError().
Referenced by FinishDoor(), and Open().

| std::string SBS::Door::CloseSound |
|
private |
Definition at line 66 of file door.h.
Referenced by AddDoorComponent(), Close(), CreateDoor(), Door(), Enabled(), FinishDoor(), MoveDoor(), Open(), and ~Door().
|
private |
Definition at line 73 of file door.h.
Referenced by Door(), GetDoorChanged(), and MoveDoor().
| bool SBS::Door::DoorDirection |
Definition at line 37 of file door.h.
Referenced by Door(), FinishDoor(), SBS::DoorComponent::Move(), SBS::DoorComponent::MoveDoors(), and SBS::DoorComponent::Reset().
|
private |
| bool SBS::Door::IsMoving |
Definition at line 39 of file door.h.
Referenced by ClickDoor(), Close(), Door(), Loop(), MoveDoor(), and Open().
| bool SBS::Door::OpenDoor |
| std::string SBS::Door::OpenSound |
| bool SBS::Door::OpenState |
|
private |
Definition at line 74 of file door.h.
Referenced by Door(), GetPreviousOpen(), and MoveDoor().
|
private |
Definition at line 75 of file door.h.
Referenced by Door(), and MoveDoor().
|
private |
|
private |
Definition at line 79 of file door.h.
Referenced by AutoClose(), Door(), and ~Door().
|
private |
Definition at line 80 of file door.h.
Referenced by AutoClose(), Door(), and Open().
|
private |
Definition at line 67 of file door.h.
Referenced by AddDoorComponent(), and Door().