SPACE::Graphic::cCamera Class Reference

List of all members.

Public Member Functions

 cCamera (SDL_Surface *_Screen)
void Move (float _dX, float _dY)
void MoveTo (float _X, float _Y)
void Resize (int _Width, int _Height)
bool AddChild (cSprite *_Sprite)
void UpdateChild ()
void RemoveAllChild ()
SDL_Rect GetRect ()

Member Function Documentation

bool cCamera::AddChild ( cSprite _Sprite  ) 

Adds a Child to the camera, so that the Coordinates are relativ to the camera.

Parameters:
_Sprite Pointer to the Sprite wich should be relativ to the camera
SDL_Rect SPACE::Graphic::cCamera::GetRect (  )  [inline]
Returns:
The rect of the camera
void cCamera::Move ( float  _dX,
float  _dY 
)

Use this, if you want to move the camera (eg. 10 Pixel) to the (eg. left).

Parameters:
_dX The ammount we add in X coordinate
_dY The ammount we add in Y coordinate
void cCamera::MoveTo ( float  _X,
float  _Y 
)

Moves the camera to the given Point. [Absolute X and Y value]

Parameters:
_X The x position [Absolute]
_Y The y position [Aboslute]
void cCamera::RemoveAllChild (  ) 

Removes every Child

void cCamera::Resize ( int  _Width,
int  _Height 
)

Resize the camera

Parameters:
_Width The new camera width
_Height The new camera height
void cCamera::UpdateChild (  ) 

Update the Position of all Child Sprites


The documentation for this class was generated from the following files:
Generated on Wed Apr 7 17:20:25 2010 for SPACE Engine by  doxygen 1.6.3