Remove completely redundant code
This commit is contained in:
parent
a36c7c76cc
commit
3ab246df6b
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user