Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CTransformChangeDetector.h
Go to the documentation of this file.
1 // Copyright (C) 2006-2013 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 
21 #ifndef CTRANSFORM_CHANGE_DETECTOR_H
22 #define CTRANSFORM_CHANGE_DETECTOR_H
23 
25 #include "CUpdater.h"
26 
27 namespace OpenSkyNet {
28  namespace Core {
31  std::map<Object*, std::list<TransformChangeListener*> > _objToListeners;
32  protected:
33  virtual bool addObject(Object* obj_, Updater::OBJECT_PRIORITY prio_=OBJ_1, bool isOneShot_=false);
34  virtual bool removeObject(Object* obj_);
35  public:
39 
40  TransformInfo(Updater::OBJECT_PRIORITY prio_=Updater::OBJ_DISABLED, bool isOneShot_=false) : Updater::UpdateInfo(prio_,isOneShot_) {}
41  };
42 
43  TransformChangeDetector() : Updater(Updater::TRANSFORM_CHANGE_DETECTOR, "TRANSFORM_CHANGE_DETECTOR", Updater::UPD_1, 0.0f) {}
44 
45  virtual bool update(float dt_);
46 
47  bool registerListener(Object* obj_, TransformChangeListener* listener_);
48  bool unregisterListener(Object* obj_, TransformChangeListener* listener_);
49  };
50  }
51 }
52 
53 #endif //CTRANSFORM_CHANGE_DETECTOR_H
Math::Point _prevPos
Definition: CTransformChangeDetector.h:37
TransformChangeDetector()
Definition: CTransformChangeDetector.h:43
TransformInfo(Updater::OBJECT_PRIORITY prio_=Updater::OBJ_DISABLED, bool isOneShot_=false)
Definition: CTransformChangeDetector.h:40
Definition: ITransformChangeListener.h:29
Definition: CTransformChangeDetector.h:30
Math::Matrix3x3 _prevRot
Definition: CTransformChangeDetector.h:38
Definition: CUpdater.h:40
OBJECT_PRIORITY
Definition: CUpdater.h:49
#define CORE_DLL
Definition: CCoreDLL.h:57
Definition: MPoint.h:33
Definition: IObject.h:36
Definition: MMatrix3x3.h:32
Definition: CUpdater.h:54
Definition: CTransformChangeDetector.h:36