21#ifndef HEADER_CAMERA_FPS_HPP
22#define HEADER_CAMERA_FPS_HPP
24#include "graphics/camera.hpp"
26#include "utils/cpp2011.hpp"
89 void positionCamera(
float dt,
float above_kart,
float cam_angle,
90 float side_way,
float distance,
float smoothing);
97 static bool isFPS() {
return true; }
100 virtual void update(
float dt) OVERRIDE;
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Handles the game camera.
Definition: camera_fps.hpp:35
core::vector3df m_target_velocity
Velocity of the target of the camera, used for end and first person camera.
Definition: camera_fps.hpp:67
const core::vector3df & getDirection()
Gets the vector, the first person camera should look at.
Definition: camera_fps.hpp:135
void setLinearVelocity(core::vector3df vel)
Sets the linear velocity for this camera.
Definition: camera_fps.cpp:272
core::vector3df m_target_up_vector
The up vector the camera should have, only used for the first person camera.
Definition: camera_fps.hpp:76
void setSmoothMovement(bool value)
Sets if the first person camera should be moved smooth.
Definition: camera_fps.hpp:107
virtual ~CameraFPS()
Removes the camera scene node from the scene.
Definition: camera_fps.cpp:65
virtual void update(float dt) OVERRIDE
Called once per time frame to move the camera to the right position.
Definition: camera_fps.cpp:120
float getMaximumVelocity()
Returns the current angular velocity.
Definition: camera_fps.hpp:127
float m_max_velocity
Maximum velocity for fps camera.
Definition: camera_fps.hpp:60
const core::vector3df & getLinearVelocity()
Returns the current linear velocity.
Definition: camera_fps.cpp:282
void setDirection(core::vector3df target)
Sets the vector, the first person camera should look at.
Definition: camera_fps.hpp:131
core::vector3df m_target_direction
The target direction for the camera, only used for the first person camera.
Definition: camera_fps.hpp:70
void setUpVector(core::vector3df target)
Sets the up vector, the first person camera should use.
Definition: camera_fps.hpp:139
float m_angular_velocity
The speed at which the up-vector rotates, only used for the first person camera.
Definition: camera_fps.hpp:54
float m_target_angular_velocity
Target angular velocity.
Definition: camera_fps.hpp:57
bool m_smooth
Smooth acceleration with the first person camera.
Definition: camera_fps.hpp:47
void setAngularVelocity(float vel)
Sets the angular velocity for this camera.
Definition: camera_fps.cpp:252
float m_position_speed
The speed at which the camera changes position.
Definition: camera_fps.hpp:38
float getAngularVelocity()
Returns the current target angular velocity.
Definition: camera_fps.cpp:262
bool getSmoothMovement()
If the first person camera should be moved smooth.
Definition: camera_fps.hpp:111
core::vector3df m_local_up
Save the local up vector if the first person camera is attached to the kart.
Definition: camera_fps.hpp:85
const core::vector3df & getUpVector()
Gets the up vector, the first person camera should use.
Definition: camera_fps.hpp:143
float m_target_speed
The speed at which the camera target changes position.
Definition: camera_fps.hpp:41
core::vector3df m_local_position
Save the local position if the first person camera is attached to the kart.
Definition: camera_fps.hpp:79
core::vector3df m_lin_velocity
Linear velocity of the camera, used for end and first person camera.
Definition: camera_fps.hpp:64
core::vector3df m_direction_velocity
The speed at which the direction changes, only used for the first person camera.
Definition: camera_fps.hpp:73
void setAttachedFpsCam(bool value)
Sets if the first person camera should be moved with the kart.
Definition: camera_fps.hpp:115
void setMaximumVelocity(float vel)
Sets the angular velocity for this camera.
Definition: camera_fps.hpp:123
core::vector3df m_local_direction
Save the local direction if the first person camera is attached to the kart.
Definition: camera_fps.hpp:82
void applyMouseMovement(float x, float y)
Applies mouse movement to the first person camera.
Definition: camera_fps.cpp:74
float m_rotation_range
Factor of the effects of steering in camera aim.
Definition: camera_fps.hpp:44
bool getAttachedFpsCam()
If the first person camera should be moved with the kart.
Definition: camera_fps.hpp:119
bool m_attached
Attache the first person camera to a kart.
Definition: camera_fps.hpp:51
This is the base class for all cameras.
Definition: camera.hpp:49