|
Skyscraper 2.0
|
#include <trigger.h>


Public Member Functions | |
| Trigger (Object *parent, const std::string &name, bool permanent, const std::string &sound_file, Vector3 area_min, Vector3 area_max, const std::vector< std::string > &action_names) | |
| ~Trigger () | |
| void | Enabled (bool value) |
| bool | SetSelectPosition (int position) |
| bool | ChangeSelectPosition (int position) |
| bool | NextSelectPosition (bool check_state=true) |
| bool | PreviousSelectPosition (bool check_state=true) |
| int | GetSelectPosition () |
| std::string | GetPositionAction (int position) |
| std::string | GetSelectPositionAction () |
| int | GetNextSelectPosition () |
| int | GetPreviousSelectPosition () |
| int | GetPositions () |
| void | PlaySound () |
| int | FindActionPosition (const std::string &name) |
| bool | DoAction () |
| void | Loop () |
| bool | IsInside () |
| bool | IsInside (const Vector3 &position) |
| bool | IsInside (const Vector3 &v1, const Vector3 &v2) |
| bool | IsEnabled () |
| Ogre::AxisAlignedBox | GetBounds (bool relative=false) |
| Vector3 | GetMin () |
| Vector3 | GetMax () |
| bool | IsOutside (const Vector3 &position) |
| bool | IsOutside (Vector3 v1, Vector3 v2) |
| virtual void | OnEntry () |
| virtual void | OnExit () |
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 | 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 () |
| 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) |
Private Attributes | |
| Ogre::AxisAlignedBox * | area_box |
| int | current_position |
| bool | is_inside |
| bool | is_enabled |
| std::vector< std::string > | Actions |
| Sound * | sound |
Additional Inherited Members | |
Public Attributes inherited from SBS::Object | |
| std::string | command |
| std::string | command_processed |
| std::string | context |
| int | linenum |
| std::string | includefile |
| bool | parent_deleting |
Protected Member Functions inherited from SBS::Object | |
| void | EnableLoop (bool value) |
| void | LoopChildren () |
| bool | SelfDestruct () |
Protected Attributes inherited from SBS::ObjectBase | |
| SBS * | sbs |
| SBS::Trigger::Trigger | ( | Object * | parent, |
| const std::string & | name, | ||
| bool | permanent, | ||
| const std::string & | sound_file, | ||
| Vector3 | area_min, | ||
| Vector3 | area_max, | ||
| const std::vector< std::string > & | action_names ) |
Definition at line 39 of file trigger.cpp.
References Actions, area_box, current_position, SBS::Object::EnableLoop(), is_enabled, is_inside, SBS::Sound::Load(), SBS::Object::SetValues(), and sound.

| SBS::Trigger::~Trigger | ( | ) |
Definition at line 68 of file trigger.cpp.
References area_box, SBS::SBS::FastDelete, SBS::ObjectBase::GetParent(), SBS::Object::GetType(), SBS::Object::parent_deleting, SBS::SBS::RemoveTrigger(), SBS::ObjectBase::sbs, and sound.

| bool SBS::Trigger::ChangeSelectPosition | ( | int | position | ) |
Definition at line 125 of file trigger.cpp.
References current_position, and SetSelectPosition().
Referenced by NextSelectPosition(), and PreviousSelectPosition().

| bool SBS::Trigger::DoAction | ( | ) |
Definition at line 241 of file trigger.cpp.
References Actions, current_position, SBS::SBS::GetAction(), SBS::ObjectBase::GetName(), SBS::ObjectBase::ReportError(), and SBS::ObjectBase::sbs.
Referenced by Loop().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 102 of file trigger.cpp.
References SBS::Object::EnableLoop(), and is_enabled.

| int SBS::Trigger::FindActionPosition | ( | const std::string & | name | ) |
Definition at line 227 of file trigger.cpp.
References GetPositionAction(), and GetPositions().

| Ogre::AxisAlignedBox SBS::Trigger::GetBounds | ( | bool | relative = false | ) |
Definition at line 354 of file trigger.cpp.
References area_box, and SBS::Object::GetPosition().

| Vector3 SBS::Trigger::GetMax | ( | ) |
Definition at line 401 of file trigger.cpp.
References area_box.
| Vector3 SBS::Trigger::GetMin | ( | ) |
Definition at line 396 of file trigger.cpp.
References area_box.
| int SBS::Trigger::GetNextSelectPosition | ( | ) |
Definition at line 147 of file trigger.cpp.
References current_position, and GetPositions().
Referenced by Loop(), and NextSelectPosition().

| std::string SBS::Trigger::GetPositionAction | ( | int | position | ) |
Definition at line 196 of file trigger.cpp.
References Actions, SBS::SBS::GetAction(), and SBS::ObjectBase::sbs.
Referenced by FindActionPosition(), GetSelectPositionAction(), and Loop().

| int SBS::Trigger::GetPositions | ( | ) |
Definition at line 221 of file trigger.cpp.
References Actions.
Referenced by FindActionPosition(), GetNextSelectPosition(), GetPreviousSelectPosition(), and SetSelectPosition().
| int SBS::Trigger::GetPreviousSelectPosition | ( | ) |
Definition at line 169 of file trigger.cpp.
References current_position, and GetPositions().
Referenced by PreviousSelectPosition().

| int SBS::Trigger::GetSelectPosition | ( | ) |
Definition at line 190 of file trigger.cpp.
References current_position.
| std::string SBS::Trigger::GetSelectPositionAction | ( | ) |
Definition at line 215 of file trigger.cpp.
References current_position, and GetPositionAction().
Referenced by Loop().

|
inlinevirtual |
Reimplemented from SBS::Object.
| bool SBS::Trigger::IsInside | ( | ) |
Definition at line 330 of file trigger.cpp.
References is_inside.
Referenced by IsOutside(), SBS::ElevatorDoor::IsSensorBlocked(), and Loop().
| bool SBS::Trigger::IsInside | ( | const Vector3 & | position | ) |
Definition at line 337 of file trigger.cpp.
References area_box, and SBS::Object::GetPosition().

Definition at line 344 of file trigger.cpp.
References area_box.
| bool SBS::Trigger::IsOutside | ( | const Vector3 & | position | ) |
Definition at line 370 of file trigger.cpp.
References IsInside().
Referenced by SBS::SceneNode::Move(), and SBS::SceneNode::SetPosition().

Definition at line 377 of file trigger.cpp.
References area_box, and SBS::Object::GetPosition().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 267 of file trigger.cpp.
References SBS::SBS::camera, DoAction(), SBS::ObjectBase::GetName(), GetNextSelectPosition(), SBS::ObjectBase::GetParent(), SBS::Camera::GetPosition(), GetPositionAction(), GetSelectPositionAction(), is_enabled, is_inside, IsInside(), SBS::IsNumeric(), NextSelectPosition(), OnEntry(), OnExit(), PlaySound(), PreviousSelectPosition(), SBS::ObjectBase::Report(), SBS::ObjectBase::sbs, SBS_PROFILE, and SBS::SBS::Verbose.
Referenced by SBS::ElevatorDoor::CheckSensor().

| bool SBS::Trigger::NextSelectPosition | ( | bool | check_state = true | ) |
Definition at line 135 of file trigger.cpp.
References ChangeSelectPosition(), GetNextSelectPosition(), and SetSelectPosition().
Referenced by Loop().

|
inlinevirtual |
|
inlinevirtual |
| void SBS::Trigger::PlaySound | ( | ) |
Definition at line 179 of file trigger.cpp.
References SBS::Sound::Play(), SBS::Sound::SetLoopState(), and sound.
Referenced by Loop().

| bool SBS::Trigger::PreviousSelectPosition | ( | bool | check_state = true | ) |
Definition at line 157 of file trigger.cpp.
References ChangeSelectPosition(), GetPreviousSelectPosition(), and SetSelectPosition().
Referenced by Loop().

| bool SBS::Trigger::SetSelectPosition | ( | int | position | ) |
Definition at line 113 of file trigger.cpp.
References current_position, and GetPositions().
Referenced by ChangeSelectPosition(), NextSelectPosition(), and PreviousSelectPosition().

|
private |
Definition at line 68 of file trigger.h.
Referenced by DoAction(), GetPositionAction(), GetPositions(), and Trigger().
|
private |
Definition at line 64 of file trigger.h.
Referenced by GetBounds(), GetMax(), GetMin(), IsInside(), IsInside(), IsOutside(), Trigger(), and ~Trigger().
|
private |
Definition at line 65 of file trigger.h.
Referenced by ChangeSelectPosition(), DoAction(), GetNextSelectPosition(), GetPreviousSelectPosition(), GetSelectPosition(), GetSelectPositionAction(), SetSelectPosition(), and Trigger().
|
private |
|
private |
Definition at line 66 of file trigger.h.
Referenced by IsInside(), Loop(), and Trigger().
|
private |
Definition at line 70 of file trigger.h.
Referenced by PlaySound(), Trigger(), and ~Trigger().