Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamzik123 committed Dec 4, 2024
1 parent 688066d commit 5f7574e
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions Mafia2Libs/Rendering/Spatial/TranslokatorSpatialGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ namespace Rendering.Core
{
public class TranslokatorSpatialGrid
{
// TODO: Make cells selectable and toggleable
// Right now all cells render at once and you can't see anything

private BoundingBox gridBounds;
private BoundingBox[] cellBounds = new BoundingBox[0];
private RenderBoundingBox boundingBox;
Expand Down Expand Up @@ -98,7 +95,6 @@ public void Render(ID3D11Device device, ID3D11DeviceContext deviceContext, Camer
foreach (var cell in cellBoundingBox)
{
cell.Render(device, deviceContext, camera);
//break;
}

boundingBox.Render(device, deviceContext, camera);
Expand All @@ -114,43 +110,6 @@ public void Shutdown()
}
}

//private int GetCell(Vector3 position)
//{
// var offsetX = position.X - origin.X;
// var offsetY = position.Y - origin.Y;
// var gridX = Math.Abs(Math.Floor(offsetX / cellSize.X));
// var gridY = Math.Abs(Math.Floor(offsetY / cellSize.Y));
// var intX = Convert.ToUInt32(Math.Min(gridX, width - 1));
// var intY = Convert.ToUInt32(Math.Min(gridY, height - 1));
// return (int)(intX + (int)(intY * width));
//}

//public void SetSelectedCell(int index)
//{
// currentCell = index;
//}

//public TreeNode GetTreeNodes()
//{
// TreeNode[] ChildCells = new TreeNode[cells.Length];
//
// for (int i = 0; i < cells.Length; i++)
// {
// TreeNode Child = new TreeNode();
// Child.Text = string.Format("CELL {0}", i);
// Child.Name = cells[i].GetRefID().ToString();
// Child.Tag = cells[i];
// ChildCells[i] = Child;
// }
//
// TreeNode Parent = new TreeNode();
// Parent.Text = string.Format("Parent");
// Parent.Tag = this;
// Parent.Nodes.AddRange(ChildCells);
//
// return Parent;
//}

public void SetGridEnabled(int index, bool enabled)
{
if (index < cellBoundingBox.Length)
Expand Down

0 comments on commit 5f7574e

Please sign in to comment.