EPOK RUNTIME
World2D Navigation
world2d_navigation.hpp · the world2d navigation module
Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.
Module
the world2d navigation module.
Include this module
C++ include
#include "world2d_navigation.hpp"Types
NavGrid2DStruct declared by the world2d-navigation module for the world2d navigation module.StructNavigationAgent2DComponent---- NavigationAgent2D -------------------------------------------------------------------ClassNavigationRegion2DComponent---- NavigationRegion2D ------------------------------------------------------------------ClassNavMesh2DStruct declared by the world2d-navigation module for the world2d navigation module.StructNavScratchGrid search scratch, owned by the service.StructFunctions and methods
~NavigationAgent2DComponentReleases the resources owned by `epok::NavigationAgent2DComponent`.destructor~NavigationRegion2DComponentReleases the resources owned by `epok::NavigationRegion2DComponent`.destructorarea2Area of (b - a) x (c - a), in raw Q12 squared.Functioncell_ofPerforms `cell of` as part of the world2d navigation module.FunctioncentrePerforms `centre` as part of the world2d navigation module.FunctioncentroidPerforms `centroid` as part of the world2d navigation module.Functionclass_idPerforms `class id` as part of the world2d navigation module.Methodclass_idPerforms `class id` as part of the world2d navigation module.Methodclosest_on_segmentPerforms `closest on segment` as part of the world2d navigation module.FunctioncontainsPerforms `contains` as part of the world2d navigation module.FunctioncornerPerforms `corner` as part of the world2d navigation module.FunctioncoversWhether the region is the one to plan from `p`: inside the grid, or on the mesh.Methodfind_pathFinds path as part of the world2d navigation module.Methodfloor_divPerforms `floor div` as part of the world2d navigation module.Functionget_max_speedReturns max speed as part of the world2d navigation module.Methodget_next_xReturns next x as part of the world2d navigation module.Methodget_next_yReturns next y as part of the world2d navigation module.Methodget_path_point_countReturns path point count as part of the world2d navigation module.Methodget_target_actorReturns target actor as part of the world2d navigation module.Methodget_target_xReturns target x as part of the world2d navigation module.Methodget_target_yReturns target y as part of the world2d navigation module.Methodget_velocity_xReturns velocity x as part of the world2d navigation module.Methodget_velocity_yReturns velocity y as part of the world2d navigation module.Methodgrid_line_of_sightWhether the straight line between two cell centres crosses only walkable cells and squeezes past no blocked corner.Functiongrid_pathWaypoints from `from` to `to` on a grid (the start excluded), at most `capacity`.Functionheap_popPerforms `heap pop` as part of the world2d navigation module.Functionheap_pushPerforms `heap push` as part of the world2d navigation module.Functionis_enabledReports whether enabled as part of the world2d navigation module.Methodis_navigation_finishedReports whether navigation finished as part of the world2d navigation module.Methodis_target_reachableReports whether target reachable as part of the world2d navigation module.Methodis_walkableWhether a world point is inside the region and free to walk on.Methodlevel_attachedPerforms `level attached` as part of the world2d navigation module.Methodlevel_attachedPerforms `level attached` as part of the world2d navigation module.MethodlocateThe triangle holding `p` (true), or the closest triangle and point on it (false).Functionmesh_pathWaypoints from `from` to `to` on a navmesh (the start excluded), at most `capacity`.FunctionoctilePerforms `octile` as part of the world2d navigation module.FunctionsamePerforms `same` as part of the world2d navigation module.Functionset_enabledSets enabled as part of the world2d navigation module.Methodset_max_speedSets max speed as part of the world2d navigation module.Methodset_target_actorSets target actor as part of the world2d navigation module.Methodset_target_positionSets target position as part of the world2d navigation module.MethodstopStops following: no target, no path, no velocity.Methodtake_arrivedTrue once when the agent reaches a reachable target.MethodwalkablePerforms `walkable` as part of the world2d navigation module.FunctionFields, variables and values
arrive_distanceExposes `arrive_distance` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldarrivedExposes `arrived` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldblockedone bit per cell, row-majorFieldcellExposes `cell` on `epok::world2d::NavGrid2D` for the world2d navigation module.FieldcellsExposes `cells` on `epok::world2d::NavScratch` for the world2d navigation module.FieldclockExposes `clock` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldcolumnsExposes `columns` on `epok::world2d::NavGrid2D` for the world2d navigation module.FielddiagonalExposes `diagonal` on `epok::world2d::NavGrid2D` for the world2d navigation module.FielddirtyExposes `dirty` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fielddrives_bodyExposes `drives_body` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldenabledExposes `enabled` on `epok::NavigationRegion2DComponent` for the world2d navigation module.FieldfinishedExposes `finished` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldgExposes `g` on `epok::world2d::NavScratch` for the world2d navigation module.FieldgridExposes `grid` on `epok::NavigationRegion2DComponent` for the world2d navigation module.Fieldhas_targetExposes `has_target` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldheapExposes `heap` on `epok::world2d::NavScratch` for the world2d navigation module.Fieldheap_capacityExposes `heap_capacity` on `epok::world2d::NavScratch` for the world2d navigation module.FieldinfoExposes `info` on `epok::world2d::NavScratch` for the world2d navigation module.Fieldis_meshExposes `is_mesh` on `epok::NavigationRegion2DComponent` for the world2d navigation module.Fieldlink2dExposes `link2d` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldlink2dExposes `link2d` on `epok::NavigationRegion2DComponent` for the world2d navigation module.Fieldmax_speedExposes `max_speed` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldmeshExposes `mesh` on `epok::NavigationRegion2DComponent` for the world2d navigation module.Fieldnav_agentsExposes `nav_agents` on the `epok::world2d` namespace for the world2d navigation module.Variablenav_path_limitExposes `nav_path_limit` on the `epok::world2d` namespace for the world2d navigation module.Variablenav_regionsExposes `nav_regions` on the `epok::world2d` namespace for the world2d navigation module.Variablenav_scratchExposes `nav_scratch` on the `epok::world2d` namespace for the world2d navigation module.Variablenav_triangle_limitExposes `nav_triangle_limit` on the `epok::world2d` namespace for the world2d navigation module.Variableneighboursacross (v0 v1), (v1 v2), (v2 v0); -1 noneFieldoriginExposes `origin` on `epok::world2d::NavGrid2D` for the world2d navigation module.FieldpathExposes `path` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldpath_countExposes `path_count` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldpath_indexExposes `path_index` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldplanned_forExposes `planned_for` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldreachableExposes `reachable` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldrepath_intervalExposes `repath_interval` on `epok::NavigationAgent2DComponent` for the world2d navigation module.FieldrowsExposes `rows` on `epok::world2d::NavGrid2D` for the world2d navigation module.Fieldstatic_class_idExposes `static_class_id` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Variablestatic_class_idExposes `static_class_id` on `epok::NavigationRegion2DComponent` for the world2d navigation module.VariablestepsExposes `steps` on the `epok::world2d::nav_detail` namespace for the world2d navigation module.VariabletargetState.Fieldtarget_actorAuthored.Fieldtriangle_countExposes `triangle_count` on `epok::world2d::NavMesh2D` for the world2d navigation module.Fieldtrianglesthree vertex indices each, positive area2FieldvelocityExposes `velocity` on `epok::NavigationAgent2DComponent` for the world2d navigation module.Fieldverticesx, y pairs, world pixelsField