drawCylinder
Definition
-- @/=[C]:-1
function drawCylinder(...)
Callers
@/lua/ge/extensions/gameplay/markerInteraction.lua
columnColor.alpha = alpha
debugDrawer:drawCylinder(targetPos, targetPos2, radius, columnColor)
end
@/lua/ge/extensions/gameplay/rally/geometry.lua
debugDrawer:drawSphere(node.pos, 0.7, color)
debugDrawer:drawCylinder(node.pos, node.nextPos, 0.15, color)
end
tagPos.z = tagPos.z + 2
debugDrawer:drawCylinder(node.pos, tagPos, 0.05, color)
debugDrawer:drawSphere(node.pos, 0.7, color)
tagPos.z = tagPos.z + 2
debugDrawer:drawCylinder(node.pos, tagPos, 0.05, color)
debugDrawer:drawSphere(node.pos, pacenoteThickness*2, black)
end
debugDrawer:drawCylinder(node.pos, node.nextPos, pacenoteThickness, color)
end
@/lua/ge/extensions/editor/raceEditor/pathnodes.lua
debugDrawer:drawTextAdvanced((pos), String(">>>"..name.."<<<"), ColorF(1,1,1,1),true, false, ColorI(0,0,0,255))
debugDrawer:drawCylinder((pos + vec3(0,0,-10000)), (pos + vec3(0,0,10000)), 1, ColorF(1,1,1,0.8))
end
@/lua/ge/extensions/gameplay/statisticModules/watchRollover.lua
if myvid == -1 then return end
debugDrawer:drawCylinder(vpos, vpos+vup, 0.05, ColorF(0,0,1,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir, 0.05, ColorF(1,0,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vup, 0.05, ColorF(0,0,1,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir, 0.05, ColorF(1,0,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir, 0.05, ColorF(1,0,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vright*vright:dot(velocity), 0.05, ColorF(1,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vright*vright:dot(velocity), 0.05, ColorF(1,1,0,1), false)
-- debugDrawer:drawCylinder(vpos, vpos+vright*vright:dot(velocity)+vup*vup:dot(velocity), 0.05, ColorF(1,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vright*vright:dot(velocity), 0.05, ColorF(1,1,0,1), false)
-- debugDrawer:drawCylinder(vpos, vpos+vright*vright:dot(velocity)+vup*vup:dot(velocity), 0.05, ColorF(1,1,0,1), false)
end
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/vePartTree.lua
debugDrawer:drawCylinder(chosenBeamPos1, chosenBeamPos2, beamHoveredRenderRadius, ddBeamColSel)
if chosenBeamKeyInPickedBeams == -1 then
@/lua/ge/extensions/core/hotlapping.lua
vecB.z = vecB.z + 1000
debugDrawer:drawCylinder(vecA, vecB, 0.3, i == 1 and colorOrange or colorWhite)
@/lua/ge/extensions/core/trafficSignals.lua
if cylinderScl > 0 then
debugDrawer:drawCylinder(self.pos, debugPos, 0.06, isSelected and debugColors.selected or debugColors.main)
end
@/lua/ge/extensions/tech/sensors.lua
-- Draw a red cylinder to represent the outgoing pulse.
debugDrawer:drawCylinder(firstPoint, secondPoint, radius, ColorF(1, 0, 0, alpha))
else
-- Draw a blue cylinder to represent the returning pulse. The radius grows linearly for this pulse (unlike the outgoing pulse).
debugDrawer:drawCylinder(firstPoint, secondPoint, radius, ColorF(0, 0, 1, alpha))
end
@/lua/ge/extensions/gameplay/rally/notebook/pacenoteWaypoint.lua
debugDrawer:drawCylinder(
self.pos + (self.normal:cross(vec3(0,0,1)) * self.radius) + vec3(0,0,-1),
debugDrawer:drawCylinder(
self.pos + (-self.normal:cross(vec3(0,0,1)) * self.radius) + vec3(0,0,-1), -- adjust down through the ground in case the ground is uneven
debugDrawer:drawCylinder(
self.pos + (self.normal:cross(vec3(0,0,1)) * (self.radius+radius_cyl)) + (side + vec3(0, 0, height/2)),
@/lua/ge/extensions/gameplay/parking.lua
local dColor = v and ColorF(0.3, 1, 0.3, 0.5) or ColorF(1, 0.3, 0.3, 0.5)
debugDrawer:drawCylinder(bestPs.vertices[i], bestPs.vertices[i] + vec3(0, 0, 10), 0.05, dColor)
end
local vecUpHigh = vec3(0, 0, 1000)
debugDrawer:drawCylinder(aheadPos, aheadPos + vecUpHigh, 0.25, ColorF(1, 1, 0, 0.5))
debugDrawer:drawCylinder(lastPos, lastPos + vecUpHigh, 0.25, ColorF(0, 1, 0, 0.5))
debugDrawer:drawCylinder(aheadPos, aheadPos + vecUpHigh, 0.25, ColorF(1, 1, 0, 0.5))
debugDrawer:drawCylinder(lastPos, lastPos + vecUpHigh, 0.25, ColorF(0, 1, 0, 0.5))
if core_terrain.getTerrain() then
lastPos.z = core_terrain.getTerrainHeight(lastPos)
debugDrawer:drawCylinder(lastPos, lastPos + vec3(0, 0, 1), checkRadius, ColorF(0, 1, 0, 0.1))
lastPos.z = 0
debugPos.z = core_terrain.getTerrainHeight(debugPos)
debugDrawer:drawCylinder(debugPos, debugPos + vec3(0, 0, 1), areaRadius, ColorF(0, 1, 1, 0.1))
debugPos.z = 0
@/lua/ge/extensions/editor/objectTool.lua
debugDrawer:drawSphere(pos, 0.3 * scl, ColorF(1, 0, 1, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(0, -2 * scl, 0)), 0.1 * scl, ColorF(1, 0, 0, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(0, 0, 2 * scl)), 0.1 * scl, ColorF(0, 0, 1, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(0, -2 * scl, 0)), 0.1 * scl, ColorF(1, 0, 0, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(0, 0, 2 * scl)), 0.1 * scl, ColorF(0, 0, 1, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(2 * scl, 0, 0)), 0.1 * scl, ColorF(0, 1, 0, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(0, 0, 2 * scl)), 0.1 * scl, ColorF(0, 0, 1, 1 * alpha))
debugDrawer:drawCylinder(pos, pos + (rot * vec3(2 * scl, 0, 0)), 0.1 * scl, ColorF(0, 1, 0, 1 * alpha))
return
@/lua/ge/extensions/editor/driftDataEditor.lua
debugDrawer:drawTextAdvanced(elem.pos, String(string.format("%d - %s", i, elem.type)), whiteColorF, true, false, blackColorI)
debugDrawer:drawCylinder(elem.pos, elem.pos + vec3(0,0,3), 0.2, ColorF(1,0,0,0.2))
end
debugDrawer:drawTextAdvanced(lineData.startDir + lineData.pos, "Start dir", whiteColorF, true, false, blackColorI)
debugDrawer:drawCylinder(lineData.startDir + lineData.pos, lineData.startDir + lineData.pos + vec3(0,0,2), 0.2, ColorF(0,0,1,0.2))
local startDirTr = transformsUtils[lineName.."startDir"]
@/gameplay/missionTypes/collection/customNodes/collectionMarkersNode.lua
local c = clamp(inverseLerp(1, 100, dist),0,1)
debugDrawer:drawCylinder(pos + vec3(0,0,-100), pos + vec3(0,0,1000), lerp(0.1, 2, r), ColorF(0.5+0.5*clr[1],0.5+0.5*clr[2],0.5+0.5*clr[3],lerp(0.00, 0.3, c)))
end
@/lua/ge/extensions/editor/tech/sensorConfiguration/utilities.lua
local p1, p2 = pos + fwd * y, pos + fwd * (rangeMinCutoff + (i + 1) * divs)
debugDrawer:drawCylinder(p1, p2, r, beamColour)
end
@/lua/ge/map.lua
for i = 1, #trajectory-1 do
debugDrawer:drawCylinder(trajectory[i].pos, trajectory[i+1].pos, 0.02, red)
end
@/lua/ge/extensions/editor/rallyEditor/measurementsTab.lua
-- Draw cylinder connecting point to label
debugDrawer:drawCylinder(
pos,
@/lua/ge/extensions/flowgraph/nodes/gameplay/rally/vehicleStoppedNearPos.lua
function C:drawDebugVehiclePoint(inside)
-- debugDrawer:drawCylinder(vehPos, vehPos + vec3(0,0,2), 0.1, ColorF(0,1,0,0.5), true, false)
if gameplay_rallyLoop and gameplay_rallyLoop.getDrawFlag('stopZones') then
@/lua/vehicle/bdebugImpl.lua
obj:queueGameEngineLua(string.format('debugDrawer:drawLine(%s,%s,ColorF(1,0,0,1),false)', -dir * lineLen * 0.5 + midPos, dir * lineLen * 0.5 + midPos))
obj.debugDrawProxy:drawCylinder(-dir * lineLen * 0.5 + midPos, dir * lineLen * 0.5 + midPos, 0.01, color(255, 0, 0, 255))
end
-- TODO: temporary solution to draw from GE Lua side
--obj:queueGameEngineLua(string.format('debugDrawer:drawCylinder(%s,%s,%f,ColorF(%f,%f,%f,%f),false)', -dir * len * 0.5 + midPos, dir * len * 0.5 + midPos, radius * 0.5, r/255,g/255,b/255,a/255))
obj.debugDrawProxy:drawCylinder(-dir * len * 0.5 + midPos, dir * len * 0.5 + midPos, radius, col)
--obj:queueGameEngineLua(string.format('debugDrawer:drawCylinder(%s,%s,%f,ColorF(%f,%f,%f,%f),false)', -dir * len * 0.5 + midPos, dir * len * 0.5 + midPos, radius * 0.5, r/255,g/255,b/255,a/255))
obj.debugDrawProxy:drawCylinder(-dir * len * 0.5 + midPos, dir * len * 0.5 + midPos, radius, col)
else
obj.debugDrawProxy:drawBeam3d(beam.cid, radius, col)
-- obj:queueGameEngineLua(string.format('debugDrawer:drawCylinder(%s,%s,%f,ColorF(%f,%f,%f,%f),false)', node1Pos, node2Pos, radius, r/255,g/255,b/255,a/255))
-- obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, radius, col)
-- obj:queueGameEngineLua(string.format('debugDrawer:drawCylinder(%s,%s,%f,ColorF(%f,%f,%f,%f),false)', node1Pos, node2Pos, radius, r/255,g/255,b/255,a/255))
-- obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, radius, col)
end
groupData[2]:setAdd(tempVec)
obj.debugDrawProxy:drawCylinder(pos1, pos2, beamScale, groupData[3])
beamsDrawn[bdi] = beam.cid
groupData[2]:setAdd(tempVec)
obj.debugDrawProxy:drawCylinder(pos1, pos2, beamScale, groupData[3])
beamsDrawn[bdi] = beam.cid
obj.debugDrawProxy:drawCylinder(restPos1, shortBoundTransStartPos1, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos1, shortBoundTransEndPos1, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, shortBoundTransStartPos1, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos1, shortBoundTransEndPos1, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransEndPos1, node1Pos, newBeamScale, color(0,255,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos1, shortBoundTransEndPos1, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransEndPos1, node1Pos, newBeamScale, color(0,255,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node2Pos, shortBoundTransEndPos2, newBeamScale, color(0,255,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransEndPos2, shortBoundTransStartPos2, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(node2Pos, shortBoundTransEndPos2, newBeamScale, color(0,255,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransEndPos2, shortBoundTransStartPos2, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos2, restPos2, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransEndPos2, shortBoundTransStartPos2, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos2, restPos2, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, shortBoundTransStartPos1, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos1, node1Pos, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, shortBoundTransStartPos1, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos1, node1Pos, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node2Pos, shortBoundTransStartPos2, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos2, restPos2, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(node2Pos, shortBoundTransStartPos2, newBeamScale, color(0,128,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(shortBoundTransStartPos2, restPos2, newBeamScale, color(0,0,255,255 * alpha))
elseif currLen < restLen then
obj.debugDrawProxy:drawCylinder(restPos1, node1Pos, newBeamScale, color(0,0,255,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node2Pos, restPos2, newBeamScale, color(0,0,255,255 * alpha))
elseif currLen < longBoundTransStart then
obj.debugDrawProxy:drawCylinder(node1Pos, restPos1, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, restPos2, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos2, node2Pos, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, longBoundTransStartPos1, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos1, restPos1, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, longBoundTransStartPos1, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos1, restPos1, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, restPos2, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos2, longBoundTransStartPos2, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos2, node2Pos, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos2, longBoundTransStartPos2, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos2, node2Pos, newBeamScale, color(255,128,0,255 * alpha))
else
obj.debugDrawProxy:drawCylinder(node1Pos, longBoundTransEndPos1, newBeamScale, color(255,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransEndPos1, longBoundTransStartPos1, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(node1Pos, longBoundTransEndPos1, newBeamScale, color(255,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransEndPos1, longBoundTransStartPos1, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos1, restPos1, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransEndPos1, longBoundTransStartPos1, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos1, restPos1, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos1, restPos2, newBeamScale, color(0,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos2, longBoundTransStartPos2, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos2, longBoundTransEndPos2, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(restPos2, longBoundTransStartPos2, newBeamScale, color(255,0,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos2, longBoundTransEndPos2, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransEndPos2, node2Pos, newBeamScale, color(255,255,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransStartPos2, longBoundTransEndPos2, newBeamScale, color(255,128,0,255 * alpha))
obj.debugDrawProxy:drawCylinder(longBoundTransEndPos2, node2Pos, newBeamScale, color(255,255,0,255 * alpha))
end
--cylinder representing long bound
obj.debugDrawProxy:drawCylinder(-node1to2Dir * longBoundHalfLen + middlePos + dirPerp * 0.005, node1to2Dir * longBoundHalfLen + middlePos + dirPerp * 0.005, beamScale * 1, color(255, 255, 0, alpha * 255 * 0.5))
-- beam representing rest length
obj.debugDrawProxy:drawCylinder(-node1to2Dir * restLenHalf + middlePos, node1to2Dir * restLenHalf + middlePos, beamScale, restLenCol)
-- beam representing full length
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, beamScale * 0.5, color(0, 255, 0, alpha * 255))
-- obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node2Pos, node3Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node2Pos, node3Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node3Pos, node4Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node2Pos, node3Pos, beamScale, col)
-- obj.debugDrawProxy:drawCylinder(node3Pos, node4Pos, beamScale, col)
-- triangle 1
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, beamScale, color1)
obj.debugDrawProxy:drawCylinder(node1Pos, node3Pos, beamScale, color1)
obj.debugDrawProxy:drawCylinder(node1Pos, node2Pos, beamScale, color1)
obj.debugDrawProxy:drawCylinder(node1Pos, node3Pos, beamScale, color1)
-- triangle 2
obj.debugDrawProxy:drawCylinder(node4Pos, node2Pos, beamScale, color2)
obj.debugDrawProxy:drawCylinder(node4Pos, node3Pos, beamScale, color2)
obj.debugDrawProxy:drawCylinder(node4Pos, node2Pos, beamScale, color2)
obj.debugDrawProxy:drawCylinder(node4Pos, node3Pos, beamScale, color2)
-- axis
obj.debugDrawProxy:drawCylinder(node2Pos, node3Pos, beamScale * 4, color(255, 128, 0, alpha))
end
obj.debugDrawProxy:drawNodeSphere(nodeCID, nodeScale * sizeMult, col)
obj.debugDrawProxy:drawCylinder(prevNodePos, nodePos, beamScale * sizeMult, col)
prevNodePos = nodePos
@/lua/ge/extensions/editor/slotTrafficEditor.lua
if shouldLineBeDrawn(cp1, cp2) then
debugDrawer:drawCylinder(n1.pos + linkLineOffset, n2.pos + linkLineOffset, 0.3, linkLineColor)
end
@/lua/ge/extensions/gameplay/statisticModules/watchJturn.lua
if myvid == -1 then return end
debugDrawer:drawCylinder(vpos, vpos+vdir, 0.05, ColorF(1,0,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir, 0.05, ColorF(1,0,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir*vdir:dot(velocity), 0.05, ColorF(1,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+velocity, 0.05, ColorF(0,1,0,1), false)
debugDrawer:drawCylinder(vpos, vpos+vdir*vdir:dot(velocity), 0.05, ColorF(1,1,0,1), false)
end
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veStaticRenderView.lua
--arrowCol.a = (dotProd - 0.75) * 1 / -0.25 + 1
debugDrawer:drawCylinder(zeroVec, arrowVec, 0.01, arrowCol)
@/lua/ge/extensions/tech/techCore.lua
for _, cylinder in pairs(debugObjects.cylinders) do
debugDrawer:drawCylinder(cylinder.circleAPos, cylinder.circleBPos, cylinder.radius, cylinder.color)
end
@/lua/ge/extensions/editor/aiViz.lua
if shouldLineBeDrawn(nid, lid) then
debugDrawer:drawCylinder(n.pos + linkLineOffset, lidPos + linkLineOffset, 0.3, linkLineColor)
end
@/lua/ge/extensions/core/vehicleMirrors.lua
debugDrawer:drawSphere(mirrorCamPos, 0.01, ColorF(1,0,0,1))
debugDrawer:drawCylinder(mirrorCamPos, (mirrorCamPos + lookDir * 0.2), 0.005, ColorF(1,0,0,1))
debugDrawer:drawCylinder(mirrorCamPos, (mirrorCamPos + reflectionDir * 0.4), 0.01, ColorF(0,1,0,1))
debugDrawer:drawCylinder(mirrorCamPos, (mirrorCamPos + lookDir * 0.2), 0.005, ColorF(1,0,0,1))
debugDrawer:drawCylinder(mirrorCamPos, (mirrorCamPos + reflectionDir * 0.4), 0.01, ColorF(0,1,0,1))
end
@/lua/ge/extensions/gameplay/sites/location.lua
debugDrawer:drawSphere((info.b.pos), info.b.radius, ColorF(1,0.7,0.7,shapeAlpha/2))
debugDrawer:drawCylinder((info.a.pos), (info.b.pos), info.radius, ColorF(1,1,1,shapeAlpha/2))
debugDrawer:drawCylinder((info.pos), (self.pos), info.radius/3, ColorF(1,1,1,shapeAlpha/2))
debugDrawer:drawCylinder((info.a.pos), (info.b.pos), info.radius, ColorF(1,1,1,shapeAlpha/2))
debugDrawer:drawCylinder((info.pos), (self.pos), info.radius/3, ColorF(1,1,1,shapeAlpha/2))
debugDrawer:drawTextAdvanced((info.pos),
@/lua/ge/extensions/gameplay/rally/snaproad/geoPacenotes.lua
-- debugDrawer:drawCylinder(
-- adjustHeight(pos1, 0.1),
@/lua/ge/extensions/gameplay/missions/startTrigger.lua
local colorf = ColorF(0.3*color[1], 0.3*color[2], 0.3*color[3], 0.2)
debugDrawer:drawCylinder(posDown, posUp, location.radius, colorf)
local colorf = ColorF(0.6*color[1], 0.6*color[2], 0.6*color[3], 0.4)
debugDrawer:drawCylinder(posDown, posUp, 0.4, colorf)
local colorf = ColorF(1.0*color[1], 1.0*color[2], 1.0*color[3], 1.0)
debugDrawer:drawCylinder(posDown, posUp, 0.2, colorf)
end
@/lua/ge/extensions/gameplay/rally/tools/rallyToolbox.lua
bottomPos.z = bottomPos.z - 1
debugDrawer:drawCylinder(bottomPos, tagPos, 0.3, ColorF(0,0,200/255.0,0.7))
debugDrawer:drawTextAdvanced(tagPos,
-- for i, point in ipairs(reccePoints) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,2), 0.3, ColorF(clr[1],clr[2],clr[3],0.8))
-- debugDrawer:drawTextAdvanced(point.pos + vec3(0,0,2),
-- for i, point in ipairs(finalPreRouteInput) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,2), 0.1, ColorF(0.5,0,0.5,0.8))
-- debugDrawer:drawTextAdvanced(point.pos + vec3(0,0,2),
-- for i, point in ipairs(debugPreMergePath) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,1.5), 0.2, ColorF(1,0.5,0.5,0.8))
-- end
-- for i, point in ipairs(debugPostMergePath) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,2), 0.1, ColorF(0,0.5,0.5,0.8))
-- end
-- for i, point in ipairs(debugMergePathSample) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,2), 0.1, ColorF(0,1,0.5,0.8))
-- end
-- for i, point in ipairs(debugPostFixStartEnd1) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,2.5), 0.05, ColorF(1,1,0.5,0.8))
-- end
-- for i, point in ipairs(debugPostFixStartEnd2) do
-- debugDrawer:drawCylinder(point.pos, point.pos + vec3(0,0,3.0), 0.025, ColorF(0.75,1,0.5,0.8))
-- end
-- if debugFixStartEnd_a and debugFixStartEnd_b and debugFixStartEnd_p then
-- debugDrawer:drawCylinder(debugFixStartEnd_a.pos, debugFixStartEnd_a.pos + vec3(0,0,5.0), 0.01, ColorF(0,1,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_b.pos, debugFixStartEnd_b.pos + vec3(0,0,5.0), 0.01, ColorF(1,0,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_a.pos, debugFixStartEnd_a.pos + vec3(0,0,5.0), 0.01, ColorF(0,1,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_b.pos, debugFixStartEnd_b.pos + vec3(0,0,5.0), 0.01, ColorF(1,0,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_p.pos, debugFixStartEnd_p.pos + vec3(0,0,5.0), 0.01, ColorF(1,1,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_b.pos, debugFixStartEnd_b.pos + vec3(0,0,5.0), 0.01, ColorF(1,0,0,0.8))
-- debugDrawer:drawCylinder(debugFixStartEnd_p.pos, debugFixStartEnd_p.pos + vec3(0,0,5.0), 0.01, ColorF(1,1,0,0.8))
-- debugDrawer:drawTextAdvanced(debugFixStartEnd_p.pos,
@/lua/ge/extensions/gameplay/sites/zone.lua
for i, v in ipairs(self.vertices) do
debugDrawer:drawCylinder((v.pos), (v.pos+vec3(0,0,5)), 0.5, ColorF(clr[1],clr[2],clr[3],shapeAlpha))
end
@/lua/ge/extensions/gameplay/rally/driveline/drivelineV3.lua
local p2 = self.rawDrivelinePoints[i + 1].pos
debugDrawer:drawCylinder(p1, p2, radius, clr)
end
local pinTop = vec3(pos.x, pos.y, pos.z + pinHeight)
debugDrawer:drawCylinder(pos, pinTop, radius * 0.7, clr)
end
local p2 = self.spline.divPoints[i + 1]
debugDrawer:drawCylinder(p1, p2, radius, clr)
end
local p2 = self.finalDrivelinePoints[i + 1].pos
debugDrawer:drawCylinder(p1, p2, radius, clr)
end
local pinTop = vec3(pos.x, pos.y, pos.z + pinHeight)
debugDrawer:drawCylinder(pos, pinTop, radius * 0.7, clr)
end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veJBeamPicker.lua
debugDrawer:drawCylinder(chosenBeamPos1, chosenBeamPos2, beamSelectedRadius, beamHoveredColor)
--debugDrawer:drawLineInstance(chosenBeamPos1, chosenBeamPos2, beamHoveredRenderSize, beamHoveredColor)
debugDrawer:drawCylinder(beam1Pos, beam2Pos, beamSelectedRadius, pickedColor, false)
--debugDrawer:drawLineInstance(tempBeamPos1, tempBeamPos2, beamHoveredRenderSize, pickedColor)
@/lua/ge/extensions/core/cameraModes/external.lua
debugDrawer:drawSphere(carPos, 0.3, ColorF(1,0,0,1.0))
debugDrawer:drawCylinder(carPos, carPosEnd, 0.1, ColorF(1,0,0,0.1)) -- predicted car path
debugDrawer:drawSphere(carPosEnd, 0.3, ColorF(1,0,0,0.3))
-- camera debug
debugDrawer:drawCylinder(camPos, camPos, 0.05, ColorF(1,1,1,0.8)) -- cam position
debugDrawer:drawSphere(camPos, 0.1, ColorF(0,0,1,0.2))
debugDrawer:drawSphere(camPos, 0.1, ColorF(0,0,1,0.2))
debugDrawer:drawCylinder(camPos, camPosEnd, 0.02, ColorF(0,0,1,0.3))
debugDrawer:drawSphere(camPosEnd, 0.1, ColorF(0,0,1,0.2))
@/lua/ge/extensions/editor/tech/roadArchitect/render.lua
local pos = rData[i][lIdx][7]
debugDrawer:drawCylinder(pos, pos + cylRaised, radius, terraVisColourSingle)
end
if util.isInBox(pos, box) then
debugDrawer:drawCylinder(pos, pos + cylRaised, radius, terraVisColour)
end
@/lua/ge/extensions/gameplay/rally/snaproad.lua
debugDrawer:drawCylinder(
pos,
@/lua/ge/extensions/flowgraph/nodes/debug/debugCylinder.lua
posB:setFromTable(self.pinIn.posB.value)
debugDrawer:drawCylinder(posA, posB, self.pinIn.radius.value or 1, color)
end
@/lua/vehicle/extensions/tech/wheelForces.lua
local p2RefZ = p1 + upVector
obj.debugDrawProxy:drawCylinder(p1, p2RefX, 0.01, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefY, 0.01, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefX, 0.01, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefY, 0.01, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefZ, 0.01, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefY, 0.01, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2RefZ, 0.01, color(0, 255, 0, 255))
end
local p2z = p1 + vectorSum:dot(upVector) * upVector
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beam].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(255, 255, 0, 128))
end
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beam].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(255, 255, 0, 128))
end
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beamData.beamId].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(128, 255, 128, 128))
end
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beamData.beamId].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(128, 255, 128, 128))
end
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(0, 0, 255, 255))
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beamId].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(128, 255, 128, 128))
end
p2 = vehiclePos + obj:getNodePosition(v.data.beams[beamId].id2)
obj.debugDrawProxy:drawCylinder(p1, p2, 0.01, color(255, 255, 0, 128))
end
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2x, 0.05, color(0, 0, 255, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(255, 0, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2y, 0.05, color(0, 255, 0, 255))
obj.debugDrawProxy:drawCylinder(p1, p2z, 0.05, color(255, 0, 0, 255))
@/lua/ge/extensions/editor/trafficManager.lua
if sessionData.aiData.targetPos then
debugDrawer:drawCylinder(sessionData.aiData.targetPos, sessionData.aiData.targetPos + vec3(0, 0, 25), 0.2, debugColors.main)
end
@/lua/vehicle/ai.lua
-- rear face
debugDrawer:drawCylinder(p1, p2, 0.02, col)
debugDrawer:drawCylinder(p2, p3, 0.02, col)
debugDrawer:drawCylinder(p1, p2, 0.02, col)
debugDrawer:drawCylinder(p2, p3, 0.02, col)
debugDrawer:drawCylinder(p3, p4, 0.02, col)
debugDrawer:drawCylinder(p2, p3, 0.02, col)
debugDrawer:drawCylinder(p3, p4, 0.02, col)
debugDrawer:drawCylinder(p4, p1, 0.02, col)
debugDrawer:drawCylinder(p3, p4, 0.02, col)
debugDrawer:drawCylinder(p4, p1, 0.02, col)
-- front face
debugDrawer:drawCylinder(p5, p6, 0.02, col)
debugDrawer:drawCylinder(p6, p7, 0.02, col)
debugDrawer:drawCylinder(p5, p6, 0.02, col)
debugDrawer:drawCylinder(p6, p7, 0.02, col)
debugDrawer:drawCylinder(p7, p8, 0.02, col)
debugDrawer:drawCylinder(p6, p7, 0.02, col)
debugDrawer:drawCylinder(p7, p8, 0.02, col)
debugDrawer:drawCylinder(p8, p5, 0.02, col)
debugDrawer:drawCylinder(p7, p8, 0.02, col)
debugDrawer:drawCylinder(p8, p5, 0.02, col)
-- left face
debugDrawer:drawCylinder(p1, p5, 0.02, col)
debugDrawer:drawCylinder(p4, p8, 0.02, col)
debugDrawer:drawCylinder(p1, p5, 0.02, col)
debugDrawer:drawCylinder(p4, p8, 0.02, col)
-- right face
debugDrawer:drawCylinder(p2, p6, 0.02, col)
debugDrawer:drawCylinder(p3, p7, 0.02, col)
debugDrawer:drawCylinder(p2, p6, 0.02, col)
debugDrawer:drawCylinder(p3, p7, 0.02, col)
end
for i = 1, thisPathCount-1 do
debugDrawer:drawCylinder(mapData.positions[thisPath[i]], mapData.positions[thisPath[i+1]], 0.5, jetColor(thisScore, 200))
end
if thisPathLastNode == winner then
debugDrawer:drawCylinder(mapData.positions[thisPathLastNode], mapData.positions[thisPathLastNode] + vec3(0, 0, 8), 2, color(0, 0, 0, 255))
end
local prevSpeed = altPlan[j-1].speed or 0
debugDrawer:drawCylinder(altPlan[j-1].pos + vec3(0,0,0.5), point.pos + vec3(0,0,0.5), 0.05, color(255, 255, 255, 100))
debugDrawer:drawCylinder(altPlan[j-1].pos + vec3(0,0,prevSpeed*0.2), point.pos + vec3(0,0,speed*0.2), 0.05, color(255*clamp(k-2, 0, 1), 255*clamp(k-1,0,1), 255, 100))
debugDrawer:drawCylinder(altPlan[j-1].pos + vec3(0,0,0.5), point.pos + vec3(0,0,0.5), 0.05, color(255, 255, 255, 100))
debugDrawer:drawCylinder(altPlan[j-1].pos + vec3(0,0,prevSpeed*0.2), point.pos + vec3(0,0,speed*0.2), 0.05, color(255*clamp(k-2, 0, 1), 255*clamp(k-1,0,1), 255, 100))
end
tmpVec2:set(0, 0, v[2] * 0.2)
debugDrawer:drawCylinder(prevEntry[1] + tmpVec1, v[1] + tmpVec2, 0.02, yellow)
tmpVec2:set(0, 0, v[3] * 0.2)
debugDrawer:drawCylinder(prevEntry[1] + tmpVec1, v[1] + tmpVec2, 0.02, blue)
end
tmpVec1:set(0, 0, v[3] * 0.2)
debugDrawer:drawCylinder(v[1], v[1] + tmpVec1, 0.01, blue)
local p1 = n.pos + tmpVec
debugDrawer:drawCylinder(n.pos, p1, 0.03, red)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, red)
debugDrawer:drawCylinder(n.pos, p1, 0.03, red)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, red)
debugDrawer:drawText(p1, black, strFormat("%2.0f", speed*3.6).." kph")
local p1_ = n.pos + tmpVec
debugDrawer:drawCylinder(n.pos, p1_, 0.03, green)
debugDrawer:drawCylinder(prevPoint_, p1_, 0.05, green)
debugDrawer:drawCylinder(n.pos, p1_, 0.03, green)
debugDrawer:drawCylinder(prevPoint_, p1_, 0.05, green)
debugDrawer:drawText(p1_, black, strFormat("%2.0f", legalSpeed*3.6).." kph")
local p1Orig = n.posOrig - n.biNormal
debugDrawer:drawCylinder(n.posOrig, p1Orig, 0.03, black)
debugDrawer:drawCylinder(p1Orig, p1Orig + n.normal, 0.03, black)
debugDrawer:drawCylinder(n.posOrig, p1Orig, 0.03, black)
debugDrawer:drawCylinder(p1Orig, p1Orig + n.normal, 0.03, black)
debugDrawer:drawCylinder(prevPointOrig, p1Orig, 0.03, black)
debugDrawer:drawCylinder(p1Orig, p1Orig + n.normal, 0.03, black)
debugDrawer:drawCylinder(prevPointOrig, p1Orig, 0.03, black)
local roadHalfWidth = n.halfWidth
local roadHalfWidth = n.halfWidth
--debugDrawer:drawCylinder(n.posOrig, p1Orig, roadHalfWidth, color(255, 0, 0, 40))
if n.laneLimLeft and n.laneLimRight then -- You need to uncomment the appropriate code in planAhead force integrator loop for this to work
local p1 = pos + vec3(0, 0, 2)
debugDrawer:drawCylinder(pos, p1, 0.03, green)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, green)
debugDrawer:drawCylinder(pos, p1, 0.03, green)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, green)
prevPoint = p1
if minNode and minNode ~= currentRoute.path[i+2] then
debugDrawer:drawCylinder(mapData.positions[wp2], mapData.positions[minNode], 0.2, black)
end
-- local scaledV = abs(1000 * v)
-- debugDrawer:drawCylinder(p, p + vec3(0, 0, scaledV), 0.06, color(abs(min(sign(v),0))*255,max(sign(v),0)*255,0,200))
-- debugDrawer:drawText(p + vec3(0, 0, scaledV), color(0,0,0,255), strFormat("%5.4e", v))
-- debugDrawer:drawText(p + vec3(0, 0, scaledV), color(0,0,0,255), strFormat("%5.4e", v))
-- debugDrawer:drawCylinder(prevPoint, p + vec3(0, 0, scaledV), 0.06, col)
-- prevPoint = p + vec3(0, 0, scaledV)
--debugDrawer:drawLine(p + vec3(0, 0, v*0.2), (n.pos + n.turnDir) + vec3(0, 0, v*0.2), col)
debugDrawer:drawCylinder(p, p1, 0.03, col)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, col)
debugDrawer:drawCylinder(p, p1, 0.03, col)
debugDrawer:drawCylinder(prevPoint, p1, 0.05, col)
debugDrawer:drawText(p1, color(0,0,0,255), strFormat("%2.0f", v*3.6) .. " kph")
local rayHitPos = tmpVec + shiftVec
debugDrawer:drawCylinder(tmpVec, rayHitPos, 0.02, color(255,255,255,255))
debugDrawer:drawSphere(0.1, vec3(0, 0, 0), color(0, 255, 0, 255)) -- World 0
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(1, 0, 0), 0.05, color(0, 255, 0, 255)) -- x (green)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(0, 1, 0), 0.05, color(255, 0, 0, 255)) -- y (red)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(1, 0, 0), 0.05, color(0, 255, 0, 255)) -- x (green)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(0, 1, 0), 0.05, color(255, 0, 0, 255)) -- y (red)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(0, 0, 1), 0.05, color(0, 0, 255, 255)) -- z (blue)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(0, 1, 0), 0.05, color(255, 0, 0, 255)) -- y (red)
debugDrawer:drawCylinder(vec3(0, 0, 0), 5 * vec3(0, 0, 1), 0.05, color(0, 0, 255, 255)) -- z (blue)
end
@/lua/ge/extensions/freeroam/bigMapMode.lua
local newPos2 = pos2 * 0.2; newPos2:setAdd(b)
debugDrawer:drawCylinder(newPos1, newPos2, lineWidth/2, color)
end
local newPos2 = pos2 * 0.15; newPos2:setAdd(b)
debugDrawer:drawCylinder(newPos1, newPos2, lineWidth/6, color)
end