|
Skyscraper 2.0
|
#include <model.h>


Public Member Functions | |
| Model (Object *parent, const std::string &name, const std::string &filename, bool center, const Vector3 &position, const Vector3 &rotation, Real max_render_distance=0, Real scale_multiplier=1, bool enable_physics=false, Real restitution=0, Real friction=0, Real mass=0) | |
| ~Model () | |
| bool | IsEnabled () |
| void | Enabled (bool value) |
| bool | IsKey () |
| int | GetKeyID () |
| void | SetKey (int keyid) |
| bool | IsPhysical () |
| void | Loop () |
| void | PickUp () |
| void | Drop () |
| bool | IsPickedUp () |
| MeshObject * | GetMeshObject () |
| void | OnInit () |
| bool | IsCustom () |
| void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
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) |
| 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) |
Public Attributes | |
| bool | load_error |
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 | RemoveFromParent () |
| void | AddToParent () |
Private Attributes | |
| MeshObject * | mesh |
| Vector3 | Offset |
| bool | is_key |
| int | KeyID |
| bool | global |
| bool | center |
| bool | custom |
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::Model::Model | ( | Object * | parent, |
| const std::string & | name, | ||
| const std::string & | filename, | ||
| bool | center, | ||
| const Vector3 & | position, | ||
| const 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 38 of file model.cpp.
References center, custom, Enabled(), SBS::MeshObject::EnablePhysics(), global, SBS::Object::Init(), is_key, SBS::Object::IsGlobal(), KeyID, load_error, mesh, SBS::MeshObject::model_loaded, SBS::Object::Move(), Offset, SBS::Object::SetRotation(), and SBS::Object::SetValues().

| SBS::Model::~Model | ( | ) |
Definition at line 75 of file model.cpp.
References SBS::SBS::FastDelete, mesh, SBS::Object::parent_deleting, RemoveFromParent(), and SBS::ObjectBase::sbs.

|
private |
Definition at line 137 of file model.cpp.
References SBS::SBS::AddModel(), SBS::ObjectBase::GetParent(), SBS::Object::GetType(), and SBS::ObjectBase::sbs.
Referenced by Drop(), and Loop().

| void SBS::Model::Drop | ( | ) |
Definition at line 225 of file model.cpp.
References AddToParent(), SBS::Object::ChangeParent(), SBS::SBS::GetElevator(), SBS::SBS::GetElevatorCount(), SBS::SBS::GetFloor(), SBS::SBS::GetFloorNumber(), SBS::Object::GetPosition(), global, SBS::Elevator::IsInElevator(), IsPickedUp(), and SBS::ObjectBase::sbs.
Referenced by SBS::Camera::DropModel().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 89 of file model.cpp.
References SBS::MeshObject::Enabled(), SBS::Object::EnableLoop(), and mesh.
Referenced by Model().

| int SBS::Model::GetKeyID | ( | ) |
|
inline |
Definition at line 47 of file model.h.
Referenced by Skyscraper::ScriptProcessor::Section::GetMeshObject().
|
inline |
Definition at line 49 of file model.h.
Referenced by Skyscraper::ScriptProcessor::Section::GetMeshObject().
|
virtual |
Reimplemented from SBS::Object.
Definition at line 95 of file model.cpp.
References SBS::MeshObject::IsEnabled(), and mesh.

| bool SBS::Model::IsKey | ( | ) |
| bool SBS::Model::IsPhysical | ( | ) |
Definition at line 116 of file model.cpp.
References SBS::MeshObject::IsPhysical(), and mesh.
Referenced by SBS::Camera::PickUpModel().

| bool SBS::Model::IsPickedUp | ( | ) |
Definition at line 266 of file model.cpp.
References SBS::SBS::camera, SBS::ObjectBase::GetParent(), and SBS::ObjectBase::sbs.
Referenced by Drop(), and PickUp().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 153 of file model.cpp.
References AddToParent(), SBS::Object::ChangeParent(), SBS::Object::ConvertTo(), SBS::SBS::GetElevator(), SBS::SBS::GetElevatorCount(), SBS::SBS::GetFloor(), SBS::SBS::GetFloorNumber(), SBS::ObjectBase::GetParent(), SBS::Object::GetPosition(), global, SBS::Elevator::IsInElevator(), RemoveFromParent(), SBS::ObjectBase::sbs, and SBS_PROFILE.
Referenced by SBS::Camera::Loop().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 282 of file model.cpp.
References SBS::SBS::AddKey(), GetKeyID(), SBS::ObjectBase::GetName(), IsKey(), SBS::ObjectBase::sbs, and SBS::Object::SelfDestruct().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 271 of file model.cpp.
References center, SBS::MeshObject::GetOffset(), mesh, SBS::Object::Move(), and Offset.

| void SBS::Model::PickUp | ( | ) |
Definition at line 213 of file model.cpp.
References SBS::SBS::camera, SBS::Object::ChangeParent(), IsPickedUp(), RemoveFromParent(), and SBS::ObjectBase::sbs.
Referenced by SBS::Camera::PickUpModel().

|
private |
Definition at line 121 of file model.cpp.
References SBS::ObjectBase::GetParent(), SBS::Object::GetType(), SBS::SBS::RemoveModel(), and SBS::ObjectBase::sbs.
Referenced by Loop(), PickUp(), and ~Model().

| void SBS::Model::SetKey | ( | int | keyid | ) |
Definition at line 110 of file model.cpp.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run(), Skyscraper::ScriptProcessor::ElevatorCarSection::Run(), and Skyscraper::ScriptProcessor::FloorSection::Run().
|
private |
|
private |
|
private |
|
private |
Definition at line 59 of file model.h.
Referenced by GetKeyID(), Model(), and SetKey().
| bool SBS::Model::load_error |
Definition at line 32 of file model.h.
Referenced by SBS::ElevatorCar::AddModel(), SBS::Floor::AddModel(), SBS::SBS::AddModel(), SBS::Shaft::Level::AddModel(), SBS::Stairwell::Level::AddModel(), and Model().
|
private |
Definition at line 56 of file model.h.
Referenced by Enabled(), IsEnabled(), IsPhysical(), Model(), OnInit(), and ~Model().
|
private |