Skyscraper 2.0
model.h
Go to the documentation of this file.
1/*
2 Scalable Building Simulator - Model Object
3 The Skyscraper Project - Version 2.0
4 Copyright (C)2004-2024 Ryan Thoryk
5 https://www.skyscrapersim.net
6 https://sourceforge.net/projects/skyscraper/
7 Contact - ryan@skyscrapersim.net
8
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22*/
23
24#ifndef _SBS_MODEL_H
25#define _SBS_MODEL_H
26
27namespace SBS {
28
29class SBSIMPEXP Model : public Object
30{
31public:
33
34 //functions
35 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);
36 ~Model();
37 bool IsEnabled();
38 void Enabled(bool value);
39 bool IsKey();
40 int GetKeyID();
41 void SetKey(int keyid);
42 bool IsPhysical();
43 void Loop();
44 void PickUp();
45 void Drop();
46 bool IsPickedUp();
47 MeshObject* GetMeshObject() { return mesh; }
48 void OnInit();
49 bool IsCustom() { return custom; }
50 void OnClick(Vector3 &position, bool shift, bool ctrl, bool alt, bool right);
51
52private:
53 void RemoveFromParent();
54 void AddToParent();
55
58 bool is_key;
59 int KeyID;
60 bool global;
61 bool center;
62 bool custom;
63};
64
65}
66
67#endif
bool is_key
Definition model.h:58
bool IsCustom()
Definition model.h:49
int KeyID
Definition model.h:59
bool custom
Definition model.h:62
bool load_error
Definition model.h:32
bool global
Definition model.h:60
Vector3 Offset
Definition model.h:57
MeshObject * mesh
Definition model.h:56
MeshObject * GetMeshObject()
Definition model.h:47
bool center
Definition model.h:61
Ogre::Vector3 Vector3
Definition globals.h:58
Ogre::Real Real
Definition globals.h:57
#define SBSIMPEXP
Definition globals.h:53