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
CParticleObject.h
Go to the documentation of this file.
1 // Copyright (C) 2006-2008 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 CPARTICLE_OBJECT_H
22 #define CPARTICLE_OBJECT_H
23 
24 #include "../../Libs/Graphics_LIB/GUtils.h"
25 #include "../../Libs/Core_LIB/CPathUpdater.h"
26 
27 namespace OpenSkyNet {
28  namespace Core {
31  class ParticleObject : public ABCObject {
32  Ogre::Particle* _particle;
34  public:
35  ParticleObject(Ogre::Particle* particle_, OpenSkyNet::Core::PathUpdater* pathUpd_) : _particle(particle_),
36  _pathUpd(pathUpd_) {}
37  virtual ~ParticleObject() {}
38 
39  virtual Math::Point<> getPos() const {
40  return Graphics::GetMPointFromVector3(_particle->position);
41  }
42  virtual void getPos(Math::Point<>& pos_) const {
43  pos_ = Graphics::GetMPointFromVector3(_particle->position);
44  }
45  virtual void setPos(const Math::Point<>& pos_) {
46  _particle->position = Graphics::GetVector3FromMPoint(pos_);
47  if (_pathUpd->isPathAtEnd(this))
48  _particle->timeToLive = 0.0f;
49  setHasPosChanged(true);
50  }
51 
52  virtual Math::Matrix3x3 getRot() const {
54  }
55  virtual void getRot(Math::Matrix3x3& rot_) const {
57  }
58  virtual void setRot(const Math::Matrix3x3& rot_) {}
59  };
60  }
61 }
62 
63 #endif //CPARTICLE_OBJECT_H
Ogre::Vector3 GetVector3FromMPoint(const Math::Point< T > &p_)
Definition: GUtils.h:61
virtual void setRot(const Math::Matrix3x3 &rot_)
Definition: CParticleObject.h:58
Math::Point GetMPointFromVector3(const Ogre::Vector3 &v_)
Definition: GUtils.h:56
const Matrix3x3 g_identityMatrix3x3
Definition: MMatrix3x3.cpp:5
virtual void setPos(const Math::Point<> &pos_)
Definition: CParticleObject.h:45
ParticleObject(Ogre::Particle *particle_, OpenSkyNet::Core::PathUpdater *pathUpd_)
Definition: CParticleObject.h:35
Definition: CParticleObject.h:31
bool isPathAtEnd(Object *obj_)
Definition: CPathUpdater.cpp:140
virtual void getRot(Math::Matrix3x3 &rot_) const
Definition: CParticleObject.h:55
Definition: MPoint.h:33
Definition: CPathUpdater.h:32
Definition: IObject.h:75
virtual Math::Matrix3x3 getRot() const
Definition: CParticleObject.h:52
virtual void setHasPosChanged(bool val_)
Definition: IObject.h:82
virtual void getPos(Math::Point<> &pos_) const
Definition: CParticleObject.h:42
virtual ~ParticleObject()
Definition: CParticleObject.h:37
Definition: MMatrix3x3.h:32
virtual Math::Point getPos() const
Definition: CParticleObject.h:39
float float rot_[3]
Definition: ViewerApp.h:31
float pos_[3]
Definition: ViewerApp.h:31