LUADOC - Farming Simulator 22

DebugBitVectorMap

Functions

drawDebugAreaRectangleFilled

Description
Definition
drawDebugAreaRectangleFilled()
Code
93function DebugBitVectorMap:drawDebugAreaRectangleFilled(x, z, x1, z1, x2, z2, r, g, b, a)
94 local x3, z3 = x1, z2
95
96 local y = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x, 0, z) + self.yOffset
97 local y1 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x1, 0, z1) + self.yOffset
98 local y2 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x2, 0, z2) + self.yOffset
99 local y3 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x3, 0, z3) + self.yOffset
100
101 drawDebugTriangle(x, y, z, x2, y2, z2, x1, y1, z1, r, g, b, a, false)
102 drawDebugTriangle(x1, y1, z1, x2, y2, z2, x3, y3, z3, r, g, b, a, false)
103end

new

Description
Definition
new()
Code
16function DebugBitVectorMap.new(radius, resolution, opacity, yOffset, customMt)
17 local self = setmetatable({}, customMt or DebugBitVectorMap_mt)
18
19 self.radius = radius or 15
20 self.resolution = resolution or 0.5
21
22 self.colorPos = {0, 1, 0, opacity}
23 self.colorNeg = {1, 0, 0, opacity}
24
25 self.yOffset = yOffset or 0.1
26
27 return self
28end