Skip to content

Commit 4be9781

Browse files
committed
Fix template lookup with Clang
1 parent 4f56970 commit 4be9781

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Tools/MeshSkinning/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,13 @@ unsigned int getNeighbor(const unsigned int pointSetIndex, const unsigned int in
111111
return neighborhoodSearch->point_set(0).neighbor(pointSetIndex, index, k);
112112
}
113113

114+
namespace std {
114115
std::ostream& operator << (std::ostream& out, const Vector3r& r)
115116
{
116117
out << r[0] << ", " << r[1] << ", " << r[2];
117118
return out;
118119
}
120+
}
119121

120122

121123
// main
@@ -216,18 +218,18 @@ int main( int argc, char **argv )
216218
}
217219

218220
if (result.count("scale"))
219-
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
221+
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
220222
LOG_INFO << "Scale: " << scale;
221223

222224
if (result.count("translation"))
223-
translation = Vector3r(result["translation"].as<std::vector<Real>>().data());
225+
translation = Vector3r(result["translation"].as<std::vector<Real>>().data());
224226
LOG_INFO << "Translation: " << translation;
225227

226228
Vector3r axis = Vector3r::Zero();
227229
Real angle = 0.0;
228230
rotation = Matrix3r::Identity();
229231
if (result.count("axis"))
230-
axis = Vector3r(result["axis"].as<std::vector<Real>>().data());
232+
axis = Vector3r(result["axis"].as<std::vector<Real>>().data());
231233
if (result.count("angle"))
232234
{
233235
angle = result["angle"].as<Real>();

Tools/VolumeSampling/main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ bool useCache = true;
6262
std::shared_ptr<Discregrid::CubicLagrangeDiscreteGrid> distanceField;
6363

6464

65+
namespace std {
6566
std::ostream& operator << (std::ostream& out, const Eigen::Matrix<unsigned int, 3, 1>& r)
6667
{
6768
out << r[0] << ", " << r[1] << ", " << r[2];
@@ -73,6 +74,7 @@ std::ostream& operator << (std::ostream& out, const Vector3r& r)
7374
out << r[0] << ", " << r[1] << ", " << r[2];
7475
return out;
7576
}
77+
}
7678

7779
// main
7880
int main(int argc, char **argv)
@@ -161,7 +163,7 @@ int main(int argc, char **argv)
161163
LOG_INFO << "Radius: " << radius;
162164

163165
if (result.count("scale"))
164-
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
166+
scale = Vector3r(result["scale"].as<std::vector<Real>>().data());
165167
LOG_INFO << "Scale: " << scale;
166168

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

0 commit comments

Comments
 (0)