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:33
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
Definition: vec3.hpp:34
virtual unsigned int getNextSector(unsigned int index)
Returns the next sector of the given sector index.
Definition: ai_base_lap_controller.cpp:234
LinearWorld * m_world
Keep a pointer to world.
Definition: ai_base_lap_controller.hpp:42
virtual void raceFinished()
Nothing special to do when the race is finished.
Definition: ai_base_lap_controller.hpp:66
virtual void update(int ticks)
Updates the ai base controller each time step.
Definition: ai_base_lap_controller.cpp:200
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
A simple class that stores all AI related properties.
Definition: ai_properties.hpp:39
AIBaseLapController(AbstractKart *kart)
This is the base class for all AIs.
Definition: ai_base_lap_controller.cpp:86
int m_track_node
The current node the kart is on.
Definition: ai_base_lap_controller.hpp:39
float steerToAngle(const unsigned int sector, const float angle)
This function steers towards a given angle.
Definition: ai_base_lap_controller.cpp:246
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
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
Definition: script_track.cpp:52
void computePath()
Computes a path for the AI to follow.
Definition: ai_base_lap_controller.cpp:141
A base class for all AI karts.
Definition: ai_base_lap_controller.hpp:32
Definition: linear_world.hpp:35
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
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61