Tech ENABLE_RAYCAST_PICKING set as default

This commit is contained in:
enricoturri1966 2022-12-05 10:24:30 +01:00
parent e04e8c55cf
commit 6f18f8f784
39 changed files with 30 additions and 1046 deletions

View file

@ -370,13 +370,8 @@ Vec3f MeshRaycaster::get_triangle_normal(size_t facet_idx) const
return m_normals[facet_idx];
}
#if ENABLE_RAYCAST_PICKING
void MeshRaycaster::line_from_mouse_pos(const Vec2d& mouse_pos, const Transform3d& trafo, const Camera& camera,
Vec3d& point, Vec3d& direction)
#else
void MeshRaycaster::line_from_mouse_pos(const Vec2d& mouse_pos, const Transform3d& trafo, const Camera& camera,
Vec3d& point, Vec3d& direction)
#endif // ENABLE_RAYCAST_PICKING
{
Matrix4d modelview = camera.get_view_matrix().matrix();
Matrix4d projection= camera.get_projection_matrix().matrix();
@ -540,7 +535,6 @@ std::vector<unsigned> MeshRaycaster::get_unobscured_idxs(const Geometry::Transfo
return out;
}
#if ENABLE_RAYCAST_PICKING
bool MeshRaycaster::closest_hit(const Vec2d& mouse_pos, const Transform3d& trafo, const Camera& camera,
Vec3f& position, Vec3f& normal, const ClippingPlane* clipping_plane, size_t* facet_idx) const
{
@ -573,7 +567,6 @@ bool MeshRaycaster::closest_hit(const Vec2d& mouse_pos, const Transform3d& trafo
return true;
}
#endif // ENABLE_RAYCAST_PICKING
Vec3f MeshRaycaster::get_closest_point(const Vec3f& point, Vec3f* normal) const
{