Fixed warnings
This commit is contained in:
parent
91266e4815
commit
ae3beeb50a
1 changed files with 5 additions and 4 deletions
|
@ -308,7 +308,6 @@ void GLGizmoMeasure::on_render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (is_hovering_on_locked_feature) {
|
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 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);
|
auto it = m_raycasters.find(feature_type_id);
|
||||||
if (it != m_raycasters.end() && it->second != nullptr) {
|
if (it != m_raycasters.end() && it->second != nullptr) {
|
||||||
|
@ -317,9 +316,11 @@ void GLGizmoMeasure::on_render()
|
||||||
const Transform3d& trafo = it->second->get_transform();
|
const Transform3d& trafo = it->second->get_transform();
|
||||||
bool res = it->second->get_raycaster()->closest_hit(m_mouse_pos, trafo, camera, p, n);
|
bool res = it->second->get_raycaster()->closest_hit(m_mouse_pos, trafo, camera, p, n);
|
||||||
assert(res);
|
assert(res);
|
||||||
if (callback)
|
if (res) {
|
||||||
p = callback(p);
|
if (callback)
|
||||||
return trafo * p.cast<double>();
|
p = callback(p);
|
||||||
|
return trafo * p.cast<double>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Vec3d::Zero();
|
return Vec3d::Zero();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue