Skyscraper 2.0
movingwalkway.h
Go to the documentation of this file.
1/*
2 Scalable Building Simulator - Moving Walkway 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_MOVINGWALKWAY_H
25#define _SBS_MOVINGWALKWAY_H
26
27namespace SBS {
28
30{
31public:
33
34 MovingWalkway(Object *parent, const std::string &name, int run, Real speed, const std::string &sound_file, const std::string &texture, const std::string &direction, Real CenterX, Real CenterZ, Real width, Real treadsize, int num_steps, Real voffset, Real tw, Real th);
36 void Enabled(bool value);
37 void Report(const std::string &message);
38 bool ReportError(const std::string &message);
39 void Loop();
40 bool IsEnabled() { return is_enabled; }
41 void OnClick(Vector3 &position, bool shift, bool ctrl, bool alt, bool right);
42 void ResetState();
43 void SetRun(int value);
44 int GetRun() { return Run; }
45
46private:
47 Sound *sound; //sound object
48 int Run; //-1 is reverse, 0 is stop, 1 is forward
50 Vector3 start, end;
51 std::string Direction;
53
54 std::vector<Step*> Steps;
55
56 void CreateSteps(const std::string &texture, const std::string &direction, Real width, Real treadsize, Real tw, Real th);
57 void MoveSteps();
58};
59
60}
61
62#endif
std::string Direction
std::vector< Step * > Steps
Ogre::Vector3 Vector3
Definition globals.h:58
Ogre::Real Real
Definition globals.h:57
#define SBSIMPEXP
Definition globals.h:53