32 [](
Triangle* t) { return new Triangle(*t); });
51 if (pnt_a == pnt_b || pnt_a == pnt_c || pnt_b == pnt_c)
62 std::vector<std::size_t> ids(3);
110 if (surface.
getPointVec()->size() != mapping.size())
113 "internal error in resetPointIDs(): surface based on point vector "
114 "of size {}, given mapping vector has size {}",
119 auto& triangle = *surface[i];
120 const_cast<std::size_t&
>(triangle[0]) = mapping[triangle[0]];
121 const_cast<std::size_t&
>(triangle[1]) = mapping[triangle[1]];
122 const_cast<std::size_t&
>(triangle[2]) = mapping[triangle[2]];
128 if (surface.
getPointVec()->size() != used_points.size())
131 "internal error in markUsedPoints(): surface based on point vector "
132 "of size {}, given used_points has size {}",
133 surface.
getPointVec()->size(), used_points.size());
137 auto const& triangle = *surface[i];
138 for (std::size_t k = 0; k < 3; ++k)
140 used_points[triangle[k]] =
true;
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)