Skip to content
Snippets Groups Projects
Commit b9a60c8e authored by Karsten Rink's avatar Karsten Rink
Browse files

rewrote changes incompatible to MSVS2010

parent 7374174a
No related branches found
No related tags found
No related merge requests found
...@@ -42,8 +42,8 @@ public: ...@@ -42,8 +42,8 @@ public:
_max_pnt(std::numeric_limits<double>::min(), std::numeric_limits<double>::min(), std::numeric_limits<double>::min()) _max_pnt(std::numeric_limits<double>::min(), std::numeric_limits<double>::min(), std::numeric_limits<double>::min())
{ {
assert(! ids.empty()); assert(! ids.empty());
for (auto i : ids) { for (unsigned i=0; i<ids.size(); ++i) {
update(*(pnts[i])); update(*(pnts[ids[i]]));
} }
} }
......
...@@ -42,7 +42,11 @@ void Surface::addTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt ...@@ -42,7 +42,11 @@ void Surface::addTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt
_sfc_triangles.push_back (new Triangle(_sfc_pnts, pnt_a, pnt_b, pnt_c)); _sfc_triangles.push_back (new Triangle(_sfc_pnts, pnt_a, pnt_b, pnt_c));
if (!_bv) { if (!_bv) {
_bv = new AABB<Point>(_sfc_pnts, {pnt_a, pnt_b, pnt_c}); std::vector<size_t> ids(3);
ids[0] = pnt_a;
ids[1] = pnt_b;
ids[2] = pnt_c;
_bv = new AABB<Point>(_sfc_pnts, ids);
} else { } else {
_bv->update (*_sfc_pnts[pnt_a]); _bv->update (*_sfc_pnts[pnt_a]);
_bv->update (*_sfc_pnts[pnt_b]); _bv->update (*_sfc_pnts[pnt_b]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment