OSDN Git Service

Version update and Terrace Border update
[skyscrapersim/skyscraper.git] / src / door.h
1 /* $Id$ */
2
3 /*
4         Scalable Building Simulator - Door Class
5         The Skyscraper Project - Version 1.6 Alpha
6         Copyright (C)2005-2009 Ryan Thoryk
7         http://www.skyscrapersim.com
8         http://sourceforge.net/projects/skyscraper
9         Contact - ryan@tliquest.net
10
11         This program is free software; you can redistribute it and/or
12         modify it under the terms of the GNU General Public License
13         as published by the Free Software Foundation; either version 2
14         of the License, or (at your option) any later version.
15
16         This program is distributed in the hope that it will be useful,
17         but WITHOUT ANY WARRANTY; without even the implied warranty of
18         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19         GNU General Public License for more details.
20
21         You should have received a copy of the GNU General Public License
22         along with this program; if not, write to the Free Software
23         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24 */
25
26 #ifndef _SBS_DOOR_H
27 #define _SBS_DOOR_H
28
29 class SBSIMPEXP Door
30 {
31 public:
32
33         csString Name; //door name
34         int Direction;
35         bool OpenState;
36         csVector3 origin; //door origin
37         bool IsMoving; //is door moving?
38         bool OpenDoor; //open or close door?
39         bool Clockwise; //if door should rotate clockwise
40
41         Door(const char *name, const char *texture, float thickness, int direction, float CenterX, float CenterZ, float width, float height, float altitude, float tw, float th);
42         ~Door();
43         void Open();
44         void Close();
45         bool IsOpen();
46         void Enabled(bool value);
47         void MoveDoor();
48
49 private:
50         csRef<iMeshWrapper> DoorMesh; //door mesh
51         csRef<iThingFactoryState> DoorMesh_state;
52         csRef<iMovable> DoorMesh_movable;
53
54         float rotation;
55
56         char intbuffer[65];
57         char buffer[20];
58 };
59
60 #endif