scripting::Camera Class Reference

#include <camera.hpp>

List of all members.

Public Member Functions

 Camera (_Camera *camera)
 ~Camera ()
void reload_config ()
void shake (float speed, float x, float y)
 Shake the camera.
void set_pos (float x, float y)
 Set camera to a specific coordinate.
void set_mode (const std::string &mode)
 Set camera to a specific mode, can be "normal", "manual".
void scroll_to (float x, float y, float scrolltime)
 Scroll camera to position x,y in scrolltime seconds.

Public Attributes

_Cameracamera

Private Member Functions

 Camera (const Camera &)
Cameraoperator= (const Camera &)


Detailed Description

Definition at line 27 of file camera.hpp.


Constructor & Destructor Documentation

scripting::Camera::Camera ( _Camera camera  ) 

Camera::~Camera (  ) 

Definition at line 27 of file camera.cpp.

00028 { }

scripting::Camera::Camera ( const Camera  )  [private]


Member Function Documentation

void Camera::reload_config (  ) 

Definition at line 31 of file camera.cpp.

References scripting::camera().

Referenced by scripting::wrapper::Camera_reload_config_wrapper().

00032 {
00033   camera->reload_config();
00034 }

void Camera::shake ( float  speed,
float  x,
float  y 
)

Shake the camera.

Definition at line 37 of file camera.cpp.

References scripting::camera().

Referenced by scripting::wrapper::Camera_shake_wrapper().

00038 {
00039   camera->shake(speed, x, y);
00040 }

void Camera::set_pos ( float  x,
float  y 
)

Set camera to a specific coordinate.

Definition at line 43 of file camera.cpp.

Referenced by scripting::wrapper::Camera_set_pos_wrapper().

00044 {
00045 }

void Camera::set_mode ( const std::string &  mode  ) 

Set camera to a specific mode, can be "normal", "manual".

Definition at line 48 of file camera.cpp.

References scripting::camera(), log_fatal, Camera::MANUAL, and Camera::NORMAL.

Referenced by scripting::wrapper::Camera_set_mode_wrapper().

00049 {
00050   if(mode == "normal") {
00051     camera->mode = ::Camera::NORMAL;
00052   } else if(mode == "manual") {
00053     camera->mode = ::Camera::MANUAL;
00054   } else {
00055     log_fatal << "Camera mode '" << mode << "' unknown.";
00056   }
00057 }

void Camera::scroll_to ( float  x,
float  y,
float  scrolltime 
)

Scroll camera to position x,y in scrolltime seconds.

Definition at line 60 of file camera.cpp.

References scripting::camera().

Referenced by scripting::wrapper::Camera_scroll_to_wrapper().

00061 {
00062   camera->scroll_to(Vector(x, y), scrolltime);
00063 }

Camera& scripting::Camera::operator= ( const Camera  )  [private]


Member Data Documentation

_Camera* scripting::Camera::camera

Definition at line 47 of file camera.hpp.


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:40 2014 for SuperTux by  doxygen 1.5.1