OGS
|
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.
#include <Surface.h>
Public Member Functions | |
Surface (const std::vector< Point * > &pnt_vec) | |
Surface (Surface const &src) | |
~Surface () override | |
Surface (Surface &&src)=delete | |
Surface & | operator= (Surface const &src)=delete |
Surface & | operator= (Surface &&src)=delete |
GEOTYPE | getGeoType () const override |
return a geometry type | |
void | addTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c) |
std::size_t | getNumberOfTriangles () const |
const Triangle * | operator[] (std::size_t i) const |
const access operator for the access to the i-th Triangle of the surface. | |
bool | isPntInBoundingVolume (MathLib::Point3d const &pnt, double eps) const |
bool | isPntInSfc (MathLib::Point3d const &pnt, double eps) const |
const std::vector< Point * > * | getPointVec () const |
AABB const & | getAABB () const |
Public Member Functions inherited from GeoLib::GeoObject | |
virtual | ~GeoObject ()=default |
Protected Attributes | |
const std::vector< Point * > & | _sfc_pnts |
std::vector< Triangle * > | _sfc_triangles |
std::unique_ptr< AABB > | _bounding_volume |
std::unique_ptr< SurfaceGrid > | _surface_grid |
|
explicit |
Definition at line 24 of file Surface.cpp.
GeoLib::Surface::Surface | ( | Surface const & | src | ) |
Definition at line 29 of file Surface.cpp.
References _sfc_triangles.
|
override |
Definition at line 41 of file Surface.cpp.
References _sfc_triangles.
|
delete |
void GeoLib::Surface::addTriangle | ( | std::size_t | pnt_a, |
std::size_t | pnt_b, | ||
std::size_t | pnt_c ) |
adds three indices describing a triangle and updates the bounding box
Definition at line 49 of file Surface.cpp.
References _bounding_volume, _sfc_pnts, _sfc_triangles, and _surface_grid.
Referenced by anonymous_namespace{convertMeshToGeo.cpp}::addElementToSurface().
|
inline |
method allows access to the internal axis aligned bounding box
Definition at line 78 of file Surface.h.
References _bounding_volume.
|
inlineoverridevirtual |
return a geometry type
Implements GeoLib::GeoObject.
Definition at line 44 of file Surface.h.
References GeoLib::SURFACE.
std::size_t GeoLib::Surface::getNumberOfTriangles | ( | ) | const |
returns the number of triangles describing the Surface
Definition at line 82 of file Surface.cpp.
References _sfc_triangles.
Referenced by GEOModels::addNameForObjectPoints(), GeoLib::IO::BoostXmlGmlInterface::addSurfacesToPropertyTree(), MeshToolsLib::convertSurfaceToMesh(), GeoLib::markUsedPoints(), GeoLib::GEOObjects::mergeSurfaces(), GeoLib::resetPointIDs(), GeoLib::SurfaceGrid::sortTrianglesInGridCells(), and GeoLib::IO::TINInterface::writeSurfaceAsTIN().
|
inline |
Definition at line 73 of file Surface.h.
References _sfc_pnts.
Referenced by GeoLib::markUsedPoints(), and GeoLib::resetPointIDs().
bool GeoLib::Surface::isPntInBoundingVolume | ( | MathLib::Point3d const & | pnt, |
double | eps ) const |
is the given point in the bounding volume of the surface
Definition at line 93 of file Surface.cpp.
References _bounding_volume.
Referenced by MeshGeoToolsLib::MeshNodesAlongSurface::MeshNodesAlongSurface().
bool GeoLib::Surface::isPntInSfc | ( | MathLib::Point3d const & | pnt, |
double | eps ) const |
is the given point pnt located in the surface
pnt | the point |
eps | geometric tolerance for the search |
Definition at line 99 of file Surface.cpp.
References _surface_grid.
Referenced by MeshGeoToolsLib::MeshNodesAlongSurface::MeshNodesAlongSurface().
const Triangle * GeoLib::Surface::operator[] | ( | std::size_t | i | ) | const |
const access operator for the access to the i-th Triangle of the surface.
Definition at line 87 of file Surface.cpp.
References _sfc_triangles.
|
protected |
bounding volume is an axis aligned bounding box
Definition at line 86 of file Surface.h.
Referenced by addTriangle(), getAABB(), and isPntInBoundingVolume().
|
protected |
a vector of pointers to Points
Definition at line 82 of file Surface.h.
Referenced by addTriangle(), and getPointVec().
|
protected |
position of pointers to the geometric points
Definition at line 84 of file Surface.h.
Referenced by Surface(), ~Surface(), addTriangle(), getNumberOfTriangles(), and operator[]().
|
mutableprotected |
The surface grid is a helper data structure to accelerate the point search. The method addTriangle() invalidates/resets the surface grid. A valid surface grid is created in case the const method isPntInSfc() is called and a valid surface grid is not existing.
Definition at line 91 of file Surface.h.
Referenced by addTriangle(), and isPntInSfc().