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 | List of all members
OpenSkyNet::Core::PhysicalObject Class Reference

#include <CPhysicalObject.h>

Inheritance diagram for OpenSkyNet::Core::PhysicalObject:
OpenSkyNet::Core::ABCObject OpenSkyNet::Core::CollisionListener OpenSkyNet::Core::Object

Public Member Functions

 PhysicalObject (CD::Volume *colVol_)
 PhysicalObject (CD::Shape *shape_, Utils::uint colGroup_=COL_GROUP_HIT_ALL_HIT_BY_ALL, const Math::Point<> &center_=Math::g_origin, const Math::Matrix3x3 &rot_=Math::g_identityMatrix3x3)
virtual ~PhysicalObject ()
const CD::VolumegetCollisionVolume () const
CD::VolumegetCollisionVolume ()
Object interface methods
virtual Math::Point getPos () const
virtual void getPos (Math::Point<> &pos_) const
virtual void setPos (const Math::Point<> &pos_)
virtual Math::Matrix3x3 getRot () const
virtual void getRot (Math::Matrix3x3 &rot_) const
virtual void setRot (const Math::Matrix3x3 &rot_)
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 ()
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 getHasPosChanged () const
virtual void setHasPosChanged (bool val_)
virtual bool getHasRotChanged () const
virtual void setHasRotChanged (bool val_)
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 VisibleObjectgetVisibleObject () const
virtual VisibleObjectgetVisibleObject ()
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_)

Additional Inherited Members

- Protected Attributes inherited from OpenSkyNet::Core::ABCObject
std::string _name
bool _hasPosChanged
bool _hasRotChanged
bool _hasVelChanged
bool _hasAngVelChanged

Detailed Description

Wraps an object with collision and rigid body data for creation via the ObjectFactory.

Constructor & Destructor Documentation

OpenSkyNet::Core::PhysicalObject::PhysicalObject ( CD::Volume colVol_)
OpenSkyNet::Core::PhysicalObject::PhysicalObject ( CD::Shape shape_,
Utils::uint  colGroup_ = COL_GROUP_HIT_ALL_HIT_BY_ALL,
const Math::Point<> &  center_ = Math::g_origin,
const Math::Matrix3x3 rot_ = Math::g_identityMatrix3x3 
PhysicalObject::~PhysicalObject ( )

Member Function Documentation

const CD::Volume* OpenSkyNet::Core::PhysicalObject::getCollisionVolume ( ) const
CD::Volume* OpenSkyNet::Core::PhysicalObject::getCollisionVolume ( )
virtual const PhysicalObject* OpenSkyNet::Core::PhysicalObject::getPhysicalObject ( ) const

Reimplemented from OpenSkyNet::Core::ABCObject.

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

Reimplemented from OpenSkyNet::Core::ABCObject.

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

Reimplemented from OpenSkyNet::Core::ABCObject.

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

Reimplemented from OpenSkyNet::Core::ABCObject.

bool PhysicalObject::handleCollisions ( Object collidee_,
std::vector< CD::HitInfo > &  collisions_,
float &  dt_ 

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

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

Reimplemented from OpenSkyNet::Core::CollisionListener.

virtual void OpenSkyNet::Core::PhysicalObject::setNonCollidingData ( Object obj_)

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::PhysicalObject::setPos ( const Math::Point<> &  pos_)
void PhysicalObject::setRot ( const Math::Matrix3x3 rot_)
virtual void OpenSkyNet::Core::PhysicalObject::setVel ( const Math::Point<> &  vel_)

Reimplemented from OpenSkyNet::Core::ABCObject.

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