public void AddObj(TreeNodeRT <T> node, T obj) { if (!m_contex.ContainsKey(node)) { m_contex[node] = new List <T>(); } m_contex[node].Add(obj); }
void insertIntoChild(int childIdx, Vector3 childCenter, BuildContex <T> buildCtx, Vector3 objCenter, float objRadius, T obj) { if (m_children == null) { m_children = new TreeNodeRT <T> [4]; } if (m_children[childIdx] == null) { m_children[childIdx] = new TreeNodeRT <T>(childCenter, m_fRadius / 2); } m_children[childIdx].Insert(buildCtx, objCenter, objRadius, obj); }
public QuadTreeRT(Vector3 center, float range) { m_nodeRoot = new TreeNodeRT <T>(center, range); }