Exemple #1
0
 public void AddObj(TreeNodeRT <T> node, T obj)
 {
     if (!m_contex.ContainsKey(node))
     {
         m_contex[node] = new List <T>();
     }
     m_contex[node].Add(obj);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public QuadTreeRT(Vector3 center, float range)
 {
     m_nodeRoot = new TreeNodeRT <T>(center, range);
 }