Skip to content

Commit

Permalink
More test.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Oct 18, 2018
1 parent 332558e commit e046b0d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 6 additions & 4 deletions filters/ELMFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ void ELMFilter::filter(PointView& view)
BOX2D bounds;
view.calculateBounds(bounds);

size_t cols = ((bounds.maxx - bounds.minx) / m_cell) + 1;
size_t rows = ((bounds.maxy - bounds.miny) / m_cell) + 1;
size_t cols =
static_cast<size_t>(((bounds.maxx - bounds.minx) / m_cell) + 1);
size_t rows =
static_cast<size_t>(((bounds.maxy - bounds.miny) / m_cell) + 1);

// Make an initial pass through the input PointView to index elevation
// values and PointIds by row and column.
Expand All @@ -88,8 +90,8 @@ void ELMFilter::filter(PointView& view)
double y = view.getFieldAs<double>(Dimension::Id::Y, id);
double z = view.getFieldAs<double>(Dimension::Id::Z, id);

size_t c = static_cast<size_t>(floor(x - bounds.minx) / m_cell);
size_t r = static_cast<size_t>(floor(y - bounds.miny) / m_cell);
size_t c = static_cast<size_t>(std::floor(x - bounds.minx) / m_cell);
size_t r = static_cast<size_t>(std::floor(y - bounds.miny) / m_cell);

hash[c * rows + r].emplace(z, id);
}
Expand Down
9 changes: 4 additions & 5 deletions filters/GreedyProjection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ void GreedyProjection::filter(PointView& view)

// Projecting point onto the surface
Eigen::Vector3d coord(getCoord(R_));
float dist = nc.dot (coord);
proj_qp_ = coord - dist * nc;
proj_qp_ = coord - nc.dot(coord) * nc;

// Converting coords, calculating angles and saving the
// projected near boundary edges
Expand Down Expand Up @@ -316,13 +315,13 @@ void GreedyProjection::filter(PointView& view)
break;
else
{
int right = left+1;
PointId right = left+1;
do
{
while ((right < nnn_) &&
while ((right < (PointId)nnn_) &&
((!angles_[right].visible) || stateSet(nnIdx[right])))
right++;
if (right >= nnn_)
if (right >= (PointId)nnn_)
break;
else if ((getCoord(nnIdx[left]) -
getCoord(nnIdx[right])).squaredNorm () > sqr_max_edge)
Expand Down
2 changes: 1 addition & 1 deletion vendor/arbiter/arbiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5129,7 +5129,7 @@ class Driver;
*
* An Endpoint may be created using Arbiter::getEndpoint.
*/
class ARBITER_DLL Endpoint
class Endpoint
{
// Only Arbiter may construct.
friend class Arbiter;
Expand Down

0 comments on commit e046b0d

Please sign in to comment.