VE Lua Documentation

Press F to search!

newGraphpath

Definition


-- @/lua/common/graphpath.lua:124

local function newGraphpath()
  return setmetatable({graph = {}, positions = {}, radius = {}}, Graphpath)
end

Callers

@/lua/ge/extensions/editor/slotTrafficEditor.lua
      qtNodes = quadtree.newQuadtree()
      gp = graphpath.newGraphpath()
      if mapNodes then
@/lua/vehicle/mapmgr.lua

  mapData = graphpath.newGraphpath()
  mapData:import(_map.graphData)
@/lua/ge/map.lua
  maxRadius = 4 -- case there are no nodes in the map i.e. next(map.nodes) == nil avoids infinite loop in findClosestRoad()
  gp = graphpath.newGraphpath()
  edgeKdTree = kdTreeBox2D.new(edgeCount)
@/lua/vehicle/ai.lua
      noOfLaps = max(arg.noOfLaps or 1, 1)
      local pathMap = require('graphpath').newGraphpath() -- create a dummy graph
@/lua/common/graphpath.lua
--[[
gp = newGraphpath()
gp:edge("a", "b", 7)