mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-12 10:01:48 +08:00
Minor beautification
This commit is contained in:
parent
cedfc5e3fb
commit
ac414e226f
@ -47,7 +47,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
// Forwarded constructor
|
// Forwarded constructor
|
||||||
template<class... Args>
|
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)
|
: 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 next retrieval (Setter will be called). The data that is used in
|
||||||
// the setter function should be guarded as well during modification so
|
// the setter function should be guarded as well during modification so
|
||||||
// the modification has to take place in fn.
|
// 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);
|
std::lock_guard<SpinMutex> lck(m_lck);
|
||||||
fn();
|
fn();
|
||||||
|
@ -138,14 +138,14 @@ Transform3d SLAPrint::sla_trafo(const ModelObject &model_object) const
|
|||||||
offset(1) = 0.;
|
offset(1) = 0.;
|
||||||
rotation(2) = 0.;
|
rotation(2) = 0.;
|
||||||
|
|
||||||
offset(Z) *= corr(Z);
|
offset.z() *= corr.z();
|
||||||
|
|
||||||
auto trafo = Transform3d::Identity();
|
auto trafo = Transform3d::Identity();
|
||||||
trafo.translate(offset);
|
trafo.translate(offset);
|
||||||
trafo.scale(corr);
|
trafo.scale(corr);
|
||||||
trafo.rotate(Eigen::AngleAxisd(rotation(2), Vec3d::UnitZ()));
|
trafo.rotate(Eigen::AngleAxisd(rotation.z(), Vec3d::UnitZ()));
|
||||||
trafo.rotate(Eigen::AngleAxisd(rotation(1), Vec3d::UnitY()));
|
trafo.rotate(Eigen::AngleAxisd(rotation.y(), Vec3d::UnitY()));
|
||||||
trafo.rotate(Eigen::AngleAxisd(rotation(0), Vec3d::UnitX()));
|
trafo.rotate(Eigen::AngleAxisd(rotation.x(), Vec3d::UnitX()));
|
||||||
trafo.scale(model_instance.get_scaling_factor());
|
trafo.scale(model_instance.get_scaling_factor());
|
||||||
trafo.scale(model_instance.get_mirror());
|
trafo.scale(model_instance.get_mirror());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user