PointWithinBounds() public method

public PointWithinBounds ( float x, float y, float z ) : bool
x float
y float
z float
return bool
Example #1
0
 protected internal OctreeNode GetChild(float x, float y, float z)
 {
     return(Bounds.PointWithinBounds(x, y, z)
                ? (Branch != null
                       ? (from t in Branch where t.Bounds.PointWithinBounds(x, y, z) select t.GetChild(x, y, z)).
                   FirstOrDefault()
                       : this)
                : null);
 }
Example #2
0
 public ArrayList GetNode(OctreeBox rect, ArrayList nodes)
 {
     if (Branch == null)
     {
         var things = Items.GetEnumerator();
         while (things.MoveNext())
         {
             var qtl = (OctreeLeaf)things.Current;
             if (qtl != null && rect.PointWithinBounds(qtl.X, qtl.Y, qtl.Z))
             {
                 nodes.Add(qtl.LeafObject);
             }
         }
     }
     else
     {
         foreach (var t in Branch.Where(t => t.Bounds.Within(rect)))
         {
             t.GetNode(rect, nodes);
         }
     }
     return(nodes);
 }
Example #3
0
 public ArrayList GetNode(OctreeBox rect, ArrayList nodes)
 {
     if (Branch == null)
     {
         var things = Items.GetEnumerator();
         while (things.MoveNext())
         {
             var qtl = (OctreeLeaf)things.Current;
             if (qtl != null && rect.PointWithinBounds(qtl.X, qtl.Y, qtl.Z))
                 nodes.Add(qtl.LeafObject);
         }
     }
     else
     {
         foreach (var t in Branch.Where(t => t.Bounds.Within(rect)))
         {
             t.GetNode(rect, nodes);
         }
     }
     return nodes;
 }