PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
plask::TriangularMesh2D::ElementIndex Struct Reference

Index which allows for fast finding elements which includes particular points. More...

`#include <plask/mesh/triangular2d.hpp>`

Collaboration diagram for plask::TriangularMesh2D::ElementIndex:
[legend]

## 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()

## Detailed Description

Index which allows for fast finding elements which includes particular points.

Definition at line 269 of file triangular2d.hpp.

## Member Typedef Documentation

## ◆ Box

typedef boost::geometry::model::box<Vec<2> > plask::TriangularMesh2D::ElementIndex::Box

Definition at line 270 of file triangular2d.hpp.

## ◆ Rtree

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.

## Constructor & Destructor Documentation

## ◆ ElementIndex()

plask::TriangularMesh2D::ElementIndex::ElementIndex | ( | const TriangularMesh2D & | mesh | ) |

Definition at line 100 of file triangular2d.cpp.

## Member Function Documentation

## ◆ getElement()

optional< TriangularMesh2D::Element > plask::TriangularMesh2D::ElementIndex::getElement | ( | Vec< 2, double > | p | ) | const

Get element which includes point `p`.

Parameters

  p | point to find

Returns
  element which includes `p` or empty optional if no element includes `p`.

Definition at line 115 of file triangular2d.cpp.

## ◆ getIndex()

std::size_t plask::TriangularMesh2D::ElementIndex::getIndex | ( | Vec< 2, double > | p | ) | const

Get index of element which includes point `p`.

Parameters

  p | point to find

Returns
  index of element which includes `p` or INDEX_NOT_FOUND if there is no element includes `p`.

Definition at line 106 of file triangular2d.cpp.

## Member Data Documentation

## ◆ INDEX_NOT_FOUND

constexpr std::size_t plask::TriangularMesh2D::ElementIndex::INDEX_NOT_FOUND = std::numeric_limits<std::size_t>::max()
| static constexpr

Definition at line 283 of file triangular2d.hpp.

## ◆ mesh

const TriangularMesh2D& plask::TriangularMesh2D::ElementIndex::mesh

Definition at line 277 of file triangular2d.hpp.

## ◆ rtree

Rtree plask::TriangularMesh2D::ElementIndex::rtree

Definition at line 279 of file triangular2d.hpp.

The documentation for this struct was generated from the following files:

- plask/mesh/triangular2d.hpp
- plask/mesh/triangular2d.cpp