YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
CameraController.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_CAMERACONTROLLER_HPP
2
# define YAPOG_CAMERACONTROLLER_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Game/IUpdateable.hpp
"
6
# include "
YAPOG/Graphics/Vector2.hpp
"
7
8
namespace
yap
9
{
10
struct
ICamera;
11
struct
ISpatial;
12
13
class
YAPOG_LIB
CameraController
:
public
IUpdateable
14
{
15
DISALLOW_COPY
(
CameraController
);
16
17
public
:
18
19
virtual
~
CameraController
();
20
21
void
SetTarget (
ISpatial
& target);
22
24
void
FocusTarget ();
25
26
void
SetBounds (
const
FloatRect
& bounds);
27
30
virtual
void
Update (
const
Time
& dt);
32
33
protected
:
34
35
explicit
CameraController
(
ICamera
& camera);
36
37
void
CheckBounds (
Vector2
& offset);
38
39
void
CenterOnTarget ();
40
41
virtual
void
HandleFocusTarget () = 0;
42
43
virtual
void
HandleUpdate (
const
Time
& dt) = 0;
44
45
ICamera
&
camera_
;
46
ISpatial
*
target_
;
47
48
FloatRect
bounds_
;
49
};
50
}
// namespace yap
51
52
#endif // YAPOG_CAMERACONTROLLER_HPP
YAPOG
include
YAPOG
Graphics
CameraController.hpp
Generated on Mon Sep 17 2012 22:24:23 for YAPOG by
1.8.1.1