mirror of https://github.com/CGAL/cgal
Review: replace mask() by has_points()
This commit is contained in:
parent
c7fcb4ac69
commit
66bc240e1e
|
|
@ -84,7 +84,7 @@ public:
|
|||
for (std::size_t j = 0; j < grid.height(); j++){
|
||||
for (std::size_t i = 0; i < grid.width(); i++){
|
||||
|
||||
if(grid.mask(i,j)){
|
||||
if(grid.has_points(i,j)){
|
||||
|
||||
std::size_t squareXmin = (i < square ? 0 : i - square);
|
||||
std::size_t squareXmax = (std::min) (grid.width()-1, i + square);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
for (std::size_t j = 0; j < grid.height(); j++){
|
||||
for (std::size_t i = 0; i < grid.width(); i++){
|
||||
|
||||
if(!(grid.mask(i,j)))
|
||||
if(!(grid.has_points(i,j)))
|
||||
continue;
|
||||
std::vector<float> hori;
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public:
|
|||
/*!
|
||||
\brief Returns `false` if the cell at position `(x,y)` is empty, `true` otherwise.
|
||||
*/
|
||||
bool mask(std::size_t x, std::size_t y) const
|
||||
bool has_points(std::size_t x, std::size_t y) const
|
||||
{
|
||||
if (m_lower_scale == NULL)
|
||||
{
|
||||
|
|
@ -159,10 +159,10 @@ public:
|
|||
return (!(m_grid(x,y).empty()));
|
||||
}
|
||||
else
|
||||
return (m_lower_scale->mask(x*2, y*2)
|
||||
|| m_lower_scale->mask(x*2, y*2 + 1)
|
||||
|| m_lower_scale->mask(x*2 + 1, y*2 + 1)
|
||||
|| m_lower_scale->mask(x*2 + 1, y*2));
|
||||
return (m_lower_scale->has_points(x*2, y*2)
|
||||
|| m_lower_scale->has_points(x*2, y*2 + 1)
|
||||
|| m_lower_scale->has_points(x*2 + 1, y*2 + 1)
|
||||
|| m_lower_scale->has_points(x*2 + 1, y*2));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue