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
Public Member Functions | Protected Attributes | List of all members
OpenSkyNet::Core::PhysVisObject Class Reference

#include <CPhysVisObject.h>

Inheritance diagram for OpenSkyNet::Core::PhysVisObject:
OpenSkyNet::Core::ABCObject OpenSkyNet::Core::CollisionListener OpenSkyNet::Core::Object OpenSkyNet::OgreCore::OgrePhysVisObject

Public Member Functions

 PhysVisObject (PhysicalObject *pO_, VisibleObject *vO_)
 
 PhysVisObject (VisibleObject *vO_, CD::Shape *shape_, Utils::uint colGroup_)
 
virtual ~PhysVisObject ()
 
virtual void syncVisFromPhys ()
 
virtual void showCollisionVolume (bool show_=true)
 
Object interface methods
virtual Math::Point getPos () const
 
virtual void getPos (Math::Point<> &pos_) const
 
virtual void setPos (const Math::Point<> &pos_)
 
virtual bool getHasPosChanged () const
 
virtual void setHasPosChanged (bool val_)
 
virtual Math::Matrix3x3 getRot () const
 
virtual void getRot (Math::Matrix3x3 &rot_) const
 
virtual void setRot (const Math::Matrix3x3 &rot_)
 
virtual bool getHasRotChanged () const
 
virtual void setHasRotChanged (bool val_)
 
virtual Math::Point getVel () const
 
virtual void getVel (Math::Point<> &vel_) const
 
virtual void setVel (const Math::Point<> &vel_)
 
virtual const PhysicalObjectgetPhysicalObject () const
 
virtual PhysicalObjectgetPhysicalObject ()
 
virtual const VisibleObjectgetVisibleObject () const
 
virtual VisibleObjectgetVisibleObject ()
 
CollisionListener interface methods
virtual void setNonCollidingData (Object *obj_)
 
virtual bool handleCollisions (Object *collidee_, std::vector< CD::HitInfo > &colliders_, float &dt_)
 
- Public Member Functions inherited from OpenSkyNet::Core::ABCObject
 ABCObject ()
 
virtual ~ABCObject ()
 
virtual bool getHasVelChanged () const
 
virtual void setHasVelChanged (bool val_)
 
virtual Math::Point getAngVel () const
 
virtual void getAngVel (Math::Point<> &angVel_) const
 
virtual void setAngVel (const Math::Point<> &angVel_)
 
virtual bool getHasAngVelChanged () const
 
virtual void setHasAngVelChanged (bool val_)
 
virtual const std::string & getName () const
 
virtual void setName (const std::string &name_)
 
- Public Member Functions inherited from OpenSkyNet::Core::Object
 Object ()
 
virtual ~Object ()
 
- Public Member Functions inherited from OpenSkyNet::Core::CollisionListener
virtual void handleNonCollidingTransformApplied (Object *obj_)
 
virtual void handleNewCollisions (Object *collidee_, std::vector< Object * > &colliders_)
 
virtual void handleDeletedCollisions (Object *collidee_, std::vector< Object * > &colliders_)
 
virtual bool handleWrongSidedness (Object *collidee_, std::vector< CD::HitInfo > &collisions_)
 
virtual bool handleOutOfGrid (Object *obj_)
 

Protected Attributes

PhysicalObject_pO
 
VisibleObject_vO
 
Math::Matrix3x3 _rotOffset
 
Math::Point _posOffset
 
- Protected Attributes inherited from OpenSkyNet::Core::ABCObject
std::string _name
 
bool _hasPosChanged
 
bool _hasRotChanged
 
bool _hasVelChanged
 
bool _hasAngVelChanged
 

Detailed Description

This class maps a visible object to a physics object/collision detection volume.

Constructor & Destructor Documentation

PhysVisObject::PhysVisObject ( PhysicalObject pO_,
VisibleObject vO_ 
)
OpenSkyNet::Core::PhysVisObject::PhysVisObject ( VisibleObject vO_,
CD::Shape shape_,
Utils::uint  colGroup_ 
)
PhysVisObject::~PhysVisObject ( )
virtual

Member Function Documentation

virtual bool OpenSkyNet::Core::PhysVisObject::getHasPosChanged ( ) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual bool OpenSkyNet::Core::PhysVisObject::getHasRotChanged ( ) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual const PhysicalObject* OpenSkyNet::Core::PhysVisObject::getPhysicalObject ( ) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual PhysicalObject* OpenSkyNet::Core::PhysVisObject::getPhysicalObject ( )
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual Math::Point OpenSkyNet::Core::PhysVisObject::getPos ( ) const
inlinevirtual
virtual void OpenSkyNet::Core::PhysVisObject::getPos ( Math::Point<> &  pos_) const
inlinevirtual
virtual Math::Matrix3x3 OpenSkyNet::Core::PhysVisObject::getRot ( ) const
inlinevirtual
virtual void OpenSkyNet::Core::PhysVisObject::getRot ( Math::Matrix3x3 rot_) const
inlinevirtual
virtual Math::Point OpenSkyNet::Core::PhysVisObject::getVel ( ) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual void OpenSkyNet::Core::PhysVisObject::getVel ( Math::Point<> &  vel_) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual const VisibleObject* OpenSkyNet::Core::PhysVisObject::getVisibleObject ( ) const
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual VisibleObject* OpenSkyNet::Core::PhysVisObject::getVisibleObject ( )
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual bool OpenSkyNet::Core::PhysVisObject::handleCollisions ( Object collidee_,
std::vector< CD::HitInfo > &  collisions_,
float &  dt_ 
)
inlinevirtual

Called every Core::CollisionDetector update() when a collision is detected.

Parameters
dt_An IN param signifying the time delta for all collision tests and an OUT param signifying the time left for any future recalculations
Returns
true if collisions should be recalculated for this object, false otherwise.

Reimplemented from OpenSkyNet::Core::CollisionListener.

virtual void OpenSkyNet::Core::PhysVisObject::setHasPosChanged ( bool  val_)
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual void OpenSkyNet::Core::PhysVisObject::setHasRotChanged ( bool  val_)
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual void OpenSkyNet::Core::PhysVisObject::setNonCollidingData ( Object obj_)
inlinevirtual

Saves the motion info for obj_ when it is known not to cause collisions w/ other objects. This data is used in iterative collision detection routines whereby only one object can be tested for a new position/rotation at a time; the rest of the objects have to be at "safe" positions/rotations.

Reimplemented from OpenSkyNet::Core::CollisionListener.

virtual void OpenSkyNet::Core::PhysVisObject::setPos ( const Math::Point<> &  pos_)
inlinevirtual
virtual void OpenSkyNet::Core::PhysVisObject::setRot ( const Math::Matrix3x3 rot_)
inlinevirtual
virtual void OpenSkyNet::Core::PhysVisObject::setVel ( const Math::Point<> &  vel_)
inlinevirtual

Reimplemented from OpenSkyNet::Core::ABCObject.

virtual void OpenSkyNet::Core::PhysVisObject::showCollisionVolume ( bool  show_ = true)
inlinevirtual

Show a renderable object used as the visible representation of the collision volume.

Reimplemented in OpenSkyNet::OgreCore::OgrePhysVisObject.

void PhysVisObject::syncVisFromPhys ( )
virtual

Set the renderable object's transform to the physical object's transform.

Reimplemented in OpenSkyNet::OgreCore::OgrePhysVisObject.

Member Data Documentation

PhysicalObject* OpenSkyNet::Core::PhysVisObject::_pO
protected
Math::Point OpenSkyNet::Core::PhysVisObject::_posOffset
protected
Math::Matrix3x3 OpenSkyNet::Core::PhysVisObject::_rotOffset
protected
VisibleObject* OpenSkyNet::Core::PhysVisObject::_vO
protected

The documentation for this class was generated from the following files: