mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Removed an obsolete variable from MeshRaycaster
This commit is contained in:
parent
537260494d
commit
9805b02a25
2 changed files with 7 additions and 8 deletions
|
@ -195,10 +195,10 @@ Vec3f MeshRaycaster::get_closest_point(const Vec3f& point, Vec3f* normal) const
|
|||
Vec3d closest_point;
|
||||
m_emesh.squared_distance(point.cast<double>(), idx, closest_point);
|
||||
if (normal) {
|
||||
const stl_triangle_vertex_indices& indices = m_mesh->its.indices[idx];
|
||||
Vec3f a(m_mesh->its.vertices[indices(1)] - m_mesh->its.vertices[indices(0)]);
|
||||
Vec3f b(m_mesh->its.vertices[indices(2)] - m_mesh->its.vertices[indices(0)]);
|
||||
*normal = Vec3f(a.cross(b));
|
||||
auto indices = m_emesh.F().row(idx);
|
||||
Vec3d a(m_emesh.V().row(indices(1)) - m_emesh.V().row(indices(0)));
|
||||
Vec3d b(m_emesh.V().row(indices(2)) - m_emesh.V().row(indices(0)));
|
||||
*normal = Vec3f(a.cross(b).cast<float>());
|
||||
}
|
||||
return closest_point.cast<float>();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue