4 Scalable Building Simulator - Proximity Trigger Class
5 The Skyscraper Project - Version 1.10 Alpha
6 Copyright (C)2004-2015 Ryan Thoryk
7 http://www.skyscrapersim.com
8 http://sourceforge.net/projects/skyscraper
9 Contact - ryan@tliquest.net
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.
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.
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.
26 #ifndef _SBS_TRIGGER_H
27 #define _SBS_TRIGGER_H
32 class SBSIMPEXP Trigger
35 Object *object; //SBS object
40 Trigger(Object *parent, const char *name, const char *sound_file, Ogre::Vector3 &area_min, Ogre::Vector3 &area_max, const std::vector<std::string> &action_names);
42 void Enabled(bool value);
43 Ogre::Vector3 GetPosition();
44 void SetPosition(const Ogre::Vector3 &position);
45 void SetPositionY(float position);
46 void Move(const Ogre::Vector3 &position);
47 void Move(const Ogre::Vector3 position, bool relative_x, bool relative_y, bool relative_z);
48 bool SetSelectPosition(int position);
49 bool ChangeSelectPosition(int position);
50 bool NextSelectPosition(bool check_state = true);
51 bool PreviousSelectPosition(bool check_state = true);
52 int GetSelectPosition();
53 const char* GetPositionAction(int position);
54 const char* GetSelectPositionAction();
55 int GetNextSelectPosition();
56 int GetPreviousSelectPosition();
59 int FindActionPosition(const char *name);
64 Ogre::Vector3 area_min;
65 Ogre::Vector3 area_max;
67 int current_position; //current trigger position
69 std::vector<std::string> Actions; //trigger actions
71 Sound *sound; //sound object