예제 #1
0
void
FlatTriangleFanTree::AcceptInRange(const FlatBoundingBox &bb,
                                   const TaskProjection &task_proj,
                                   TriangleFanVisitor &visitor) const
{
  if (!bb.Overlaps(bb_children))
    return;

  if (bb.Overlaps(bounding_box)) {
    visitor.StartFan();
    for (auto it = vs.cbegin(), end = vs.cend(); it != end; ++it)
      visitor.AddPoint(task_proj.Unproject(*it));

    visitor.EndFan();
  }

  for (auto it = children.cbegin(), end = children.cend(); it != end; ++it)
    it->AcceptInRange(bb, task_proj, visitor);
}
예제 #2
0
void
FlatTriangleFanTree::AcceptInRange(const FlatBoundingBox &bb,
                                   const FlatProjection &projection,
                                   TriangleFanVisitor &visitor) const
{
  if (!bb.Overlaps(bb_children))
    return;

  if (bb.Overlaps(bounding_box)) {
    visitor.StartFan();
    for (const auto &v : vs)
      visitor.AddPoint(projection.Unproject(v));

    visitor.EndFan();
  }

  for (const auto &child : children)
    child.AcceptInRange(bb, projection, visitor);
}