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
CPhysVisObject.h
Go to the documentation of this file.
1 // Copyright (C) 2004-2011 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 CPHYS_VIS_OBJECT_H
22 #define CPHYS_VIS_OBJECT_H
23 
24 #include "CPhysicalObject.h"
25 #include "CVisibleObject.h"
26 
27 namespace OpenSkyNet {
28  namespace Core {
31  protected:
36  public:
38  PhysVisObject(VisibleObject *vO_, CD::Shape* shape_, Utils::uint colGroup_);
39  virtual ~PhysVisObject();
40 
43  virtual Math::Point<> getPos() const { return _pO->getPos(); }
44  virtual void getPos(Math::Point<>& pos_) const { _pO->getPos(pos_); }
45  virtual void setPos(const Math::Point<> &pos_) { _pO->setPos(pos_); }
46  virtual bool getHasPosChanged() const { return _pO->getHasPosChanged(); }
47  virtual void setHasPosChanged(bool val_) { _pO->setHasPosChanged(val_); }
48 
49  virtual Math::Matrix3x3 getRot() const { return _pO->getRot(); }
50  virtual void getRot(Math::Matrix3x3& rot_) const { _pO->getRot(rot_); }
51  virtual void setRot(const Math::Matrix3x3 &rot_) { _pO->setRot(rot_); }
52  virtual bool getHasRotChanged() const { return _pO->getHasRotChanged(); }
53  virtual void setHasRotChanged(bool val_) { _pO->setHasRotChanged(val_); }
54 
55  virtual Math::Point<> getVel() const { return _pO->getVel(); }
56  virtual void getVel(Math::Point<>& vel_) const { _pO->getVel(vel_); }
57  virtual void setVel(const Math::Point<> &vel_) { _pO->setVel(vel_); }
58 
59  virtual const PhysicalObject* getPhysicalObject() const { return _pO; }
60  virtual PhysicalObject* getPhysicalObject() { return _pO; }
61  virtual const VisibleObject* getVisibleObject() const { return _vO; }
62  virtual VisibleObject* getVisibleObject() { return _vO; }
64 
67  virtual void setNonCollidingData(Object* obj_) { _pO->setNonCollidingData(obj_->getPhysicalObject()); }
68  virtual bool handleCollisions(Object* collidee_, std::vector<CD::HitInfo>& colliders_, float& dt_) { return _pO->handleCollisions(collidee_->getPhysicalObject(), colliders_, dt_); }
70 
72  virtual void syncVisFromPhys();
73 
75  virtual void showCollisionVolume(bool show_=true) { UNUSED(show_); }
76  };
77  }
78 }
79 
80 #endif //CPHYS_VIS_OBJECT_H
virtual bool getHasPosChanged() const
Definition: CPhysVisObject.h:46
Definition: CVisibleObject.h:28
virtual void setVel(const Math::Point<> &vel_)
Definition: CPhysVisObject.h:57
Definition: CPhysVisObject.h:30
#define UNUSED(var)
Definition: UTypes.h:35
Definition: CPhysicalObject.h:33
Definition: CDVolume.h:54
virtual void showCollisionVolume(bool show_=true)
Definition: CPhysVisObject.h:75
virtual Math::Point getPos() const
Definition: CPhysVisObject.h:43
virtual void setRot(const Math::Matrix3x3 &rot_)
Definition: CPhysVisObject.h:51
Math::Matrix3x3 _rotOffset
Definition: CPhysVisObject.h:34
virtual Math::Point getVel() const
Definition: CPhysVisObject.h:55
virtual PhysicalObject * getPhysicalObject()
Definition: CPhysVisObject.h:60
virtual const VisibleObject * getVisibleObject() const
Definition: CPhysVisObject.h:61
PhysicalObject * _pO
Definition: CPhysVisObject.h:32
virtual void setHasRotChanged(bool val_)
Definition: CPhysVisObject.h:53
Math::Point _posOffset
Definition: CPhysVisObject.h:35
virtual void setHasPosChanged(bool val_)
Definition: CPhysVisObject.h:47
virtual bool getHasRotChanged() const
Definition: CPhysVisObject.h:52
virtual void setPos(const Math::Point<> &pos_)
Definition: CPhysVisObject.h:45
virtual void setNonCollidingData(Object *obj_)
Definition: CPhysVisObject.h:67
unsigned int uint
Definition: UTypes.h:39
virtual void getVel(Math::Point<> &vel_) const
Definition: CPhysVisObject.h:56
#define CORE_DLL
Definition: CCoreDLL.h:57
virtual Math::Matrix3x3 getRot() const
Definition: CPhysVisObject.h:49
Definition: MPoint.h:33
Definition: IObject.h:36
Definition: IObject.h:75
virtual void getRot(Math::Matrix3x3 &rot_) const
Definition: CPhysVisObject.h:50
virtual const PhysicalObject * getPhysicalObject() const
Definition: CPhysVisObject.h:59
virtual VisibleObject * getVisibleObject()
Definition: CPhysVisObject.h:62
virtual bool handleCollisions(Object *collidee_, std::vector< CD::HitInfo > &colliders_, float &dt_)
Definition: CPhysVisObject.h:68
Definition: ICollisionListener.h:34
Definition: MMatrix3x3.h:32
float float rot_[3]
Definition: ViewerApp.h:31
VisibleObject * _vO
Definition: CPhysVisObject.h:33
virtual void getPos(Math::Point<> &pos_) const
Definition: CPhysVisObject.h:44
virtual const PhysicalObject * getPhysicalObject() const =0
float pos_[3]
Definition: ViewerApp.h:31