Added functions get_hit_pos, get_hit_normal, ready to implement intersect_ray

This commit is contained in:
Lukas Matena 2019-09-17 10:47:01 +02:00
parent b6292247e8
commit 3694bf3da9
3 changed files with 41 additions and 19 deletions

View file

@ -503,7 +503,7 @@ bool GLGizmoSlaSupports::gizmo_event(SLAGizmoEventType action, const Vec2d& mous
// clipping plane nor obscured by the mesh.
for (const unsigned int i : selected_idxs) {
const sla::SupportPoint &support_point = m_editing_cache[i].support_point;
if (!is_point_clipped(support_point.pos.cast<double>())) {
if (! is_point_clipped(support_point.pos.cast<double>())) {
bool is_obscured = false;
// Cast a ray in the direction of the camera and look for intersection with the mesh:
std::vector<igl::Hit> hits;