VE Lua Documentation

Press F to search!

drawNodeSphere

Definition


-- @/=[C]:-1
function drawNodeSphere(...)

Callers

@/lua/vehicle/extensions/skeleton.lua
  for _, node in pairs(v.data.nodes) do
    obj.debugDrawProxy:drawNodeSphere(node.cid, 0.03, color(170, 57, 57, 230))
  end
@/lua/vehicle/controller/couplings/kingpin.lua
local function debugDrawMethod(focusPos)
  obj.debugDrawProxy:drawNodeSphere(kingpinNodeCid, 0.15, getContrastColor(stringHash(kingpinKey), 150))
end
@/lua/vehicle/beamstate.lua
    if not coupler.couplerLock and not coupler.couplerWeld and ((coupler.couplerTag and externalCouplerVisibilityTags[coupler.couplerTag]) or (coupler.tag and externalCouplerVisibilityTags[coupler.tag])) then
      obj.debugDrawProxy:drawNodeSphere(coupler.cid, 0.15, getContrastColor(stringHash(coupler.couplerTag or coupler.tag), 150))
    end
@/lua/vehicle/bdebugImpl.lua
        local wheelAirPressure = obj:getGroupPressure(pressureGroupID)
        obj.debugDrawProxy:drawNodeSphere(wd.node1, 0.04, ironbowColor((wheelCoreTemp - baseTemp) * 0.004))
        obj.debugDrawProxy:drawNodeSphere(wd.node2, 0.04, ironbowColor((wheelCoreTemp - baseTemp) * 0.004))
        obj.debugDrawProxy:drawNodeSphere(wd.node1, 0.04, ironbowColor((wheelCoreTemp - baseTemp) * 0.004))
        obj.debugDrawProxy:drawNodeSphere(wd.node2, 0.04, ironbowColor((wheelCoreTemp - baseTemp) * 0.004))
        obj.debugDrawProxy:drawNodeText(wd.node1, ironbowColor((wheelCoreTemp - baseTemp) * 0.004), string.format("%s%.1f %s%.1f %s%.1f", "tT:", wheelAvgTemp - 273.15, "tC:", wheelCoreTemp - 273.15, "psi:", wheelAirPressure*0.000145038-14.5), 0)
        for _, nid in pairs(wd.treadNodes or {}) do
          obj.debugDrawProxy:drawNodeSphere(nid, 0.02, ironbowColor((obj:getNodeTemperature(nid) - baseTemp) * 0.004))
        end
        for _, nid in pairs(wd.nodes or {}) do
          obj.debugDrawProxy:drawNodeSphere(nid, 0.02, ironbowColor((obj:getNodeTemperature(nid) - baseTemp) * 0.004))
        end

      obj.debugDrawProxy:drawNodeSphere(nodeCID, 0.02, nodeColor)
    end
        local radius = (node.highlight.radius or 0.025) * M.state.vehicle.nodeVisWidthScale
        obj.debugDrawProxy:drawNodeSphere(node.cid, radius, col)
      end
        end
        obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, c)
          local newNodeScale = r * nodeScale * 50
          obj.debugDrawProxy:drawNodeSphere(node.cid, newNodeScale, c)
          avgNodeScale = avgNodeScale + newNodeScale
          local r = min(1, displacement) * 255
          obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, color(r, 0, 0, a))

          obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
          obj.debugDrawProxy:drawNodeVector(node.cid, (vel * 0.3), col)
          local col = color(c, 0, 0, (c + 100) * alpha)
          obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
          obj.debugDrawProxy:drawNodeVector3d(nodeScale, node.cid, (frc * invAvgNodeForce), col)
        end
        obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
        local col = jetColor(clusterIndexToColorIndex[clusterId] / numberOfClusters)
        obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
      end
      local col = jetColor(refClusterId == clusterId and 0.5 or 0)
      obj.debugDrawProxy:drawNodeSphere(node.cid, nodeScale, col)
    end

    obj.debugDrawProxy:drawNodeSphere(id1, nodeScale, color(255, 0, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id2, nodeScale, color(255, 125, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id1, nodeScale, color(255, 0, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id2, nodeScale, color(255, 125, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id3, nodeScale, color(255, 255, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id2, nodeScale, color(255, 125, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id3, nodeScale, color(255, 255, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id4, nodeScale, color(0, 255, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id3, nodeScale, color(255, 255, 0, alpha))
    obj.debugDrawProxy:drawNodeSphere(id4, nodeScale, color(0, 255, 0, alpha))

    obj.debugDrawProxy:drawNodeSphere(prevNodeCID, nodeScale * sizeMult, col)
    obj.debugDrawProxy:drawNodeSphere(nodeCID, nodeScale * sizeMult, col)
    obj.debugDrawProxy:drawNodeSphere(prevNodeCID, nodeScale * sizeMult, col)
    obj.debugDrawProxy:drawNodeSphere(nodeCID, nodeScale * sizeMult, col)
    obj.debugDrawProxy:drawCylinder(prevNodePos, nodePos, beamScale * sizeMult, col)
  for _, slidenode in ipairs(slidenodes) do
    obj.debugDrawProxy:drawNodeSphere(slidenode.id, slideNodeScale, defaultCol)
  end
@/lua/vehicle/controller/couplings/fifthwheel.lua
local function debugDrawMethod(focusPos)
  obj.debugDrawProxy:drawNodeSphere(fifthwheelNodeCid, 0.15, getContrastColor(stringHash(fifthwheelKey), 150))
end