Camera Class Reference

#include <Camera.h>

List of all members.


Detailed Description

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


Constructor & Destructor Documentation

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.


Member Function Documentation

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:


Member Data Documentation

int Camera::_bottomBorder [private]

Definition at line 18 of file Camera.h.

Referenced by setBorders(), and update().

const int Camera::_edgeDistance = 25 [static, private]

Definition at line 20 of file Camera.h.

Referenced by update().

int Camera::_leftBorder [private]

Definition at line 18 of file Camera.h.

Referenced by setBorders(), and update().

const float Camera::_marginRatio = 0.5f [static, private]

Definition at line 22 of file Camera.h.

Referenced by setBorders().

Point Camera::_position [private]

Definition at line 19 of file Camera.h.

Referenced by getPosition(), setBorders(), setPosition(), and update().

int Camera::_rightBorder [private]

Definition at line 18 of file Camera.h.

Referenced by setBorders(), and update().

const float Camera::_scrollRatio = 0.5f [static, private]

Definition at line 21 of file Camera.h.

Referenced by update().

int Camera::_topBorder [private]

Definition at line 18 of file Camera.h.

Referenced by setBorders(), and update().


The documentation for this class was generated from the following files:
Generated on Fri Sep 22 06:00:26 2006 for X-CLONE by  doxygen 1.4.7