Exemple #1
0
    public bool Insert(IOctreePoint octreePoint)
    {
        if (!_boundary.Contains(octreePoint))
        {
            return(false);
        }
        if (_points.Count < _capacity)
        {
            _points.Add(octreePoint);
            return(true);
        }

        if (!IsDivided)
        {
            Subdivide();
        }
        return(NorthEastBack.Insert(octreePoint) ||
               NorthWestBack.Insert(octreePoint) ||
               SouthEastBack.Insert(octreePoint) ||
               SouthWestBack.Insert(octreePoint) ||
               NorthEastFront.Insert(octreePoint) ||
               NorthWestFront.Insert(octreePoint) ||
               SouthEastFront.Insert(octreePoint) ||
               SouthWestFront.Insert(octreePoint));
    }
Exemple #2
0
 public virtual bool Contains(IOctreePoint point)
 {
     return(Contains(point.X, point.Y, point.Z));
 }