Fixed warnings
This commit is contained in:
parent
91266e4815
commit
ae3beeb50a
@ -308,7 +308,6 @@ void GLGizmoMeasure::on_render()
|
||||
}
|
||||
}
|
||||
else if (is_hovering_on_locked_feature) {
|
||||
auto default_callback = [](const Vec3f& v) { return v; };
|
||||
auto position_on_feature = [this](int feature_type_id, const Camera& camera, std::function<Vec3f(const Vec3f&)> callback = nullptr) -> Vec3d {
|
||||
auto it = m_raycasters.find(feature_type_id);
|
||||
if (it != m_raycasters.end() && it->second != nullptr) {
|
||||
@ -317,10 +316,12 @@ void GLGizmoMeasure::on_render()
|
||||
const Transform3d& trafo = it->second->get_transform();
|
||||
bool res = it->second->get_raycaster()->closest_hit(m_mouse_pos, trafo, camera, p, n);
|
||||
assert(res);
|
||||
if (res) {
|
||||
if (callback)
|
||||
p = callback(p);
|
||||
return trafo * p.cast<double>();
|
||||
}
|
||||
}
|
||||
return Vec3d::Zero();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user