21 #ifndef HEADER_CAMERA_NORMAL_HPP
22 #define HEADER_CAMERA_NORMAL_HPP
24 #include "graphics/camera/camera.hpp"
26 #include "utils/cpp2011.hpp"
54 Mode m_last_smooth_mode;
56 void moveCamera(
float dt,
bool smooth,
float cam_angle,
float distance);
59 float *above_kart,
float *cam_angle,
60 float *side_way,
float *distance,
61 bool *smoothing,
float *cam_roll_angle);
64 float side_way,
float distance,
float smoothing,
65 float cam_roll_angle);
67 btVector3 m_kart_position;
68 btQuaternion m_kart_rotation;
81 bool isDebug() {
return false; }
83 bool isFPS() {
return false; }
85 virtual void update(
float dt) OVERRIDE;
90 void setDistanceToKart(
float distance) {
m_distance = distance; }
92 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:303
CameraNormal(Camera::CameraType type, int camera_index, AbstractKart *kart)
Constructor for the normal camera.
Definition: camera_normal.cpp:45
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
const video::SColor & getAmbientLight() const
Returns the current ambient light.
Definition: camera_normal.hpp:95
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 getCameraSettings(Mode mode, 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:192
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:361
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:77
void setAmbientLight(const video::SColor &color)
Sets the ambient light for this camera.
Definition: camera_normal.hpp:88
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
Mode
Definition: camera.hpp:62
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35