#include <Camera.h>
Definition at line 6 of file Camera.h.
Public Member Functions | |
Camera (int x, int y) | |
Camera () | |
const Point & | getPosition () const |
void | setBorders (int left, int right, int top, int bottom) |
void | setPosition (int x, int y) |
void | update (unsigned int deltaTime) |
~Camera () | |
Private Attributes | |
int | _bottomBorder |
int | _leftBorder |
Point | _position |
int | _rightBorder |
int | _topBorder |
Static Private Attributes | |
static const int | _edgeDistance = 25 |
static const float | _marginRatio = 0.5f |
static const float | _scrollRatio = 0.5f |
Camera::Camera | ( | ) |
Definition at line 9 of file Camera.cpp.
Camera::Camera | ( | int | x, | |
int | y | |||
) |
Definition at line 15 of file Camera.cpp.
Camera::~Camera | ( | ) |
Definition at line 21 of file Camera.cpp.
const Point & Camera::getPosition | ( | ) | const |
Definition at line 71 of file Camera.cpp.
References _position.
Referenced by MainGameState::focusOnUnit(), MainGameState::processSDLEvent(), and MainGameState::update().
Here is the caller graph for this function:
void Camera::setBorders | ( | int | left, | |
int | right, | |||
int | top, | |||
int | bottom | |||
) |
Definition at line 25 of file Camera.cpp.
References _bottomBorder, _leftBorder, _marginRatio, _position, _rightBorder, _topBorder, Display::getScreenHeight(), Display::getScreenWidth(), Singleton< T >::instance(), Point::x, and Point::y.
Referenced by MainGameState::init().
Here is the call graph for this function:
Here is the caller graph for this function:
void Camera::setPosition | ( | int | x, | |
int | y | |||
) |
Definition at line 76 of file Camera.cpp.
References _position.
Referenced by MainGameState::focusOnUnit().
Here is the caller graph for this function:
void Camera::update | ( | unsigned int | deltaTime | ) |
Definition at line 40 of file Camera.cpp.
References _bottomBorder, _edgeDistance, _leftBorder, _position, _rightBorder, _scrollRatio, _topBorder, Singleton< T >::instance(), Point::x, and Point::y.
Referenced by MainGameState::update().
Here is the call graph for this function:
Here is the caller graph for this function:
int Camera::_bottomBorder [private] |
const int Camera::_edgeDistance = 25 [static, private] |
int Camera::_leftBorder [private] |
const float Camera::_marginRatio = 0.5f [static, private] |
Point Camera::_position [private] |
Definition at line 19 of file Camera.h.
Referenced by getPosition(), setBorders(), setPosition(), and update().
int Camera::_rightBorder [private] |
const float Camera::_scrollRatio = 0.5f [static, private] |
int Camera::_topBorder [private] |