Minor beautification
This commit is contained in:
parent
cedfc5e3fb
commit
ac414e226f
2 changed files with 6 additions and 6 deletions
|
@ -47,7 +47,7 @@ private:
|
|||
public:
|
||||
// Forwarded constructor
|
||||
template<class... Args>
|
||||
inline CachedObject(Setter fn, Args &&... args)
|
||||
inline CachedObject(Setter &&fn, Args &&... args)
|
||||
: m_obj(std::forward<Args>(args)...), m_valid(false), m_setter(fn)
|
||||
{}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
// the next retrieval (Setter will be called). The data that is used in
|
||||
// the setter function should be guarded as well during modification so
|
||||
// the modification has to take place in fn.
|
||||
inline void invalidate(std::function<void()> fn)
|
||||
template<class Fn> void invalidate(Fn &&fn)
|
||||
{
|
||||
std::lock_guard<SpinMutex> lck(m_lck);
|
||||
fn();
|
||||
|
|
|
@ -138,14 +138,14 @@ Transform3d SLAPrint::sla_trafo(const ModelObject &model_object) const
|
|||
offset(1) = 0.;
|
||||
rotation(2) = 0.;
|
||||
|
||||
offset(Z) *= corr(Z);
|
||||
offset.z() *= corr.z();
|
||||
|
||||
auto trafo = Transform3d::Identity();
|
||||
trafo.translate(offset);
|
||||
trafo.scale(corr);
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(2), Vec3d::UnitZ()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(1), Vec3d::UnitY()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation(0), Vec3d::UnitX()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation.z(), Vec3d::UnitZ()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation.y(), Vec3d::UnitY()));
|
||||
trafo.rotate(Eigen::AngleAxisd(rotation.x(), Vec3d::UnitX()));
|
||||
trafo.scale(model_instance.get_scaling_factor());
|
||||
trafo.scale(model_instance.get_mirror());
|
||||
|
||||
|
|
Loading…
Reference in a new issue