mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Unified igl calls in MeshRaycaster and EigenMesh3D
MeshRaycaster is still aware of the clipping plane but it now uses EigenMesh3D internally Public interface of both classes is unchanged
This commit is contained in:
parent
645f13a0ae
commit
b4795e1292
4 changed files with 51 additions and 92 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "libslic3r/Point.hpp"
|
||||
#include "libslic3r/Geometry.hpp"
|
||||
#include "libslic3r/SLA/SLACommon.hpp"
|
||||
|
||||
|
||||
#include <cfloat>
|
||||
|
@ -93,8 +94,9 @@ private:
|
|||
|
||||
class MeshRaycaster {
|
||||
public:
|
||||
MeshRaycaster(const TriangleMesh& mesh);
|
||||
~MeshRaycaster();
|
||||
MeshRaycaster(const TriangleMesh& mesh)
|
||||
: m_mesh(&mesh), m_emesh(mesh)
|
||||
{}
|
||||
void set_transformation(const Geometry::Transformation& trafo);
|
||||
void set_camera(const Camera& camera);
|
||||
|
||||
|
@ -107,9 +109,7 @@ public:
|
|||
Vec3f get_closest_point(const Vec3f& point, Vec3f* normal = nullptr) const;
|
||||
|
||||
private:
|
||||
// PIMPL wrapper around igl::AABB so I don't have to include the header-only IGL here
|
||||
class AABBWrapper;
|
||||
AABBWrapper* m_AABB_wrapper;
|
||||
sla::EigenMesh3D m_emesh;
|
||||
const TriangleMesh* m_mesh = nullptr;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue