18#ifndef HEADER_AI_BASE_LAP_CONTROLLER_HPP
19#define HEADER_AI_BASE_LAP_CONTROLLER_HPP
21#include "karts/controller/ai_base_controller.hpp"
56 virtual void update(
int ticks);
58 virtual void newLap(
int lap);
61 float steerToAngle (
const unsigned int sector,
const float angle);
A base class for all AI karts.
Definition: ai_base_controller.hpp:34
A base class for all AI karts.
Definition: ai_base_lap_controller.hpp:33
std::vector< int > m_successor_index
Which of the successors of a node was selected by the AI.
Definition: ai_base_lap_controller.hpp:45
int m_track_node
The current node the kart is on.
Definition: ai_base_lap_controller.hpp:39
void computePath()
Computes a path for the AI to follow.
Definition: ai_base_lap_controller.cpp:141
virtual void raceFinished()
Nothing special to do when the race is finished.
Definition: ai_base_lap_controller.hpp:66
virtual void newLap(int lap)
Triggers a recomputation of the path to use, so that the AI does not always use the same way.
Definition: ai_base_lap_controller.cpp:124
std::vector< int > m_next_node_index
For each node in the graph this list contains the chosen next node.
Definition: ai_base_lap_controller.hpp:51
virtual void update(int ticks)
Updates the ai base controller each time step.
Definition: ai_base_lap_controller.cpp:200
std::vector< std::vector< int > > m_all_look_aheads
For each graph node this list contains a list of the next X graph nodes.
Definition: ai_base_lap_controller.hpp:54
virtual unsigned int getNextSector(unsigned int index)
Returns the next sector of the given sector index.
Definition: ai_base_lap_controller.cpp:234
float steerToAngle(const unsigned int sector, const float angle)
This function steers towards a given angle.
Definition: ai_base_lap_controller.cpp:246
LinearWorld * m_world
Keep a pointer to world.
Definition: ai_base_lap_controller.hpp:42
A simple class that stores all AI related properties.
Definition: ai_properties.hpp:40
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Definition: linear_world.hpp:36
Definition: track.hpp:114
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35