![]() |
OGS
|
Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) Distributed under a Modified BSD License. See accompanying file LICENSE.txt or http://www.opengeosys.org/project/license
Contains all functionality concerned with defining and obtaining information about geometric objects such as points, (poly-)lines, polygones, surfaces, etc. Also includes additional algorithms for modifying such data.
Namespaces | |
IO | |
Classes | |
class | QuadTree |
class | AABB |
Class AABB is an axis aligned bounding box around a given set of geometric points of (template) type PNT_TYPE. More... | |
class | DuplicateGeometry |
class | EarClippingTriangulation |
struct | GeoObject |
class | GEOObjects |
Container class for geometric objects. More... | |
class | Grid |
class | LineSegment |
class | MinimalBoundingSphere |
class | OctTree |
class | Point |
class | PointVec |
This class manages pointers to Points in a std::vector along with a name. It also handles the deleting of points. Additionally, each vector of points is identified by a unique name from class GEOObject. For this reason PointVec should have a name. More... | |
class | Polygon |
class | PolygonWithSegmentMarker |
class | Polyline |
Class Polyline consists mainly of a reference to a point vector and a vector that stores the indices in the point vector. A polyline consists of at least one line segment. The polyline is specified by the points of the line segments. The class Polyline stores ids of pointers to the points in the _ply_pnt_ids vector. More... | |
class | PolylineWithSegmentMarker |
struct | RasterHeader |
Contains the relevant information when storing a geoscientific raster data. More... | |
class | Raster |
Class Raster is used for managing raster data. More... | |
class | SimplePolygonTree |
This class computes and stores the topological relations between polygons. Every node of the SimplePolygonTree represents a polygon. A child node c of a parent node p mean that the polygon represented by c is contained in the polygon represented by p. More... | |
class | Station |
A Station (observation site) is basically a Point with some additional information. More... | |
class | StationBorehole |
A borehole as a geometric object. More... | |
class | Surface |
A Surface is represented by Triangles. It consists of a reference to a vector of (pointers to) points (_sfc_pnts) and a vector that stores the Triangles consisting of points from _sfc_pnts. More... | |
class | SurfaceGrid |
class | TemplateVec |
The class TemplateVec takes a unique name and manages a std::vector of pointers to data elements of type T. More... | |
class | Triangle |
Class Triangle consists of a reference to a point vector and a vector that stores the indices in the point vector. A surface is composed by triangles. The class Surface stores the position of pointers to the points of triangles in the _pnt_ids vector. More... | |
Typedefs | |
using | PolylineVec = TemplateVec< GeoLib::Polyline > |
class PolylineVec encapsulate a std::vector of Polylines additional one can give the vector of polylines a name More... | |
using | SurfaceVec = TemplateVec< GeoLib::Surface > |
Enumerations | |
enum | Orientation { CW = -1 , COLLINEAR = 0 , CCW = 1 } |
enum class | GEOTYPE { POINT , POLYLINE , SURFACE } |
enum class | EdgeType { TOUCHING , CROSSING , INESSENTIAL } |
enum class | Location { LEFT , RIGHT , BEYOND , BEHIND , BETWEEN , SOURCE , DESTINATION } |
Functions | |
template<typename InputIterator > | |
std::pair< Eigen::Vector3d, double > | getNewellPlane (InputIterator pnts_begin, InputIterator pnts_end) |
template<class T_POINT > | |
std::pair< Eigen::Vector3d, double > | getNewellPlane (const std::vector< T_POINT * > &pnts) |
template<class T_POINT > | |
std::pair< Eigen::Vector3d, double > | getNewellPlane (const std::vector< T_POINT > &pnts) |
template<typename InputIterator > | |
void | rotatePoints (Eigen::Matrix3d const &rot_mat, InputIterator pnts_begin, InputIterator pnts_end) |
template<typename InputIterator1 , typename InputIterator2 > | |
Eigen::Matrix3d | rotatePointsToXY (InputIterator1 p_pnts_begin, InputIterator1 p_pnts_end, InputIterator2 r_pnts_begin, InputIterator2 r_pnts_end) |
template<typename P > | |
void | rotatePoints (Eigen::Matrix3d const &rot_mat, std::vector< P * > const &pnts) |
Orientation | getOrientation (MathLib::Point3d const &p0, MathLib::Point3d const &p1, MathLib::Point3d const &p2) |
Orientation | getOrientationFast (MathLib::Point3d const &p0, MathLib::Point3d const &p1, MathLib::Point3d const &p2) |
bool | parallel (Eigen::Vector3d v, Eigen::Vector3d w) |
bool | lineSegmentIntersect (GeoLib::LineSegment const &s0, GeoLib::LineSegment const &s1, GeoLib::Point &s) |
bool | lineSegmentsIntersect (const GeoLib::Polyline *ply, GeoLib::Polyline::SegmentIterator &seg_it0, GeoLib::Polyline::SegmentIterator &seg_it1, GeoLib::Point &intersection_pnt) |
void | rotatePoints (Eigen::Matrix3d const &rot_mat, std::vector< GeoLib::Point * > &pnts) |
Eigen::Matrix3d | computeRotationMatrixToXY (Eigen::Vector3d const &n) |
Eigen::Matrix3d | rotatePointsToXY (std::vector< GeoLib::Point * > &pnts) |
std::unique_ptr< GeoLib::Point > | triangleLineIntersection (MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &c, MathLib::Point3d const &p, MathLib::Point3d const &q) |
void | computeAndInsertAllIntersectionPoints (GeoLib::PointVec &pnt_vec, std::vector< GeoLib::Polyline * > &plys) |
GeoLib::Polygon | rotatePolygonToXY (GeoLib::Polygon const &polygon_in, Eigen::Vector3d &plane_normal) |
std::vector< MathLib::Point3d > | lineSegmentIntersect2d (GeoLib::LineSegment const &ab, GeoLib::LineSegment const &cd) |
void | sortSegments (MathLib::Point3d const &seg_beg_pnt, std::vector< GeoLib::LineSegment > &sub_segments) |
Eigen::Matrix3d | compute2DRotationMatrixToX (Eigen::Vector3d const &v) |
Eigen::Matrix3d | compute3DRotationMatrixToX (Eigen::Vector3d const &v) |
Eigen::Matrix3d | rotatePointsToXY (std::vector< Point * > &pnts) |
void | computeAndInsertAllIntersectionPoints (PointVec &pnt_vec, std::vector< Polyline * > &plys) |
void | sortSegments (MathLib::Point3d const &seg_beg_pnt, std::vector< LineSegment > &sub_segments) |
void | markUnusedPoints (GEOObjects const &geo_objects, std::string const &geo_name, std::vector< bool > &transfer_pnts) |
int | geoPointsToStations (GEOObjects &geo_objects, std::string const &geo_name, std::string &stn_name, bool const only_unused_pnts=true) |
Constructs a station-vector based on the points of a given geometry. More... | |
std::string | convertGeoTypeToString (GEOTYPE geo_type) |
std::ostream & | operator<< (std::ostream &os, LineSegment const &s) |
std::ostream & | operator<< (std::ostream &os, std::pair< GeoLib::LineSegment const &, GeoLib::LineSegment const & > const &seg_pair) |
bool | operator== (LineSegment const &s0, LineSegment const &s1) |
bool | operator== (Polygon const &lhs, Polygon const &rhs) |
bool | containsEdge (const Polyline &ply, std::size_t id0, std::size_t id1) |
bool | operator== (Polyline const &lhs, Polyline const &rhs) |
bool | pointsAreIdentical (const std::vector< Point * > &pnt_vec, std::size_t i, std::size_t j, double prox) |
template<typename POLYGONTREETYPE > | |
void | createPolygonTrees (std::list< POLYGONTREETYPE * > &list_of_simple_polygon_hierarchies) |
bool | isStation (GeoLib::Point const *pnt) |
bool | isBorehole (GeoLib::Point const *pnt) |
bool | operator== (Surface const &lhs, Surface const &rhs) |
using GeoLib::SurfaceVec = typedef TemplateVec<GeoLib::Surface> |
Class SurfaceVec encapsulate a std::vector of Surfaces and a name.
Definition at line 27 of file SurfaceVec.h.
|
strong |
Enumerator | |
---|---|
LEFT | |
RIGHT | |
BEYOND | |
BEHIND | |
BETWEEN | |
SOURCE | |
DESTINATION |
Definition at line 30 of file Polyline.h.
enum GeoLib::Orientation |
Eigen::Matrix3d GeoLib::compute2DRotationMatrixToX | ( | Eigen::Vector3d const & | v | ) |
Computes a rotation matrix that rotates the given 2D normal vector parallel to X-axis
v | a 2D normal vector to be rotated |
Definition at line 712 of file AnalyticalGeometry.cpp.
Referenced by detail::getRotationMatrixToGlobal().
Eigen::Matrix3d GeoLib::compute3DRotationMatrixToX | ( | Eigen::Vector3d const & | v | ) |
Computes a rotation matrix that rotates the given 3D normal vector parallel to X-axis
v | a 3D normal vector to be rotated |
Definition at line 724 of file AnalyticalGeometry.cpp.
Referenced by detail::getRotationMatrixToGlobal().
void GeoLib::computeAndInsertAllIntersectionPoints | ( | PointVec & | pnt_vec, |
std::vector< Polyline * > & | plys | ||
) |
Method first computes the intersection points of line segments of Polyline objects (
Definition at line 412 of file AnalyticalGeometry.cpp.
References GeoLib::Polyline::begin(), GeoLib::Polyline::end(), GeoLib::Polyline::insertPoint(), lineSegmentIntersect(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::computeAndInsertAllIntersectionPoints | ( | PointVec & | pnt_vec, |
std::vector< Polyline * > & | plys | ||
) |
Method first computes the intersection points of line segments of Polyline objects (
Definition at line 412 of file AnalyticalGeometry.cpp.
References GeoLib::Polyline::begin(), GeoLib::Polyline::end(), GeoLib::Polyline::insertPoint(), lineSegmentIntersect(), GeoLib::PointVec::push_back(), and GeoLib::TemplateVec< T >::size().
Referenced by FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
Eigen::Matrix3d GeoLib::computeRotationMatrixToXY | ( | Eigen::Vector3d const & | n | ) |
Method computes the rotation matrix that rotates the given vector parallel to the \(z\) axis.
n | the (3d) vector that is rotated parallel to the \(z\) axis |
Definition at line 303 of file AnalyticalGeometry.cpp.
Referenced by detail::getRotationMatrixToGlobal(), MeshGeoToolsLib::markNodesOutSideOfPolygon(), rotateGeometryToXY(), rotatePointsToXY(), and rotatePolygonToXY().
bool GeoLib::containsEdge | ( | const Polyline & | ply, |
std::size_t | id0, | ||
std::size_t | id1 | ||
) |
Definition at line 510 of file Polyline.cpp.
References ERR(), GeoLib::Polyline::getNumberOfPoints(), and GeoLib::Polyline::getPointID().
Referenced by FileIO::GMSH::GMSHPolygonTree::markSharedSegments(), and FileIO::GMSH::GMSHPolygonTree::writeLineConstraints().
std::string GeoLib::convertGeoTypeToString | ( | GEOTYPE | geo_type | ) |
Definition at line 23 of file GeoType.cpp.
References OGS_FATAL, POINT, POLYLINE, and SURFACE.
Referenced by GEOModels::addNameForElement(), GEOModels::addNameForObjectPoints(), GeoLib::GEOObjects::getGeoObject(), and MainWindow::showGeoNameDialog().
void GeoLib::createPolygonTrees | ( | std::list< POLYGONTREETYPE * > & | list_of_simple_polygon_hierarchies | ) |
creates from a list of simple polygons a list of trees (SimplePolygonTrees)
Definition at line 97 of file SimplePolygonTree.h.
int GeoLib::geoPointsToStations | ( | GEOObjects & | geo_objects, |
std::string const & | geo_name, | ||
std::string & | stn_name, | ||
bool const | only_unused_pnts | ||
) |
Constructs a station-vector based on the points of a given geometry.
Definition at line 698 of file GEOObjects.cpp.
References GeoLib::GEOObjects::addStationVec(), ERR(), GeoLib::PointVec::getItemNameByID(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::TemplateVec< T >::getVector(), markUnusedPoints(), MaterialPropertyLib::name, and WARN().
Referenced by MainWindow::convertPointsToStations().
std::pair< Eigen::Vector3d, double > GeoLib::getNewellPlane | ( | const std::vector< T_POINT * > & | pnts | ) |
compute a supporting plane (represented by plane_normal and the value d) for the polygon Let \(n\) be the plane normal and \(d\) a parameter. Then for all points \(p \in R^3\) of the plane it holds \( n \cdot p + d = 0\). The Newell algorithm is described in [10] .
pnts | points of a closed polyline describing a polygon |
Definition at line 44 of file AnalyticalGeometry-impl.h.
References getNewellPlane().
std::pair< Eigen::Vector3d, double > GeoLib::getNewellPlane | ( | const std::vector< T_POINT > & | pnts | ) |
std::pair< Eigen::Vector3d, double > GeoLib::getNewellPlane | ( | InputIterator | pnts_begin, |
InputIterator | pnts_end | ||
) |
compute a supporting plane (represented by plane_normal and the value d) for the polygon Let \(n\) be the plane normal and \(d\) a parameter. Then for all points \(p \in R^3\) of the plane it holds \( n \cdot p + d = 0\). The Newell algorithm is described in [10] .
pnts_begin | Iterator pointing to the initial point of a closed polyline describing a polygon |
pnts_end | Iterator pointing to the element following the last point of a closed polyline describing a polygon |
Definition at line 14 of file AnalyticalGeometry-impl.h.
Referenced by getNewellPlane(), detail::getRotationMatrixToGlobal(), rotateGeometryToXY(), rotatePointsToXY(), and rotatePolygonToXY().
Orientation GeoLib::getOrientation | ( | MathLib::Point3d const & | p0, |
MathLib::Point3d const & | p1, | ||
MathLib::Point3d const & | p2 | ||
) |
Computes the orientation of the three 2D-Points. This is a robust method.
Definition at line 52 of file AnalyticalGeometry.cpp.
References CCW, COLLINEAR, CW, and ExactPredicates::getOrientation2d().
Referenced by GeoLib::EarClippingTriangulation::clipEars(), GeoLib::Polygon::ensureCCWOrientation(), GeoLib::EarClippingTriangulation::ensureCWOrientation(), GeoLib::EarClippingTriangulation::initLists(), and lineSegmentIntersect2d().
Orientation GeoLib::getOrientationFast | ( | MathLib::Point3d const & | p0, |
MathLib::Point3d const & | p1, | ||
MathLib::Point3d const & | p2 | ||
) |
Computes the orientation of the three 2D-Points. This is a non-robust method.
Definition at line 68 of file AnalyticalGeometry.cpp.
References CCW, COLLINEAR, CW, and ExactPredicates::getOrientation2dFast().
Referenced by MeshLib::ProjectPointOnMesh::getProjectedElement().
bool GeoLib::isBorehole | ( | GeoLib::Point const * | pnt | ) |
Definition at line 106 of file StationBorehole.cpp.
Referenced by MeshGeoToolsLib::GeoMapper::mapStationData(), and VtkStationSource::RequestData().
bool GeoLib::isStation | ( | GeoLib::Point const * | pnt | ) |
Definition at line 76 of file Station.cpp.
Referenced by MeshGeoToolsLib::GeoMapper::mapOnDEM(), and MeshGeoToolsLib::GeoMapper::mapOnMesh().
bool GeoLib::lineSegmentIntersect | ( | LineSegment const & | s0, |
LineSegment const & | s1, | ||
Point & | s | ||
) |
A line segment is given by its two end-points. The function checks, if the two line segments (ab) and (cd) intersects.
s0 | the first line segment. |
s1 | the second line segment. |
s | the intersection point if the segments do intersect |
Definition at line 141 of file AnalyticalGeometry.cpp.
References MaterialPropertyLib::c, GeoLib::LineSegment::getBeginPoint(), MathLib::TemplatePoint< T, DIM >::getCoords(), GeoLib::LineSegment::getEndPoint(), MathLib::isCoplanar(), parallel(), and MathLib::sqrDist().
Referenced by FileIO::GMSH::GMSHPolygonTree::checkIntersectionsSegmentExistingPolylines(), computeAndInsertAllIntersectionPoints(), GeoLib::Polygon::getAllIntersectionPoints(), GeoLib::Polygon::getNextIntersectionPointPolygonLine(), and lineSegmentsIntersect().
std::vector< MathLib::Point3d > GeoLib::lineSegmentIntersect2d | ( | LineSegment const & | ab, |
LineSegment const & | cd | ||
) |
A line segment is given by its two end-points. The function checks, if the two line segments (ab) and (cd) intersects. This method checks the intersection only in 2d.
ab | first line segment |
cd | second line segment |
Definition at line 476 of file AnalyticalGeometry.cpp.
References MaterialPropertyLib::c, GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), getOrientation(), OGS_FATAL, MathLib::q, and MathLib::sqrDist2d().
Referenced by MeshGeoToolsLib::computeElementSegmentIntersections().
bool GeoLib::lineSegmentsIntersect | ( | const Polyline * | ply, |
Polyline::SegmentIterator & | seg_it0, | ||
Polyline::SegmentIterator & | seg_it1, | ||
Point & | intersection_pnt | ||
) |
test for intersections of the line segments of the Polyline
ply | the polyline |
seg_it0 | iterator pointing to the first segment that has an intersection |
seg_it1 | iterator pointing to the second segment that has an intersection |
intersection_pnt | the intersection point if the segments intersect |
Definition at line 269 of file AnalyticalGeometry.cpp.
References GeoLib::Polyline::begin(), GeoLib::Polyline::end(), GeoLib::Polyline::getNumberOfSegments(), GeoLib::Polyline::SegmentIterator::getSegmentNumber(), and lineSegmentIntersect().
Referenced by GeoLib::Polygon::splitPolygonAtIntersection().
void GeoLib::markUnusedPoints | ( | GEOObjects const & | geo_objects, |
std::string const & | geo_name, | ||
std::vector< bool > & | transfer_pnts | ||
) |
Definition at line 660 of file GEOObjects.cpp.
References GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::GEOObjects::getSurfaceVecObj(), and GeoLib::TemplateVec< T >::getVector().
Referenced by geoPointsToStations().
std::ostream & GeoLib::operator<< | ( | std::ostream & | os, |
LineSegment const & | s | ||
) |
Definition at line 86 of file LineSegment.cpp.
References GeoLib::LineSegment::getBeginPoint(), and GeoLib::LineSegment::getEndPoint().
std::ostream & GeoLib::operator<< | ( | std::ostream & | os, |
std::pair< GeoLib::LineSegment const &, GeoLib::LineSegment const & > const & | seg_pair | ||
) |
Definition at line 92 of file LineSegment.cpp.
bool GeoLib::operator== | ( | LineSegment const & | s0, |
LineSegment const & | s1 | ||
) |
Compares two objects of type LineSegment.
Definition at line 100 of file LineSegment.cpp.
References GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), and MathLib::sqrDist().
comparison operator for polygons
lhs | the first polygon |
rhs | the second polygon |
Definition at line 521 of file Polygon.cpp.
comparison operator
lhs | first polyline |
rhs | second polyline |
Definition at line 538 of file Polyline.cpp.
References GeoLib::Polyline::getNumberOfPoints(), and GeoLib::Polyline::getPointID().
Definition at line 109 of file Surface.cpp.
bool GeoLib::parallel | ( | Eigen::Vector3d | v, |
Eigen::Vector3d | w | ||
) |
Check if the two vectors \(v, w \in R^3\) are in parallel
v | first vector |
w | second vector |
Definition at line 85 of file AnalyticalGeometry.cpp.
Referenced by lineSegmentIntersect().
bool GeoLib::pointsAreIdentical | ( | const std::vector< Point * > & | pnt_vec, |
std::size_t | i, | ||
std::size_t | j, | ||
double | prox | ||
) |
Definition at line 557 of file Polyline.cpp.
References MathLib::sqrDist().
Referenced by GeoLib::Polyline::constructPolylineFromSegments().
void GeoLib::rotatePoints | ( | Eigen::Matrix3d const & | rot_mat, |
InputIterator | pnts_begin, | ||
InputIterator | pnts_end | ||
) |
rotate points according to the rotation matrix
rot_mat | 3x3 dimensional rotation matrix |
pnts_begin | Iterator pointing to the initial element in a vector of points to be rotated |
pnts_end | Iterator pointing to the element following the last element in a vector of points to be rotated |
Definition at line 75 of file AnalyticalGeometry-impl.h.
Referenced by MeshGeoToolsLib::markNodesOutSideOfPolygon(), rotateGeometryToXY(), rotateMesh(), rotatePoints(), rotatePointsToXY(), rotatePolygonToXY(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::rotatePoints | ( | Eigen::Matrix3d const & | rot_mat, |
std::vector< GeoLib::Point * > & | pnts | ||
) |
Definition at line 297 of file AnalyticalGeometry.cpp.
References rotatePoints().
void GeoLib::rotatePoints | ( | Eigen::Matrix3d const & | rot_mat, |
std::vector< P * > const & | pnts | ||
) |
rotate points according to the rotation matrix
rot_mat | 3x3 dimensional rotation matrix |
pnts | vector of points |
Definition at line 110 of file AnalyticalGeometry-impl.h.
References rotatePoints().
Eigen::Matrix3d GeoLib::rotatePointsToXY | ( | InputIterator1 | p_pnts_begin, |
InputIterator1 | p_pnts_end, | ||
InputIterator2 | r_pnts_begin, | ||
InputIterator2 | r_pnts_end | ||
) |
rotate points to X-Y plane
p_pnts_begin | Iterator pointing to the initial element in a vector of points used for computing a rotation matrix |
p_pnts_end | Iterator pointing to the element following the last point in a vector of points used for computing a rotation matrix |
r_pnts_begin | Iterator pointing to the initial element in a vector of points to be rotated |
r_pnts_end | Iterator pointing to the element following the last point in a vector of points to be rotated Points are rotated using a rotation matrix computed from the first three points in the vector. Point coordinates are modified as a result of the rotation. |
Definition at line 86 of file AnalyticalGeometry-impl.h.
References computeRotationMatrixToXY(), getNewellPlane(), and rotatePoints().
Referenced by GeoLib::EarClippingTriangulation::EarClippingTriangulation(), GeoLib::Polygon::ensureCCWOrientation(), rotatePointsToXY(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
Eigen::Matrix3d GeoLib::rotatePointsToXY | ( | std::vector< Point * > & | pnts | ) |
rotate points to X-Y plane
pnts | a vector of points with a minimum length of three. Points are rotated using a rotation matrix computed from the first three points in the vector. Point coordinates are modified as a result of the rotation. |
Definition at line 366 of file AnalyticalGeometry.cpp.
References rotatePointsToXY().
Eigen::Matrix3d GeoLib::rotatePointsToXY | ( | std::vector< Point * > & | pnts | ) |
rotate points to X-Y plane
pnts | a vector of points with a minimum length of three. Points are rotated using a rotation matrix computed from the first three points in the vector. Point coordinates are modified as a result of the rotation. |
Definition at line 366 of file AnalyticalGeometry.cpp.
References rotatePointsToXY().
Function rotates a polygon to the xy plane. For this reason, (1) the points of the given polygon are copied, (2) a so called Newell plane is computed (getNewellPlane()) and the points are rotated, (3) for security the \(z\) coordinates of the rotated points are set to zero and finally, (4) a new polygon is constructed using the rotated points.
polygon_in | a copy of the polygon_in polygon will be rotated |
plane_normal | the normal of the original Newell plane |
Definition at line 445 of file AnalyticalGeometry.cpp.
References GeoLib::Polyline::addPoint(), computeRotationMatrixToXY(), getNewellPlane(), GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPoint(), and rotatePoints().
Referenced by MeshGeoToolsLib::markNodesOutSideOfPolygon().
void GeoLib::sortSegments | ( | MathLib::Point3d const & | seg_beg_pnt, |
std::vector< LineSegment > & | sub_segments | ||
) |
Sorts the vector of segments such that the \(i\)-th segment is connected with the \(i+1\)st segment, i.e. the end point of the \(i\)-th segment is the start point of the \(i+1\)st segment. The current implementation requires that all segments have to be connectable. In order to obtain a unique result the segments are sorted such that the begin point of the first segment is seg_beg_pnt
.
Definition at line 654 of file AnalyticalGeometry.cpp.
References MathLib::sqrDist().
Referenced by MeshGeoToolsLib::mapLineSegment().
void GeoLib::sortSegments | ( | MathLib::Point3d const & | seg_beg_pnt, |
std::vector< LineSegment > & | sub_segments | ||
) |
Sorts the vector of segments such that the \(i\)-th segment is connected with the \(i+1\)st segment, i.e. the end point of the \(i\)-th segment is the start point of the \(i+1\)st segment. The current implementation requires that all segments have to be connectable. In order to obtain a unique result the segments are sorted such that the begin point of the first segment is seg_beg_pnt
.
Definition at line 654 of file AnalyticalGeometry.cpp.
References MathLib::sqrDist().
Referenced by MeshGeoToolsLib::mapLineSegment().
std::unique_ptr< Point > GeoLib::triangleLineIntersection | ( | MathLib::Point3d const & | a, |
MathLib::Point3d const & | b, | ||
MathLib::Point3d const & | c, | ||
MathLib::Point3d const & | p, | ||
MathLib::Point3d const & | q | ||
) |
Calculates the intersection points of a line PQ and a triangle ABC. This method requires ABC to be counterclockwise and PQ to point downward.
Definition at line 371 of file AnalyticalGeometry.cpp.
References MaterialPropertyLib::c, MathLib::TemplatePoint< T, DIM >::getCoords(), and MathLib::q.
Referenced by MeshGeoToolsLib::GeoMapper::getMeshElevation().