OGS
|
This module consists of classes governing geometric objects and related algorithms.
Namespaces | |
namespace | IO |
Classes | |
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 |
struct | MinMaxPoints |
struct | NamedRaster |
class | OctTree |
class | Point |
class | PointVec |
This class manages pointers to Points in a std::vector along with a name. It also handles the deletion of points. Furthermore, typically, PointVec objects are managed by GEOObjects using the instance name for identification. For this reason PointVec must have a unique 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 |
class | QuadTree |
class | Raster |
Class Raster is used for managing raster data. More... | |
struct | RasterHeader |
Contains the relevant information when storing a geoscientific 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 | |
using | SurfaceVec = TemplateVec<GeoLib::Surface> |
Enumerations | |
enum | Orientation { CW = -1 , COLLINEAR = 0 , CCW = 1 } |
enum class | GEOTYPE { POINT , POLYLINE , SURFACE } |
enum class | Location { LEFT , RIGHT , BEYOND , BEHIND , BETWEEN , SOURCE , DESTINATION } |
enum class | EdgeType { TOUCHING , CROSSING , INESSENTIAL } |
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) |
std::tuple< std::vector< GeoLib::Point * >, Eigen::Vector3d > | rotatePolygonPointsToXY (GeoLib::Polygon const &polygon_in) |
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) |
template<typename Container > | |
auto | findVectorByName (Container const &container, std::string const &name) |
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. | |
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) |
Location | getLocationOfPoint (MathLib::Point3d const &source, MathLib::Point3d const &destination, MathLib::Point3d const &pnt) |
EdgeType | getEdgeType (MathLib::Point3d const &a, MathLib::Point3d const &b, MathLib::Point3d const &pnt) |
std::vector< GeoLib::Point > | getAllIntersectionPoints (Polygon const &polygon, GeoLib::LineSegment const &segment) |
bool | operator== (Polygon const &lhs, Polygon const &rhs) |
void | resetPointIDs (Polyline &polyline, std::vector< std::size_t > const &mapping) |
Resets the point IDs of the polyline corresponding to the mapping. | |
void | markUsedPoints (Polyline const &polyline, std::vector< bool > &used_points) |
Resets the point IDs of the polyline corresponding to the mapping. | |
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) |
std::unique_ptr< Polyline > | createPolyline (GeoLib::PointVec const &points_vec, std::vector< std::size_t > &&point_ids) |
Create a polyline from given point ids. | |
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) |
void | resetPointIDs (Surface &surface, std::vector< std::size_t > const &mapping) |
Resets the point IDs of the surface corresponding to the mapping. | |
void | markUsedPoints (Surface const &surface, std::vector< bool > &used_points) |
std::vector< GeoLib::Point * > | generateEquidistantPoints (MathLib::Point3d const &begin, MathLib::Point3d const &end, int const number_of_subdivisions) |
class PolylineVec encapsulate a std::vector of Polylines additional one can give the vector of polylines a name
Definition at line 27 of file PolylineVec.h.
using GeoLib::SurfaceVec = TemplateVec<GeoLib::Surface> |
Class SurfaceVec encapsulate a std::vector of Surfaces and a name.
Definition at line 28 of file SurfaceVec.h.
|
strong |
edge classification
Enumerator | |
---|---|
TOUCHING | TOUCHING. |
CROSSING | CROSSING. |
INESSENTIAL | INESSENTIAL. |
Definition at line 38 of file Polygon.cpp.
|
strong |
|
strong |
Enumerator | |
---|---|
LEFT | |
RIGHT | |
BEYOND | |
BEHIND | |
BETWEEN | |
SOURCE | |
DESTINATION |
Definition at line 24 of file Polygon.cpp.
enum GeoLib::Orientation |
Enumerator | |
---|---|
CW | |
COLLINEAR | |
CCW |
Definition at line 24 of file AnalyticalGeometry.h.
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 695 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 707 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 402 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 402 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 299 of file AnalyticalGeometry.cpp.
Referenced by detail::getRotationMatrixToGlobal(), MeshGeoToolsLib::markNodesOutSideOfPolygon(), rotateGeometryToXY(), rotatePointsToXY(), and rotatePolygonPointsToXY().
bool GeoLib::containsEdge | ( | const Polyline & | ply, |
std::size_t | id0, | ||
std::size_t | id1 ) |
Definition at line 505 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 90 of file SimplePolygonTree.h.
Referenced by FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
std::unique_ptr< Polyline > GeoLib::createPolyline | ( | GeoLib::PointVec const & | points_vec, |
std::vector< std::size_t > && | point_ids ) |
Create a polyline from given point ids.
Definition at line 564 of file Polyline.cpp.
References GeoLib::PointVec::getIDMap(), GeoLib::TemplateVec< T >::getVector(), and WARN().
Referenced by generatePolylineGeometry(), and generateQuadGeometry().
auto GeoLib::findVectorByName | ( | Container const & | container, |
std::string const & | name ) |
Function to find PointVec, PolylineVec, or SurfaceVec pointers that are stored in the container
Definition at line 28 of file GEOObjects.cpp.
Referenced by GeoLib::GEOObjects::appendPolylineVec(), GeoLib::GEOObjects::appendSurfaceVec(), GeoLib::GEOObjects::exists(), GeoLib::GEOObjects::getSurfaceVec(), GeoLib::GEOObjects::getSurfaceVecObj(), GeoLib::GEOObjects::isPntVecUsed(), GeoLib::GEOObjects::removeSurfaceVec(), and GeoLib::GEOObjects::renameGeometry().
std::vector< GeoLib::Point * > GeoLib::generateEquidistantPoints | ( | MathLib::Point3d const & | begin, |
MathLib::Point3d const & | end, | ||
int const | number_of_subdivisions ) |
Function generates equidistant points in the interval [begin, end] according to the given number of subdivisions. In case of zero subdivisions a vector containing the begin and the end point is returned.
Definition at line 18 of file Utils.cpp.
References MathLib::Point3d::asEigenVector3d(), and OGS_FATAL.
Referenced by generatePolylineGeometry(), and generateQuadPoints().
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 611 of file GEOObjects.cpp.
References GeoLib::GEOObjects::addStationVec(), ERR(), GeoLib::PointVec::getItemNameByID(), GeoLib::GEOObjects::getPointVecObj(), GeoLib::TemplateVec< T >::getVector(), markUnusedPoints(), and WARN().
Referenced by MainWindow::convertPointsToStations().
std::vector< GeoLib::Point > GeoLib::getAllIntersectionPoints | ( | Polygon const & | polygon, |
GeoLib::LineSegment const & | segment ) |
Computes all intersections of the straight line segment and the polyline boundary
polygon | the polygon the segment line segment that will be processed |
segment | the line segment that will be processed |
Definition at line 189 of file Polygon.cpp.
References lineSegmentIntersect().
Referenced by GeoLib::Polygon::containsSegment().
EdgeType GeoLib::getEdgeType | ( | MathLib::Point3d const & | a, |
MathLib::Point3d const & | b, | ||
MathLib::Point3d const & | pnt ) |
from book: Computational Geometry and Computer Graphics in C++, page 119 get the type of edge with respect to the given point (2d method!)
a | first point of line segment |
b | last point of line segment |
pnt | point that is edge type computed for |
Definition at line 102 of file Polygon.cpp.
References BETWEEN, CROSSING, DESTINATION, getLocationOfPoint(), INESSENTIAL, LEFT, RIGHT, SOURCE, and TOUCHING.
Referenced by GeoLib::Polygon::isPntInPolygon().
Location GeoLib::getLocationOfPoint | ( | MathLib::Point3d const & | source, |
MathLib::Point3d const & | destination, | ||
MathLib::Point3d const & | pnt ) |
2D method - ignores z coordinate. It calculates the location of the point relative to the line segment specified by the points source and destination. (literature reference: Computational Geometry and Computer Graphics in C++; Michael J. Laszlo)
source | the first point of the line segment |
destination | the end point of the line segment |
pnt | the test point |
Definition at line 55 of file Polygon.cpp.
References BEHIND, BETWEEN, BEYOND, DESTINATION, LEFT, RIGHT, SOURCE, and MathLib::sqrDist().
Referenced by getEdgeType().
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 [14] .
pnts | points of a closed polyline describing a polygon |
Definition at line 46 of file AnalyticalGeometry-impl.h.
References getNewellPlane().
std::pair< Eigen::Vector3d, double > GeoLib::getNewellPlane | ( | const std::vector< T_POINT > & | pnts | ) |
Same as getNewellPlane(pnts).
Definition at line 53 of file AnalyticalGeometry-impl.h.
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 [14] .
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 rotatePolygonPointsToXY().
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::addLastTriangle(), GeoLib::EarClippingTriangulation::clipEars(), GeoLib::Polygon::ensureCCWOrientation(), GeoLib::EarClippingTriangulation::ensureCWOrientation(), MeshToolsLib::ProjectPointOnMesh::getProjectedElement(), 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().
bool GeoLib::isBorehole | ( | GeoLib::Point const * | pnt | ) |
Definition at line 106 of file StationBorehole.cpp.
Referenced by MeshGeoToolsLib::GeoMapper::mapStationData().
bool GeoLib::isStation | ( | GeoLib::Point const * | pnt | ) |
Definition at line 77 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 MathLib::Point3d::asEigenVector3d(), GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), parallel(), and MathLib::sqrDist().
Referenced by FileIO::GMSH::GMSHPolygonTree::checkIntersectionsSegmentExistingPolylines(), computeAndInsertAllIntersectionPoints(), 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 459 of file AnalyticalGeometry.cpp.
References GeoLib::LineSegment::getBeginPoint(), GeoLib::LineSegment::getEndPoint(), getOrientation(), OGS_FATAL, 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 265 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 573 of file GEOObjects.cpp.
References GeoLib::GEOObjects::getPolylineVecObj(), GeoLib::GEOObjects::getSurfaceVecObj(), and GeoLib::TemplateVec< T >::getVector().
Referenced by geoPointsToStations().
void GeoLib::markUsedPoints | ( | Polyline const & | polyline, |
std::vector< bool > & | used_points ) |
Resets the point IDs of the polyline corresponding to the mapping.
Definition at line 490 of file Polyline.cpp.
References GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointID(), GeoLib::Polyline::getPointsVec(), and OGS_FATAL.
Referenced by main().
void GeoLib::markUsedPoints | ( | Surface const & | surface, |
std::vector< bool > & | used_points ) |
Definition at line 132 of file Surface.cpp.
References GeoLib::Surface::getNumberOfTriangles(), GeoLib::Surface::getPointVec(), and OGS_FATAL.
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 596 of file Polygon.cpp.
comparison operator
lhs | first polyline |
rhs | second polyline |
Definition at line 533 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.
References parallel().
Referenced by lineSegmentIntersect(), and parallel().
bool GeoLib::pointsAreIdentical | ( | const std::vector< Point * > & | pnt_vec, |
std::size_t | i, | ||
std::size_t | j, | ||
double | prox ) |
Definition at line 552 of file Polyline.cpp.
References MathLib::sqrDist().
Referenced by GeoLib::Polyline::constructPolylineFromSegments().
void GeoLib::resetPointIDs | ( | Polyline & | polyline, |
std::vector< std::size_t > const & | mapping ) |
Resets the point IDs of the polyline corresponding to the mapping.
Definition at line 475 of file Polyline.cpp.
References GeoLib::Polyline::getNumberOfPoints(), GeoLib::Polyline::getPointID(), GeoLib::Polyline::getPointsVec(), OGS_FATAL, and GeoLib::Polyline::setPointID().
Referenced by main(), and FileIO::GMSH::GMSHPolygonTree::writeAdditionalPointData().
void GeoLib::resetPointIDs | ( | Surface & | surface, |
std::vector< std::size_t > const & | mapping ) |
Resets the point IDs of the surface corresponding to the mapping.
Definition at line 114 of file Surface.cpp.
References GeoLib::Surface::getNumberOfTriangles(), GeoLib::Surface::getPointVec(), and OGS_FATAL.
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 77 of file AnalyticalGeometry-impl.h.
Referenced by MeshGeoToolsLib::markNodesOutSideOfPolygon(), rotateGeometryToXY(), rotateMesh(), rotatePoints(), rotatePoints(), rotatePointsToXY(), rotatePolygonPointsToXY(), and FileIO::GMSH::GMSHInterface::writeGMSHInputFile().
void GeoLib::rotatePoints | ( | Eigen::Matrix3d const & | rot_mat, |
std::vector< GeoLib::Point * > & | pnts ) |
Definition at line 293 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 111 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 87 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 362 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 362 of file AnalyticalGeometry.cpp.
References rotatePointsToXY().
std::tuple< std::vector< GeoLib::Point * >, Eigen::Vector3d > GeoLib::rotatePolygonPointsToXY | ( | GeoLib::Polygon const & | polygon_in | ) |
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 accuracy reasons the \(z\) coordinates of the rotated points are set to zero
polygon_in | a copy of the polygon_in polygon will be rotated |
Definition at line 436 of file AnalyticalGeometry.cpp.
References 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 637 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 637 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 367 of file AnalyticalGeometry.cpp.
References MathLib::Point3d::asEigenVector3d().
Referenced by MeshGeoToolsLib::GeoMapper::getMeshElevation().