25 : _sfc_pnts(pnt_vec), _bounding_volume(nullptr), _surface_grid(nullptr)
30 : _sfc_pnts(src._sfc_pnts),
31 _bounding_volume(new
AABB(*(src._bounding_volume))),
32 _surface_grid(nullptr)
38 [](
Triangle* t) { return new Triangle(*t); });
57 if (pnt_a == pnt_b || pnt_a == pnt_c || pnt_b == pnt_c)
68 std::vector<std::size_t> ids(3);
116 if (surface.
getPointVec()->size() != mapping.size())
119 "internal error in resetPointIDs(): surface based on point vector "
120 "of size {}, given mapping vector has size {}",
125 auto& triangle = *surface[i];
126 const_cast<std::size_t&
>(triangle[0]) = mapping[triangle[0]];
127 const_cast<std::size_t&
>(triangle[1]) = mapping[triangle[1]];
128 const_cast<std::size_t&
>(triangle[2]) = mapping[triangle[2]];
134 if (surface.
getPointVec()->size() != used_points.size())
137 "internal error in markUsedPoints(): surface based on point vector "
138 "of size {}, given used_points has size {}",
139 surface.
getPointVec()->size(), used_points.size());
143 auto const& triangle = *surface[i];
144 for (std::size_t k = 0; k < 3; ++k)
146 used_points[triangle[k]] =
true;
Definition of the AABB class.
Definition of analytical geometry functions.
Definition of the Polygon class.
Definition of the PolyLine class.
Class AABB is an axis aligned bounding box around a given set of geometric points of (template) type ...
A Surface is represented by Triangles. It consists of a reference to a vector of (pointers to) points...
std::unique_ptr< AABB > _bounding_volume
std::unique_ptr< SurfaceGrid > _surface_grid
const Triangle * operator[](std::size_t i) const
const access operator for the access to the i-th Triangle of the surface.
const std::vector< Point * > & _sfc_pnts
std::vector< Triangle * > _sfc_triangles
std::size_t getNumberOfTriangles() const
void addTriangle(std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c)
bool isPntInBoundingVolume(MathLib::Point3d const &pnt, double eps) const
const std::vector< Point * > * getPointVec() const
Surface(const std::vector< Point * > &pnt_vec)
bool isPntInSfc(MathLib::Point3d const &pnt, double eps) const
Class Triangle consists of a reference to a point vector and a vector that stores the indices in the ...
void markUsedPoints(Polyline const &polyline, std::vector< bool > &used_points)
Resets the point IDs of the polyline corresponding to the mapping.
void resetPointIDs(Polyline &polyline, std::vector< std::size_t > const &mapping)
Resets the point IDs of the polyline corresponding to the mapping.
bool operator==(LineSegment const &s0, LineSegment const &s1)