#pragma once #include "ISDF.h" #include "TriMeshSdfAlgorithm.h" #include "ledslib.h" // CLEDSGeometry #include "TriMeshSdfAlgorithm.h" namespace SDF { SdfValue calc_sdf_from_point_to_STL(CLEDSGeometry *STL, Point *pt, TriMeshSdfAlgorithm *algo); //--------------------------------- // Wrapper class - this represents an STL file that implements the ISDF interface. // So given an STL (CLEDSGeometry *stl), this will provide the wrapper function to calculate // SDFs to it. //--------------------------------- class StlSdfAble : public ISDF { private: SDF::TriMeshSdfAlgorithm *sdf_algo; CLEDSGeometry *stl; double gradient_calc_epsilon; public: StlSdfAble(CLEDSGeometry *stl, double gradient_calc_epsilon, TriMeshSdfAlgorithm *algo) : gradient_calc_epsilon(gradient_calc_epsilon) , stl(stl) , sdf_algo(algo) { } virtual ~StlSdfAble(); SdfValue calc_sdf_from_pt( const Point &from ) const; }; } //--------------------------------- // Dumpster for commented out code //---------------------------------