libs/PlayerCar.cpp
/**
	 * @brief Update the car according to it's position and the map
	 *
	 * @param dt Time difference between two update frames
	 * @param lines provides the map grid info
	 * @param segL Segment line between two grid in the map
	 */
@brief Update the car according to it's position and the map
@param dt Time difference between two update frames
@param lines provides the map grid info
@param segL Segment line between two grid in the map
@brief Update the car according to it ' s position and the map @param dt Time difference between two update frames @param lines provides the map grid info @param segL Segment line between two grid in the map
void PlayerCar::update_car(const float dt, const std::vector<Line> &lines, const float segL) {
		float speedRatio = std::abs(e_speed.z / e_max_speed.z); 
		float dx = 3 * dt * speedRatio;
		Line index_line = lines[e_position.z / segL];
		e_position.x -= (dx * speedRatio * index_line.curve * centrifugal);
		e_position.x = std::max(-1.0f, std::min(e_position.x, 1.0f));
	}
void PlayerCar :: update_car ( const float dt , const std :: vector < Line > & lines , const float segL ) { float speedRatio = std :: abs ( e_speed . z / e_max_speed . z ) ; float dx = 3 * dt * speedRatio ; Line index_line = lines [ e_position . z / segL ] ; e_position . x -= ( dx * speedRatio * index_line . curve * centrifugal ) ; e_position . x = std :: max ( -1.0f , std :: min ( e_position . x , 1.0f ) ) ; }
@brief Update the car according to it's position and the map
 @param dt Time difference between two update frames
 @param lines provides the map grid info
 @param segL Segment line between two grid in the map
@brief Update the car according to it ' s position and the map @param dt Time difference between two update frames @param lines provides the map grid info @param segL Segment line between two grid in the map
///////// Updating the camera's position /////////////////// //ASDF