diff --git a/sandboxes/opencsg/Engine.cpp b/sandboxes/opencsg/Engine.cpp index bd9da6540..f110b23c5 100644 --- a/sandboxes/opencsg/Engine.cpp +++ b/sandboxes/opencsg/Engine.cpp @@ -420,19 +420,6 @@ void CSGDisplay::on_scene_updated(const Scene &scene) mshinst.require_shared_vertices(); m_scene_cache.add_mesh(mshinst, OpenCSG::Intersection, m_csgsettings.get_convexity()); - - auto tr = Transform3f::Identity(); - tr.translate(-center); - - transform_pts(holedata.begin(), holedata.end(), tr, - [](const sla::DrainHole &dh) { - return dh.pos; - }); - - transform_pts(holedata.begin(), holedata.end(), tr, - [](const sla::DrainHole &dh) { - return dh.normal; - }); } for (const sla::DrainHole &holept : holedata) { diff --git a/sandboxes/opencsg/Engine.hpp b/sandboxes/opencsg/Engine.hpp index c078a39d8..fc76c1b31 100644 --- a/sandboxes/opencsg/Engine.hpp +++ b/sandboxes/opencsg/Engine.hpp @@ -171,23 +171,6 @@ public: // Try to enable or disable multisampling. bool enable_multisampling(bool e = true); -template::value_type> -inline std::vector transform_pts( - It from, It to, Trafo &&tr, GetPt &&point) -{ - vector ret; - ret.reserve(to - from); - for(auto it = from; it != to; ++it) { - V v = *it; - v.pos = tr * point(*it); - ret.emplace_back(std::move(v)); - } - return ret; -} - class Volume { IndexedVertexArray m_geom; Geometry::Transformation m_trafo; diff --git a/sandboxes/opencsg/ShaderCSGDisplay.cpp b/sandboxes/opencsg/ShaderCSGDisplay.cpp index 7339e408c..8ceb234be 100644 --- a/sandboxes/opencsg/ShaderCSGDisplay.cpp +++ b/sandboxes/opencsg/ShaderCSGDisplay.cpp @@ -53,19 +53,6 @@ void ShaderCSGDisplay::on_scene_updated(const Scene &scene) mshinst.require_shared_vertices(); add_mesh(mshinst); - - auto tr = Transform3f::Identity(); - tr.translate(-center); - - transform_pts(holedata.begin(), holedata.end(), tr, - [](const sla::DrainHole &dh) { - return dh.pos; - }); - - transform_pts(holedata.begin(), holedata.end(), tr, - [](const sla::DrainHole &dh) { - return dh.normal; - }); } for (const sla::DrainHole &holept : holedata) {