Remove completely redundant code

This commit is contained in:
tamasmeszaros 2020-01-15 12:43:58 +01:00
parent a36c7c76cc
commit 3ab246df6b
3 changed files with 0 additions and 43 deletions

View File

@ -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) {

View File

@ -171,23 +171,6 @@ public:
// Try to enable or disable multisampling.
bool enable_multisampling(bool e = true);
template<class It,
class Trafo,
class GetPt,
class V = typename std::iterator_traits<It>::value_type>
inline std::vector<V> transform_pts(
It from, It to, Trafo &&tr, GetPt &&point)
{
vector<V> 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;

View File

@ -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) {