Skyscraper
2.0
src
sbs
floorindicator.h
Go to the documentation of this file.
1
/*
2
Scalable Building Simulator - Floor Indicator 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_FLOORINDICATOR_H
25
#define _SBS_FLOORINDICATOR_H
26
27
namespace
SBS
{
28
29
class
SBSIMPEXP
FloorIndicator
:
public
Object
30
{
31
public
:
32
33
int
elev
;
//elevator this indicator is assigned to
34
int
car
;
//elevator car this indicator is assigned to
35
std::string
Prefix
;
//texture name prefix
36
std::string
Blank
;
//blank texture name
37
38
//functions
39
FloorIndicator
(
Object
*parent,
int
index,
int
elevator,
int
car,
const
std::string &texture_prefix,
const
std::string &blank_texture,
const
std::string &direction,
Real
CenterX,
Real
CenterZ,
Real
width,
Real
height,
Real
altitude);
40
~FloorIndicator
();
41
void
Enabled(
bool
value);
42
void
Update(
bool
blank =
false
);
43
bool
IsEnabled
() {
return
is_enabled; }
44
void
Flash(
bool
enabled);
45
void
Off();
46
void
On();
47
void
Loop();
48
49
private
:
50
MeshObject
*
FloorIndicatorMesh
;
//indicator mesh object
51
bool
is_enabled
;
52
bool
off
;
53
54
class
Timer
;
//internal timer class
55
56
//flash timer object
57
Timer
*
flash_timer
;
58
};
59
60
}
61
62
#endif
SBS::FloorIndicator::Timer
Definition
floorindicator.cpp:38
SBS::FloorIndicator
Definition
floorindicator.h:30
SBS::FloorIndicator::FloorIndicatorMesh
MeshObject * FloorIndicatorMesh
Definition
floorindicator.h:50
SBS::FloorIndicator::Prefix
std::string Prefix
Definition
floorindicator.h:35
SBS::FloorIndicator::off
bool off
Definition
floorindicator.h:52
SBS::FloorIndicator::IsEnabled
bool IsEnabled()
Definition
floorindicator.h:43
SBS::FloorIndicator::Blank
std::string Blank
Definition
floorindicator.h:36
SBS::FloorIndicator::car
int car
Definition
floorindicator.h:34
SBS::FloorIndicator::elev
int elev
Definition
floorindicator.h:33
SBS::FloorIndicator::is_enabled
bool is_enabled
Definition
floorindicator.h:51
SBS::FloorIndicator::flash_timer
Timer * flash_timer
Definition
floorindicator.h:57
SBS::MeshObject
Definition
mesh.h:44
SBS::Object
Definition
object.h:56
Real
Ogre::Real Real
Definition
globals.h:57
SBSIMPEXP
#define SBSIMPEXP
Definition
globals.h:53
SBS
Definition
skyscraper.h:45
Generated by
1.11.0