Skyscraper 2.0
|
#include <custom.h>
Public Member Functions | |
CustomObject (Object *parent, const std::string &name, const Vector3 &position, const Vector3 &rotation, Real max_render_distance=0, Real scale_multiplier=1) | |
~CustomObject () | |
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 | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
void | SetTexture (const std::string &texture) |
void | Finish (bool enable_physics=false, Real restitution=0, Real friction=0, Real mass=0) |
![]() | |
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 | 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 | always_visible |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
SBS::CustomObject::CustomObject | ( | Object * | parent, |
const std::string & | name, | ||
const Vector3 & | position, | ||
const Vector3 & | rotation, | ||
Real | max_render_distance = 0, | ||
Real | scale_multiplier = 1 ) |
Definition at line 38 of file custom.cpp.
References always_visible, SBS::ObjectBase::GetName(), global, is_key, SBS::Object::IsGlobal(), KeyID, mesh, SBS::Object::Move(), Offset, SBS::Object::SetRotation(), and SBS::Object::SetValues().
SBS::CustomObject::~CustomObject | ( | ) |
Definition at line 57 of file custom.cpp.
References SBS::SBS::FastDelete, mesh, SBS::Object::parent_deleting, RemoveFromParent(), and SBS::ObjectBase::sbs.
|
private |
Definition at line 106 of file custom.cpp.
References SBS::SBS::AddCustomObject(), SBS::ObjectBase::GetParent(), SBS::Object::GetType(), and SBS::ObjectBase::sbs.
Referenced by Drop(), and Loop().
void SBS::CustomObject::Drop | ( | ) |
Definition at line 193 of file custom.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.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 71 of file custom.cpp.
References always_visible, SBS::MeshObject::Enabled(), SBS::Object::EnableLoop(), and mesh.
Referenced by Finish().
void SBS::CustomObject::Finish | ( | bool | enable_physics = false, |
Real | restitution = 0, | ||
Real | friction = 0, | ||
Real | mass = 0 ) |
Definition at line 254 of file custom.cpp.
References Enabled(), SBS::MeshObject::EnablePhysics(), SBS::Object::Init(), and mesh.
int SBS::CustomObject::GetKeyID | ( | ) |
|
inline |
Definition at line 48 of file custom.h.
Referenced by Skyscraper::ScriptProcessor::CommandsSection::Run().
bool SBS::CustomObject::IsEnabled | ( | ) |
Definition at line 80 of file custom.cpp.
References SBS::MeshObject::IsEnabled(), and mesh.
bool SBS::CustomObject::IsKey | ( | ) |
bool SBS::CustomObject::IsPhysical | ( | ) |
Definition at line 85 of file custom.cpp.
References SBS::MeshObject::IsPhysical(), and mesh.
bool SBS::CustomObject::IsPickedUp | ( | ) |
Definition at line 234 of file custom.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 122 of file custom.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.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 239 of file custom.cpp.
void SBS::CustomObject::PickUp | ( | ) |
Definition at line 182 of file custom.cpp.
References SBS::SBS::camera, SBS::Object::ChangeParent(), IsPickedUp(), RemoveFromParent(), and SBS::ObjectBase::sbs.
|
private |
Definition at line 90 of file custom.cpp.
References SBS::ObjectBase::GetParent(), SBS::Object::GetType(), SBS::SBS::RemoveCustomObject(), and SBS::ObjectBase::sbs.
Referenced by Loop(), PickUp(), and ~CustomObject().
void SBS::CustomObject::SetKey | ( | int | keyid | ) |
void SBS::CustomObject::SetTexture | ( | const std::string & | texture | ) |
Definition at line 247 of file custom.cpp.
References mesh, and SBS::MeshObject::SetMaterial().
bool SBS::CustomObject::always_visible |
Definition at line 33 of file custom.h.
Referenced by CustomObject(), and Enabled().
|
private |
Definition at line 61 of file custom.h.
Referenced by CustomObject(), Drop(), and Loop().
|
private |
Definition at line 59 of file custom.h.
Referenced by CustomObject().
|
private |
Definition at line 60 of file custom.h.
Referenced by CustomObject().
|
private |
Definition at line 57 of file custom.h.
Referenced by CustomObject(), Enabled(), Finish(), IsEnabled(), IsPhysical(), SetTexture(), and ~CustomObject().
|
private |
Definition at line 58 of file custom.h.
Referenced by CustomObject().