src/object/camera.cpp File Reference

#include "object/camera.hpp"
#include <math.h>
#include <physfs.h>
#include "util/reader.hpp"
#include "util/writer.hpp"
#include "lisp/parser.hpp"
#include "object/path_walker.hpp"
#include "object/player.hpp"
#include "scripting/camera.hpp"
#include "scripting/squirrel_util.hpp"
#include "supertux/globals.hpp"
#include "supertux/sector.hpp"

Go to the source code of this file.

Classes

class  CameraConfig

Functions

float clamp (float val, float min, float max)

Variables

static const float PEEK_ARRIVE_RATIO = 0.1
static const float CAMERA_EPSILON = .00001f
static const float MAX_SPEED_Y = 140


Function Documentation

float clamp ( float  val,
float  min,
float  max 
)

Definition at line 268 of file camera.cpp.

Referenced by Camera::keep_in_bounds(), and Camera::update_scroll_normal().

00269 {
00270   if(val < min)
00271     return min;
00272   if(val > max)
00273     return max;
00274 
00275   return val;
00276 }


Variable Documentation

const float CAMERA_EPSILON = .00001f [static]

Definition at line 232 of file camera.cpp.

Referenced by Camera::update_scroll_normal().

const float MAX_SPEED_Y = 140 [static]

Definition at line 233 of file camera.cpp.

const float PEEK_ARRIVE_RATIO = 0.1 [static]

Definition at line 35 of file camera.cpp.

Referenced by Camera::update_scroll_normal().


Generated on Mon Jun 9 03:38:26 2014 for SuperTux by  doxygen 1.5.1