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
CCameraUpdater.h
Go to the documentation of this file.
1 // Copyright (C) 2004-2013 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 CCAMERA_UPDATER_H
22 #define CCAMERA_UPDATER_H
23 
24 #include "CCamera.h"
25 #include "CPathUpdater.h"
26 #include "CTransformInterpolator.h"
27 
28 namespace OpenSkyNet {
29  namespace Core {
31  class CORE_DLL Director : public MotionUpdater {
32  protected:
36  Cinematographer *_tempCam, *_POV3rdCam, *_POV1stCam;
37 
38  virtual bool addObject(Object* obj_, Updater::OBJECT_PRIORITY prio_=Updater::OBJ_1, bool isOneShot_=false) {
39  UNUSED(obj_); UNUSED(prio_); UNUSED(isOneShot_);
40  return false;
41  }
42  public:
43  Director();
44  virtual ~Director() {}
45 
46  virtual bool update(float dt_);
47 
48  virtual bool setCurrCam(DIRECTOR_CAM cam_);
49 
50  inline DIRECTOR_CAM getCurrCam() const { return _currCam; }
51 
52  inline bool isCurrCamBusy() const { return getCine(_currCam) && getCine(_currCam)->isBusy(); }
53 
54  void setStaticEffect(DIRECTOR_CAM cam_, CAMERA_EFFECT type_, float begin_, float end_, float speed_, bool q_=false);
55 
56  void setPath(DIRECTOR_CAM cam_, Math::Path* path_, const float& speed_,
58  bool lookAtEnd_=false, float lookPercentAhead_=0.0f, bool usePercentOfPoints_=false);
59 
60  void setPos(DIRECTOR_CAM cam_, const Math::Point<>& pos_);
61 
62  void addFollowTarget(DIRECTOR_CAM cam_, Object* follow_, bool updatePos_=true, bool updateRot_=true);
63 
64  void addFollowTarget(DIRECTOR_CAM cam_, Object* follow_, bool updatePos_, bool updateRot_, const Math::Point<>& localPos_, const Math::Matrix3x3& localRot_);
65 
66  void removeFollowTarget(DIRECTOR_CAM cam_, Object* follow_);
67 
68  void setLookAtTarget(DIRECTOR_CAM cam_, Object* lookAt_=0);
69 
72  bool translate(DIRECTOR_CAM cam_, const Math::Point<>& endPos_, float speed_, bool q_=false);
73 
76  bool rotate(DIRECTOR_CAM cam_, const Math::Point<>& centerOfRot_, const Math::Point<>& axis_, float radians_, float speed_, bool q_=false);
77 
80  bool rotate(DIRECTOR_CAM cam_, const Math::Point<>& centerOfRot_, const Math::Matrix3x3& endRot_, float speed_, bool q_=false);
81 
84  bool yawGloballyThenPitchLocally(DIRECTOR_CAM cam_, const Math::Point<>& endForward_, float speed_, bool q_=false);
85 
87  void copyCine(DIRECTOR_CAM dest_, DIRECTOR_CAM source_);
88 
89  Cinematographer* getCine(DIRECTOR_CAM cam_);
90  const Cinematographer* getCine(DIRECTOR_CAM cam_) const;
91  };
92  }
93 }
94 
95 #endif //CCAMERA_UPDATER_H
DIRECTOR_CAM
Definition: CCamera.h:33
virtual bool addObject(Object *obj_, Updater::OBJECT_PRIORITY prio_=Updater::OBJ_1, bool isOneShot_=false)
Definition: CCameraUpdater.h:38
#define UNUSED(var)
Definition: UTypes.h:35
bool isCurrCamBusy() const
Definition: CCameraUpdater.h:52
TYPE
Definition: MInterpolator.h:37
Definition: CCamera.h:41
virtual ~Director()
Definition: CCameraUpdater.h:44
DIRECTOR_CAM getCurrCam() const
Definition: CCameraUpdater.h:50
Definition: CUpdater.h:49
DIRECTOR_CAM _prevCam
Definition: CCameraUpdater.h:33
bool _noSwitchIfBusy
Definition: CCameraUpdater.h:34
OBJECT_PRIORITY
Definition: CUpdater.h:49
#define CORE_DLL
Definition: CCoreDLL.h:57
Definition: MPoint.h:33
Definition: IObject.h:36
CAMERA_EFFECT
Definition: CCamera.h:32
Definition: IMotionUpdater.h:33
Definition: MInterpolator.h:41
Definition: MMatrix3x3.h:32
DIRECTOR_CAM _goToWhenNotBusy
Definition: CCameraUpdater.h:35
float pos_[3]
Definition: ViewerApp.h:31
Cinematographer * _tempCam
Definition: CCameraUpdater.h:36
Definition: CCameraUpdater.h:31
Definition: MPath.h:31