38Model::Model(
Object *parent,
const std::string &name,
const std::string &filename,
bool center,
const Vector3 &position,
const Vector3 &rotation,
Real max_render_distance,
Real scale_multiplier,
bool enable_physics,
Real restitution,
Real friction,
Real mass) :
Object(parent)
56 mesh =
new MeshObject(
this, name, 0, filename,
"", max_render_distance, scale_multiplier);
125 if (type ==
"ElevatorCar")
127 else if (type ==
"Floor")
129 else if (type ==
"Shaft Level")
131 else if (type ==
"Stairwell Level")
133 else if (type ==
"SBS")
141 if (type ==
"ElevatorCar")
143 else if (type ==
"Floor")
145 else if (type ==
"Shaft Level")
147 else if (type ==
"Stairwell Level")
149 else if (type ==
"SBS")
ElevatorCar * IsInElevator(const Vector3 &position, bool camera=false)
void EnablePhysics(bool value, Real restitution=0, Real friction=0, Real mass=0)
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)
void OnClick(Vector3 &position, bool shift, bool ctrl, bool alt, bool right)
const std::string & GetName()
virtual void SetRotation(const Vector3 &rotation)
virtual void Move(const Vector3 &vector, Real speed=1.0)
virtual Vector3 GetPosition(bool relative=false)
void SetValues(const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)
void ChangeParent(Object *new_parent)
void Init(bool children=true)
void EnableLoop(bool value)
const std::string & GetType()
Elevator * GetElevator(int number)
Floor * GetFloor(int number)
void RemoveModel(Model *model)
void AddKey(int keyid, const std::string &name)
int GetFloorNumber(Real altitude, int lastfloor=0, bool checklastfloor=false)
Model * AddModel(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)
#define SBS_PROFILE(name)