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

#include <CCameraUpdater.h>

Inheritance diagram for OpenSkyNet::Core::Director:
OpenSkyNet::Core::MotionUpdater OpenSkyNet::Core::Updater OpenSkyNet::OgreCore::OgreDirector

Public Member Functions

 Director ()
 
virtual ~Director ()
 
virtual bool update (float dt_)
 
virtual bool setCurrCam (DIRECTOR_CAM cam_)
 
DIRECTOR_CAM getCurrCam () const
 
bool isCurrCamBusy () const
 
void setStaticEffect (DIRECTOR_CAM cam_, CAMERA_EFFECT type_, float begin_, float end_, float speed_, bool q_=false)
 
void setPath (DIRECTOR_CAM cam_, Math::Path *path_, const float &speed_, Math::Interpolator::TYPE interpolatorType_=Math::Interpolator::END, bool lookAtEnd_=false, float lookPercentAhead_=0.0f, bool usePercentOfPoints_=false)
 
void setPos (DIRECTOR_CAM cam_, const Math::Point<> &pos_)
 
void addFollowTarget (DIRECTOR_CAM cam_, Object *follow_, bool updatePos_=true, bool updateRot_=true)
 
void addFollowTarget (DIRECTOR_CAM cam_, Object *follow_, bool updatePos_, bool updateRot_, const Math::Point<> &localPos_, const Math::Matrix3x3 &localRot_)
 
void removeFollowTarget (DIRECTOR_CAM cam_, Object *follow_)
 
void setLookAtTarget (DIRECTOR_CAM cam_, Object *lookAt_=0)
 
bool translate (DIRECTOR_CAM cam_, const Math::Point<> &endPos_, float speed_, bool q_=false)
 
bool rotate (DIRECTOR_CAM cam_, const Math::Point<> &centerOfRot_, const Math::Point<> &axis_, float radians_, float speed_, bool q_=false)
 
bool rotate (DIRECTOR_CAM cam_, const Math::Point<> &centerOfRot_, const Math::Matrix3x3 &endRot_, float speed_, bool q_=false)
 
bool yawGloballyThenPitchLocally (DIRECTOR_CAM cam_, const Math::Point<> &endForward_, float speed_, bool q_=false)
 
void copyCine (DIRECTOR_CAM dest_, DIRECTOR_CAM source_)
 
CinematographergetCine (DIRECTOR_CAM cam_)
 
const CinematographergetCine (DIRECTOR_CAM cam_) const
 
- Public Member Functions inherited from OpenSkyNet::Core::MotionUpdater
 MotionUpdater (Updater::UPDATER_TYPE type_, const char *typeName_, Updater::UPDATER_PRIORITY prio_, float interval_)
 
virtual void addAnchor (Object *base_, Object *anchor_, bool updatePos_, bool updateRot_, const Math::Point<> &localPos_, const Math::Matrix3x3 &localRot_)
 
virtual void addAnchor (Object *base_, Object *anchor_, bool updatePos_, bool updateRot_)
 
virtual void removeAnchor (Object *base_, Object *anchor_)
 
virtual void removeAllAnchors (Object *base_)
 
- Public Member Functions inherited from OpenSkyNet::Core::Updater
 Updater ()
 
 Updater (UPDATER_TYPE type_, const char *typeName_, UPDATER_PRIORITY prio_, float interval_)
 
virtual ~Updater ()
 
UPDATER_TYPE getType () const
 
const std::string & getTypeName () const
 
float getInterval () const
 
void setInterval (float interval_)
 
Utils::uint getNumObjects () const
 
Utils::uint getNumObjectsThatCanUpdate () const
 
bool find (Object *obj_) const
 
UPDATER_PRIORITY getPriority () const
 
OBJECT_PRIORITY getPriority (Object *obj_) const
 
virtual bool setPriority (Object *obj_, OBJECT_PRIORITY prio_)
 

Protected Member Functions

virtual bool addObject (Object *obj_, Updater::OBJECT_PRIORITY prio_=Updater::OBJ_1, bool isOneShot_=false)
 
- Protected Member Functions inherited from OpenSkyNet::Core::MotionUpdater
virtual bool removeObject (Object *obj_)
 
virtual void removeAllObjects ()
 
virtual void updateAnchors (Object *obj_)
 
- Protected Member Functions inherited from OpenSkyNet::Core::Updater
int getNumToUpdate (float dt_)
 
void allObjectsUpdated ()
 
void setPriority (UPDATER_PRIORITY prio_)
 

Protected Attributes

DIRECTOR_CAM _currCam
 
DIRECTOR_CAM _prevCam
 
bool _noSwitchIfBusy
 
DIRECTOR_CAM _goToWhenNotBusy
 
Cinematographer_tempCam
 
Cinematographer_POV3rdCam
 
Cinematographer_POV1stCam
 
- Protected Attributes inherited from OpenSkyNet::Core::MotionUpdater
std::map< Object *, MotionInfo * > _nonCollidingInfoMap
 
- Protected Attributes inherited from OpenSkyNet::Core::Updater
std::list< Object * > _objLists [OBJ_NUM_PRIORITIES]
 
ObjMap _objMap
 
UPDATER_TYPE _type
 
std::string _typeName
 
UPDATER_PRIORITY _prio
 
float _interval
 
float _dtSinceAllWereUpdated
 
float _prevTotalTimeForAllUpdates
 
float _partialUpdate
 
int _currPrio
 
std::list< Object * >::iterator _currObj
 

Additional Inherited Members

- Public Types inherited from OpenSkyNet::Core::MotionUpdater
enum  ATTACH_POINT { BASE, VIEW, NUM_ATTACH_POINTS }
 
- Public Types inherited from OpenSkyNet::Core::Updater
enum  UPDATER_TYPE {
  BASE, AI, CAMERA, PATH_FINDER,
  PATH, TRANSFORM_INTERPOLATOR, PHYSICS, ANIMATION,
  COLLISION_DETECTOR, PHYS_VIS, TRANSFORM_CHANGE_DETECTOR, CORE_MAX,
  MAX =32
}
 
enum  UPDATER_PRIORITY {
  UPD_DISABLED, UPD_1, UPD_2, UPD_3,
  UPD_4, UPD_5, UPD_6, UPD_7,
  UPD_8, UPD_NUM_PRIORITIES
}
 
enum  OBJECT_PRIORITY {
  OBJ_DISABLED, OBJ_1, OBJ_2, OBJ_3,
  OBJ_NUM_PRIORITIES
}
 
typedef std::map< Object
*, UpdateInfo * > 
ObjMap
 
- Static Public Member Functions inherited from OpenSkyNet::Core::MotionUpdater
static void setForward (Math::Matrix3x3 &rot_, Math::Point<> &forward_)
 

Detailed Description

Directs and coordinates multiple Cinematographers.

Constructor & Destructor Documentation

Director::Director ( )
virtual OpenSkyNet::Core::Director::~Director ( )
inlinevirtual

Member Function Documentation

void OpenSkyNet::Core::Director::addFollowTarget ( DIRECTOR_CAM  cam_,
Object follow_,
bool  updatePos_ = true,
bool  updateRot_ = true 
)
void OpenSkyNet::Core::Director::addFollowTarget ( DIRECTOR_CAM  cam_,
Object follow_,
bool  updatePos_,
bool  updateRot_,
const Math::Point<> &  localPos_,
const Math::Matrix3x3 localRot_ 
)
virtual bool OpenSkyNet::Core::Director::addObject ( Object obj_,
Updater::OBJECT_PRIORITY  prio_ = Updater::OBJ_1,
bool  isOneShot_ = false 
)
inlineprotectedvirtual

Returns false if obj_ is already in this updater.

Implements OpenSkyNet::Core::MotionUpdater.

void Director::copyCine ( DIRECTOR_CAM  dest_,
DIRECTOR_CAM  source_ 
)

Effects are not copied, and current effects are cleared.

Cinematographer * Director::getCine ( DIRECTOR_CAM  cam_)
const Cinematographer* OpenSkyNet::Core::Director::getCine ( DIRECTOR_CAM  cam_) const
DIRECTOR_CAM OpenSkyNet::Core::Director::getCurrCam ( ) const
inline
bool OpenSkyNet::Core::Director::isCurrCamBusy ( ) const
inline
void Director::removeFollowTarget ( DIRECTOR_CAM  cam_,
Object follow_ 
)
bool OpenSkyNet::Core::Director::rotate ( DIRECTOR_CAM  cam_,
const Math::Point<> &  centerOfRot_,
const Math::Point<> &  axis_,
float  radians_,
float  speed_,
bool  q_ = false 
)

Returns false if the radians to update is less than LerpOverTime3x3::_minRadsToUpdate.

bool OpenSkyNet::Core::Director::rotate ( DIRECTOR_CAM  cam_,
const Math::Point<> &  centerOfRot_,
const Math::Matrix3x3 endRot_,
float  speed_,
bool  q_ = false 
)

Returns false if the radians to update is less than LerpOverTime3x3::_minRadsToUpdate.

bool Director::setCurrCam ( DIRECTOR_CAM  cam_)
virtual
void Director::setLookAtTarget ( DIRECTOR_CAM  cam_,
Object lookAt_ = 0 
)
void Director::setPath ( DIRECTOR_CAM  cam_,
Math::Path path_,
const float &  speed_,
Math::Interpolator::TYPE  interpolatorType_ = Math::Interpolator::END,
bool  lookAtEnd_ = false,
float  lookPercentAhead_ = 0.0f,
bool  usePercentOfPoints_ = false 
)
void Director::setPos ( DIRECTOR_CAM  cam_,
const Math::Point<> &  pos_ 
)
void Director::setStaticEffect ( DIRECTOR_CAM  cam_,
CAMERA_EFFECT  type_,
float  begin_,
float  end_,
float  speed_,
bool  q_ = false 
)
bool Director::translate ( DIRECTOR_CAM  cam_,
const Math::Point<> &  endPos_,
float  speed_,
bool  q_ = false 
)

Returns false if the distance to update squared is less than LerpOverTime3::_minSqrdDistToUpdate.

bool Director::update ( float  dt_)
virtual

Returns true if all objects were updated over the current interval (that's interval, not dt_), false if objects are left to be updated (see class description).

Parameters
dt_= seconds to update an object this call. dt_ accumulates for objects not updated.
Todo:
Update other cinematographers besides the current one.

Reimplemented from OpenSkyNet::Core::Updater.

bool Director::yawGloballyThenPitchLocally ( DIRECTOR_CAM  cam_,
const Math::Point<> &  endForward_,
float  speed_,
bool  q_ = false 
)

Returns false if both yaw and pitch radians to update are less than LerpOverTime3x3::_minRadsToUpdate.

Member Data Documentation

DIRECTOR_CAM OpenSkyNet::Core::Director::_currCam
protected
DIRECTOR_CAM OpenSkyNet::Core::Director::_goToWhenNotBusy
protected
bool OpenSkyNet::Core::Director::_noSwitchIfBusy
protected
Cinematographer * OpenSkyNet::Core::Director::_POV1stCam
protected
Cinematographer * OpenSkyNet::Core::Director::_POV3rdCam
protected
DIRECTOR_CAM OpenSkyNet::Core::Director::_prevCam
protected
Cinematographer* OpenSkyNet::Core::Director::_tempCam
protected

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