DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ DrawPolygonLinesDebug()

static void CfgPlayerRestrictedAreaHandler::DrawPolygonLinesDebug ( bool draw)
inlinestaticprivate

См. определение в файле CfgPlayerRestrictedAreaHandler.c строка 213

214 {
215 if (!IsInitialized())
216 return;
217
220
221 if (draw && m_DbgShapesPolygonLines.Count() == 0)
222 {
223 array<vector> polygonVectors = {};
224 foreach (PlayerRestrictedAreaInstance area : m_Data.m_ValidatedAreas)
225 {
226 foreach (array<ref array<float>> polygonData : area.PRAPolygons)
227 {
228 vector first;
229 vector current;
230 vector last;
231
232 foreach (array<float> vertexPos : polygonData)
233 {
234 polygonVectors.Insert(Vector(vertexPos[0],GetGame().SurfaceY(vertexPos[0],vertexPos[1]) + 2,vertexPos[1]));
235 }
236
237 int count = polygonVectors.Count();
238 for (int i = 0; i < count; ++i)
239 {
240 current = polygonVectors[i];
241
242 if (i == 0)
243 first = polygonVectors[i];
244 else
245 Debug.DrawLine(last,current,COLOR_WHITE,ShapeFlags.TRANSP|ShapeFlags.NOZWRITE);
246
247 last = current;
248 }
249
250 m_DbgShapesPolygonLines.Insert(Debug.DrawLine(current,first,COLOR_RED,ShapeFlags.TRANSP|ShapeFlags.NOZWRITE));
251
252 polygonVectors.Clear();
253 }
254 }
255 }
256 else if (!draw && m_DbgShapesPolygonLines.Count() > 0)
257 {
258 foreach (Shape item : m_DbgShapesPolygonLines)
259 {
260 item.Destroy();
261 }
262
264 }
265 }
void Debug()
Определения UniversalTemperatureSource.c:349
static ref CfgPlayerRestrictedAreaJsonData m_Data
Определения CfgPlayerRestrictedAreaHandler.c:6
ref array< Shape > m_DbgShapesPolygonLines
ref array< ref array< ref array< float > > > PRAPolygons
3D, not used directly!
proto native CGame GetGame()
const int COLOR_RED
Определения constants.c:64
const int COLOR_WHITE
Определения constants.c:63
ShapeFlags
Определения EnDebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки COLOR_RED, COLOR_WHITE, Debug::DrawLine(), GetGame(), IsInitialized(), m_Data, m_DbgShapesPolygonLines, PlayerRestrictedAreaInstance::PRAPolygons, Shape и Vector().