Script v1_7_1_0
- AI
- Animals
- Collections
- Contracts
- Debug
- Debug2DArea
- DebugBitVectorMap
- DebugCube
- DebugDensityMap
- DebugFlag
- DebugGizmo
- DebugInfoTable
- DebugManager
- DebugPath
- DebugPoint
- DebugText
- DebugUtil
- NoteManager
- Economy
- Elements
- EnvironmentalScore
- Errors
- Events
- GUI
- Handtools
- Hud
- I3d
- Input
- Jobs
- Maps
- Materials
- Misc
- Objects
- Parameters
- Placeables
- Placement
- Player
- Shop
- Sounds
- Specialization
- Specializations
- StateMachine
- Statistics
- Tasks
- Triggers
- Utils
- Vehicles
Engine v1_7_1_0
- AI
- Animation
- Camera
- Entity
- Fillplanes
- general
- General
- I3D
- Input
- Lighting
- Math
- Network
- Node
- NoteNode
- Overlays
- Particle System
- Physics
- Rendering
- Scenegraph
- Shape
- Sound
- Spline
- String
- Terrain Detail
- Text Rendering
- Tire Track
- VoiceChat
- XML
Foundation Reference
DebugDensityMap
FunctionsdrawDebugAreaRectangleFilled
DescriptionDefinitiondrawDebugAreaRectangleFilled()Code
121 | function DebugDensityMap:drawDebugAreaRectangleFilled(x, z, x1, z1, x2, z2, r, g, b, a) |
122 | local x3, z3 = x1, z2 |
123 | |
124 | local y = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x, 0, z) + self.yOffset |
125 | local y1 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x1, 0, z1) + self.yOffset |
126 | local y2 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x2, 0, z2) + self.yOffset |
127 | local y3 = getTerrainHeightAtWorldPos(g_currentMission.terrainRootNode, x3, 0, z3) + self.yOffset |
128 | |
129 | drawDebugTriangle(x, y, z, x2, y2, z2, x1, y1, z1, r, g, b, a, false) |
130 | drawDebugTriangle(x1, y1, z1, x2, y2, z2, x3, y3, z3, r, g, b, a, false) |
131 | end |
new
DescriptionDefinitionnew()Code
16 | function DebugDensityMap.new(densityMap, firstChannel, numChannels, radius, yOffset, colors, customMt) |
17 | local self = setmetatable({}, customMt or DebugDensityMap_mt) |
18 | |
19 | local size = getDensityMapSize(densityMap) |
20 | self.resolution = g_currentMission.terrainSize / size |
21 | self.firsChannel = firstChannel |
22 | self.numChannels = numChannels |
23 | |
24 | self.colors = colors |
25 | |
26 | self.radius = radius |
27 | self.yOffset = yOffset or 0.1 |
28 | |
29 | self.modifier = DensityMapModifier.new(densityMap, firstChannel, numChannels, g_currentMission.terrainNode) |
30 | self.filter = DensityMapFilter.new(self.modifier) |
31 | |
32 | return self |
33 | end |