PLaSK library
|
Index which allows for fast finding elements which includes particular points. More...
#include <plask/mesh/triangular2d.hpp>
Public Types | |
typedef boost::geometry::model::box< Vec< 2 > > | Box |
typedef boost::geometry::index::rtree< std::pair< Box, std::size_t >, boost::geometry::index::quadratic< 16 > > | Rtree |
Public Member Functions | |
ElementIndex (const TriangularMesh2D &mesh) | |
std::size_t | getIndex (Vec< 2, double > p) const |
Get index of element which includes point p . | |
optional< Element > | getElement (Vec< 2, double > p) const |
Get element which includes point p . | |
Public Attributes | |
const TriangularMesh2D & | mesh |
Rtree | rtree |
Static Public Attributes | |
static constexpr std::size_t | INDEX_NOT_FOUND = std::numeric_limits<std::size_t>::max() |
Index which allows for fast finding elements which includes particular points.
Definition at line 269 of file triangular2d.hpp.
typedef boost::geometry::model::box<Vec<2> > plask::TriangularMesh2D::ElementIndex::Box |
Definition at line 270 of file triangular2d.hpp.
typedef boost::geometry::index::rtree< std::pair<Box, std::size_t>, boost::geometry::index::quadratic<16> > plask::TriangularMesh2D::ElementIndex::Rtree |
Definition at line 275 of file triangular2d.hpp.
plask::TriangularMesh2D::ElementIndex::ElementIndex | ( | const TriangularMesh2D & | mesh | ) |
Definition at line 100 of file triangular2d.cpp.
optional< TriangularMesh2D::Element > plask::TriangularMesh2D::ElementIndex::getElement | ( | Vec< 2, double > | p | ) | const |
Get element which includes point p
.
p | point to find |
p
or empty optional if no element includes p
. Definition at line 115 of file triangular2d.cpp.
Get index of element which includes point p
.
p | point to find |
p
or INDEX_NOT_FOUND if there is no element includes p
. Definition at line 106 of file triangular2d.cpp.
|
staticconstexpr |
Definition at line 283 of file triangular2d.hpp.
const TriangularMesh2D& plask::TriangularMesh2D::ElementIndex::mesh |
Definition at line 277 of file triangular2d.hpp.
Rtree plask::TriangularMesh2D::ElementIndex::rtree |
Definition at line 279 of file triangular2d.hpp.