21#ifndef HEADER_CAMERA_NORMAL_HPP
22#define HEADER_CAMERA_NORMAL_HPP
24#include "graphics/camera.hpp"
26#include "utils/cpp2011.hpp"
54 void moveCamera(
float dt,
bool smooth,
float cam_angle,
float distance);
55 void handleEndCamera(
float dt);
57 float *side_way,
float *distance,
58 bool *smoothing,
float *cam_roll_angle);
61 float side_way,
float distance,
float smoothing,
62 float cam_roll_angle);
64 btVector3 m_kart_position;
65 btQuaternion m_kart_rotation;
76 void snapToPosition();
78 bool isDebug() {
return false; }
80 bool isFPS() {
return false; }
82 virtual void update(
float dt) OVERRIDE;
87 void setDistanceToKart(
float distance) {
m_distance = distance; }
89 float getDistanceToKart()
const {
return m_distance; }
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Handles the debug camera.
Definition: camera_debug.hpp:34
Handles the end race camera.
Definition: camera_end.hpp:34
Handles the normal racing camera.
Definition: camera_normal.hpp:33
float m_target_speed
The speed at which the camera target changes position.
Definition: camera_normal.hpp:47
virtual void update(float dt) OVERRIDE
Called once per time frame to move the camera to the right position.
Definition: camera_normal.cpp:300
float m_distance
Distance between the camera and the kart.
Definition: camera_normal.hpp:41
float m_position_speed
The speed at which the camera changes position.
Definition: camera_normal.hpp:44
float m_rotation_range
Factor of the effects of steering in camera aim.
Definition: camera_normal.hpp:50
video::SColor m_ambient_light
Current ambient light for this camera.
Definition: camera_normal.hpp:38
void positionCamera(float dt, float above_kart, float cam_angle, float side_way, float distance, float smoothing, float cam_roll_angle)
Actually sets the camera based on the given parameter.
Definition: camera_normal.cpp:346
void moveCamera(float dt, bool smooth, float cam_angle, float distance)
Moves the camera smoothly from the current camera position (and target) to the new position and targe...
Definition: camera_normal.cpp:80
void getCameraSettings(float *above_kart, float *cam_angle, float *side_way, float *distance, bool *smoothing, float *cam_roll_angle)
Determine the camera settings for the current frame.
Definition: camera_normal.cpp:191
const video::SColor & getAmbientLight() const
Returns the current ambient light.
Definition: camera_normal.hpp:92
void setAmbientLight(const video::SColor &color)
Sets the ambient light for this camera.
Definition: camera_normal.hpp:85
This is the base class for all cameras.
Definition: camera.hpp:49
CameraType
The different camera types that can be used.
Definition: camera.hpp:53
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35