/// <summary> /// Crear meshes debug /// </summary> public void createDebugMeshes() { debugBoxes = new List <TgcBoxDebug>(); for (var x = 0; x < grid.GetUpperBound(0); x++) { for (var y = 0; y < grid.GetUpperBound(1); y++) { for (var z = 0; z < grid.GetUpperBound(2); z++) { var node = grid[x, y, z]; var box = TgcBoxDebug.fromExtremes(node.BoundingBox.PMin, node.BoundingBox.PMax, Color.Red); debugBoxes.Add(box); } } } }
/// <summary> /// Construir caja debug /// </summary> private TgcBoxDebug createDebugBox(float boxLowerX, float boxLowerY, float boxLowerZ, float boxUpperX, float boxUpperY, float boxUpperZ, int step) { //Determinar color y grosor según profundidad Color c; float thickness; switch (step) { case 0: c = Color.Red; thickness = 4f; break; case 1: c = Color.Violet; thickness = 3f; break; case 2: c = Color.Brown; thickness = 2f; break; case 3: c = Color.Gold; thickness = 1f; break; default: c = Color.Orange; thickness = 0.5f; break; } //Crear caja Debug var box = TgcBoxDebug.fromExtremes( new TGCVector3(boxLowerX, boxLowerY, boxLowerZ), new TGCVector3(boxUpperX, boxUpperY, boxUpperZ), c, thickness); return(box); }