Emergency 2017 Dokumentation  v3.0.1
qsf::ai::voronoi Namespace Reference

Classes

class  CellDiagonalVisualizer
 
class  CellIndexVisualizer
 
class  CellInfluenceVisualizer
 
class  CellOutlineVisualizer
 
class  ContactTestGridBlocker
 
class  DebugSettings
 
class  DistanceCalculator
 
class  DynamicGraph
 
class  Segment
 
class  SegmentCollection
 
class  SegmentFinder
 
class  SegmentNode
 
class  SelectEquidistantCellsFilter
 
class  SelectObstacleFilter
 
class  SelectSpecificDistanceFilter
 
class  SelectSpecificSetFilter
 
class  SelectVoronoiEndFilter
 
class  SelectVoronoiVicinityFilter
 
class  TrafficLaneConverter
 
class  VoronoiLaneWorldMixer
 Voronoi lane mixer. More...
 

Enumerations

enum  DebugOption {
  SHOW_OBSTACLES, SHOW_EQUIDISTANT_CELLS, SHOW_EQUIDISTANT_OBSTACLE_INFLUENCES, SHOW_RAW_SEGMENTS,
  SHOW_SEGMENT_CONNECTIONS
}
 

Functions

template<typename Filter , typename Visualizer >
void visualizeCells (const Filter &filter, const DistanceGrid &grid, const Time &duration, const Visualizer &visualizer)
 
std::auto_ptr< TrafficLaneWorld > QSF_AI_API_EXPORT createTrafficLaneWorld (const TrafficLaneWorldCreationSettings &settings, Map &map)
 

Variables

const unsigned int NUM_DEBUG_OPTIONS = SHOW_SEGMENT_CONNECTIONS + 1
 

Enumeration Type Documentation

Enumerator
SHOW_OBSTACLES 
SHOW_EQUIDISTANT_CELLS 
SHOW_EQUIDISTANT_OBSTACLE_INFLUENCES 
SHOW_RAW_SEGMENTS 
SHOW_SEGMENT_CONNECTIONS 

Definition at line 23 of file VoronoiDebugOptions.h.

Function Documentation

std::auto_ptr<TrafficLaneWorld> QSF_AI_API_EXPORT qsf::ai::voronoi::createTrafficLaneWorld ( const TrafficLaneWorldCreationSettings settings,
Map map 
)

Facade method to manage all the activities for creating a traffic lane world model via the automatic Voronoi generation. This executes the complete creation algorithm consisting of the following steps: 1.) Create a grid with the requested dimensions. 2.) Enter all entities with a collision component attached as obstacles into the grid. The default is to use no height restriction on which obstacles to consider. Additionally the outer border cells may be marked as blocked by the core entity (to represent the map boundaries). 3.) Calculate the distances and the cells with several equidistant obstacles. 4.) Find the segments as connected lines of equidistant cells to the same obstacles. 5.) Connect neighbouring end points of identified segments. 6.) Convert to lanes and create a traffic lane world. 7.) Test the turning constraint settings passed as parameter. This is only a preview version and will be handled differently in the final version. 8.) Mix with another lane world and connect them with street crossings

The height restriction can be used to filter the obstacles height value (currently hardcoded to Y). The debug settings define what is shown during the creation process. Each option is drawn when the data is available which means there is a delay between the single sets of data depending on data size. The map needs to be provided in case the terrain heights influence the actual test positions and to access the bullet collision world via the core entity. It should be const but can't be made const because the getCoreEntity call is not const.

template<typename Filter , typename Visualizer >
void qsf::ai::voronoi::visualizeCells ( const Filter &  filter,
const DistanceGrid grid,
const Time duration,
const Visualizer &  visualizer 
)

Definition at line 20 of file GridVisualizer-inl.h.

Variable Documentation

const unsigned int qsf::ai::voronoi::NUM_DEBUG_OPTIONS = SHOW_SEGMENT_CONNECTIONS + 1

Definition at line 32 of file VoronoiDebugOptions.h.