void OrderedTaskPoint::update_boundingbox(const TaskProjection& task_projection) { FlatGeoPoint fmin; FlatGeoPoint fmax; bool empty = true; for (fixed t=fixed_zero; t<= fixed_one; t+= fixed_steps) { FlatGeoPoint f = task_projection.project(get_boundary_parametric(t)); if (empty) { empty = false; fmin = f; fmax = f; } else { fmin.Longitude = min(fmin.Longitude, f.Longitude); fmin.Latitude = min(fmin.Latitude, f.Latitude); fmax.Longitude = max(fmax.Longitude, f.Longitude); fmax.Latitude = max(fmax.Latitude, f.Latitude); } } // note +/- 1 to ensure rounding keeps bb valid fmin.Longitude-= 1; fmin.Latitude-= 1; fmax.Longitude+= 1; fmax.Latitude+= 1; flat_bb = FlatBoundingBox(fmin,fmax); }
void OrderedTaskPoint::scan_projection(TaskProjection& task_projection) const { task_projection.scan_location(get_location()); #define fixed_steps fixed(0.05) for (fixed t=fixed_zero; t<= fixed_one; t+= fixed_steps) { task_projection.scan_location(get_boundary_parametric(t)); } }
void OrderedTaskPoint::update_boundingbox(const TaskProjection& task_projection) { flat_bb = FlatBoundingBox(task_projection.project(get_location())); for (fixed t=fixed_zero; t<= fixed_one; t+= fixed_steps) flat_bb.expand(task_projection.project(get_boundary_parametric(t))); flat_bb.expand(); // add 1 to fix rounding }
void SampledTaskPoint::update_oz(const TaskProjection &projection) { m_search_max = m_search_reference; m_search_min = m_search_reference; m_boundary_points.clear(); if (m_boundary_scored) { for (fixed t=fixed_zero; t<= fixed_one; t+= fixed_steps) { SearchPoint sp(get_boundary_parametric(t)); m_boundary_points.push_back(sp); } prune_interior(m_boundary_points); } else { m_boundary_points.push_back(m_search_reference); } update_projection(projection); }