Skip to content

Commit

Permalink
Fix template lookup with Clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ruberith committed Mar 13, 2023
1 parent 4f56970 commit 4be9781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Tools/MeshSkinning/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ unsigned int getNeighbor(const unsigned int pointSetIndex, const unsigned int in
return neighborhoodSearch->point_set(0).neighbor(pointSetIndex, index, k);
}

namespace std {
std::ostream& operator << (std::ostream& out, const Vector3r& r)
{
out << r[0] << ", " << r[1] << ", " << r[2];
return out;
}
}


// main
Expand Down Expand Up @@ -216,18 +218,18 @@ int main( int argc, char **argv )
}

if (result.count("scale"))
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
LOG_INFO << "Scale: " << scale;

if (result.count("translation"))
translation = Vector3r(result["translation"].as<std::vector<Real>>().data());
translation = Vector3r(result["translation"].as<std::vector<Real>>().data());
LOG_INFO << "Translation: " << translation;

Vector3r axis = Vector3r::Zero();
Real angle = 0.0;
rotation = Matrix3r::Identity();
if (result.count("axis"))
axis = Vector3r(result["axis"].as<std::vector<Real>>().data());
axis = Vector3r(result["axis"].as<std::vector<Real>>().data());
if (result.count("angle"))
{
angle = result["angle"].as<Real>();
Expand Down
6 changes: 4 additions & 2 deletions Tools/VolumeSampling/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ bool useCache = true;
std::shared_ptr<Discregrid::CubicLagrangeDiscreteGrid> distanceField;


namespace std {
std::ostream& operator << (std::ostream& out, const Eigen::Matrix<unsigned int, 3, 1>& r)
{
out << r[0] << ", " << r[1] << ", " << r[2];
Expand All @@ -73,6 +74,7 @@ std::ostream& operator << (std::ostream& out, const Vector3r& r)
out << r[0] << ", " << r[1] << ", " << r[2];
return out;
}
}

// main
int main(int argc, char **argv)
Expand Down Expand Up @@ -161,7 +163,7 @@ int main(int argc, char **argv)
LOG_INFO << "Radius: " << radius;

if (result.count("scale"))
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
LOG_INFO << "Scale: " << scale;

if (result.count("steps"))
Expand Down Expand Up @@ -209,7 +211,7 @@ int main(int argc, char **argv)
const std::vector<Real> &v = result["region"].as<std::vector<Real>>();
if (v.size() == 6)
region = SamplingBase::Region(v[0], v[1], v[2], v[3], v[4], v[5]);
else
else
LOG_WARN << "Region parameter has wrong number of elements.";
useRegion = true;
LOG_INFO << "Region - min: " << region.m_min.transpose();
Expand Down

0 comments on commit 4be9781

Please sign in to comment.