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
Tactics3DAttackRange.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2013 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This file is part of Tactics3D.
7 //
8 // Tactics3D is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // Tactics3D is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 
23 #ifndef TACTICS3DATTACK_RANGE_H
24 #define TACTICS3DATTACK_RANGE_H
25 
26 #include "../Libs/Core_LIB/CPhysicalObject.h"
27 #include "../Libs/Core_LIB/ICollisionListener.h"
28 
29 #include <set>
30 
31 namespace Tactics3D {
35  protected:
38  std::set<OpenSkyNet::Core::Object*> _objsInAttackRange;
39  public:
41  virtual ~AttackRange();
42 
45  virtual OpenSkyNet::Math::Point<> getPos() const;
46  virtual void getPos(OpenSkyNet::Math::Point<>& pos_) const;
47  virtual void setPos(const OpenSkyNet::Math::Point<>& pos_);
48 
49  virtual OpenSkyNet::Math::Matrix3x3 getRot() const;
50  virtual void getRot(OpenSkyNet::Math::Matrix3x3& rot_) const;
51  virtual void setRot(const OpenSkyNet::Math::Matrix3x3& rot_);
52 
55 
58  virtual bool handleCollisions(OpenSkyNet::Core::Object* collidee_, std::vector<OpenSkyNet::CD::HitInfo>& colliders_, float& dt_);
59  virtual void handleNewCollisions(OpenSkyNet::Core::Object* collidee_, std::vector<OpenSkyNet::Core::Object*>& colliders_);
60  virtual void handleDeletedCollisions(OpenSkyNet::Core::Object* collidee_, std::vector<OpenSkyNet::Core::Object*>& colliders_);
62 
63  virtual float getDist(const OpenSkyNet::Core::Object* obj_) const;
64 
65  virtual bool isInAttackRange(OpenSkyNet::Core::Object* obj_) const;
66  };
67 
69  public:
71  virtual ~InfiniteAttackRange() {}
72 
73  virtual float getDist(const OpenSkyNet::Core::Object* obj_) const;
74 
75  virtual bool isInAttackRange(OpenSkyNet::Core::Object* obj_) const;
76  };
77 }
78 
79 #endif //TACTICS3DATTACK_RANGE_H
Definition: CPhysicalObject.h:33
virtual OpenSkyNet::Core::PhysicalObject * getPhysicalObject()
Definition: Tactics3DAttackRange.cpp:39
virtual bool isInAttackRange(OpenSkyNet::Core::Object *obj_) const
Definition: Tactics3DAttackRange.cpp:94
virtual OpenSkyNet::Math::Matrix3x3 getRot() const
Definition: Tactics3DAttackRange.cpp:35
std::set< OpenSkyNet::Core::Object * > _objsInAttackRange
Definition: Tactics3DAttackRange.h:38
virtual bool handleCollisions(OpenSkyNet::Core::Object *collidee_, std::vector< OpenSkyNet::CD::HitInfo > &colliders_, float &dt_)
Definition: Tactics3DAttackRange.cpp:41
InfiniteAttackRange(OpenSkyNet::Core::Object *owner_)
Definition: Tactics3DAttackRange.h:70
AttackRange(OpenSkyNet::Core::PhysicalObject *pO_, OpenSkyNet::Core::Object *owner_)
Definition: Tactics3DAttackRange.cpp:13
virtual void handleDeletedCollisions(OpenSkyNet::Core::Object *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
Definition: Tactics3DAttackRange.cpp:56
virtual void handleNewCollisions(OpenSkyNet::Core::Object *collidee_, std::vector< OpenSkyNet::Core::Object * > &colliders_)
Definition: Tactics3DAttackRange.cpp:43
OpenSkyNet::Core::PhysicalObject * _pO
Definition: Tactics3DAttackRange.h:36
Definition: Tactics3DAttackRange.h:33
virtual void setPos(const OpenSkyNet::Math::Point<> &pos_)
Definition: Tactics3DAttackRange.cpp:33
virtual ~InfiniteAttackRange()
Definition: Tactics3DAttackRange.h:71
Definition: MPoint.h:33
virtual OpenSkyNet::Math::Point getPos() const
Definition: Tactics3DAttackRange.cpp:31
Definition: IObject.h:36
Definition: IObject.h:75
virtual float getDist(const OpenSkyNet::Core::Object *obj_) const
Definition: Tactics3DAttackRange.cpp:69
virtual float getDist(const OpenSkyNet::Core::Object *obj_) const
Definition: Tactics3DAttackRange.cpp:84
virtual ~AttackRange()
Definition: Tactics3DAttackRange.cpp:25
OpenSkyNet::Core::Object * _owner
Definition: Tactics3DAttackRange.h:37
virtual void setRot(const OpenSkyNet::Math::Matrix3x3 &rot_)
Definition: Tactics3DAttackRange.cpp:37
Definition: Tactics3DAttackRange.h:68
Definition: ICollisionListener.h:34
Definition: MMatrix3x3.h:32
virtual bool isInAttackRange(OpenSkyNet::Core::Object *obj_) const
Definition: Tactics3DAttackRange.cpp:80
float float rot_[3]
Definition: ViewerApp.h:31
float pos_[3]
Definition: ViewerApp.h:31