1 // File : FrontTrack_Projector.hxx
2 // Created : Wed Apr 26 20:12:13 2017
3 // Author : Edward AGAPOV (eap)
5 #ifndef __FrontTrack_Projector_HXX__
6 #define __FrontTrack_Projector_HXX__
8 #include <TopoDS_Shape.hxx>
11 struct FT_RealProjector;
14 * \brief Projector of a point to a boundary shape. Wrapper of a real projection algo
20 FT_Projector(const TopoDS_Shape& shape = TopoDS_Shape());
21 FT_Projector(const FT_Projector& other);
24 // initialize with a boundary shape, compute the bounding box
25 void setBoundaryShape(const TopoDS_Shape& shape);
27 // return the boundary shape
28 const TopoDS_Shape& getShape() const { return _shape; }
30 // return the bounding box
31 const Bnd_Box getBoundingBox() const { return _bndBox; }
34 // create a real projector
35 void prepareForProjection();
37 // return true if a previously found solution can be used to speed up the projection
38 bool canUsePrevSolution() const;
40 // return true if projection is not needed
41 bool isPlanarBoundary() const;
43 // project a point to the boundary shape
44 bool project( const gp_Pnt& point,
45 const double maxDist2,
48 const double* prevSolution = 0);
50 // project a point to the boundary shape and check if the projection is within the shape boundary
51 bool projectAndClassify( const gp_Pnt& point,
52 const double maxDist2,
55 const double* prevSolution = 0);
57 // check if a point lies on the boundary shape
58 bool isOnShape( const gp_Pnt& point,
61 const double* prevSolution = 0);
65 FT_RealProjector* _realProjector;