mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 01:12:05 +07:00
quad tree for visibility wip
This commit is contained in:
@@ -3,6 +3,22 @@
|
||||
namespace IsoTools.Internal {
|
||||
public class IsoGrid<T> {
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Interfaces
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public interface IItemAdapter {
|
||||
IsoRect GetBounds (T item);
|
||||
void SetMinMaxCells (T item, IsoPoint2 min, IsoPoint2 max);
|
||||
void GetMinMaxCells (T item, ref IsoPoint2 min, ref IsoPoint2 max);
|
||||
}
|
||||
|
||||
public interface ILookUpper {
|
||||
void LookUp(IsoList<T> items);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// CellPool
|
||||
@@ -26,22 +42,6 @@ namespace IsoTools.Internal {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Interfaces
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public interface IItemAdapter {
|
||||
IsoRect GetBounds (T item);
|
||||
void SetMinMaxCells (T item, IsoPoint2 min, IsoPoint2 max);
|
||||
void GetMinMaxCells (T item, ref IsoPoint2 min, ref IsoPoint2 max);
|
||||
}
|
||||
|
||||
public interface ILookUpper {
|
||||
void LookUp(IsoList<T> items);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Members
|
||||
@@ -79,8 +79,8 @@ namespace IsoTools.Internal {
|
||||
_itemAdapter = item_adapter;
|
||||
}
|
||||
|
||||
public void AddItem(T content) {
|
||||
_gridItems.Add(content);
|
||||
public void AddItem(T item) {
|
||||
_gridItems.Add(item);
|
||||
}
|
||||
|
||||
public void ClearItems() {
|
||||
|
||||
Reference in New Issue
Block a user