cheshirekow
v0.1.0
|
A simplex in the triangulation. A simplex is the convex hull of Ndim+1 points in R^NDim. More...
#include <edelsbrunner96/simplex.h>
Public Types | |
typedef std::bitset < simplex::NUM_BITS > | MarkedVec |
type for marked bit flags More... | |
typedef Traits::Point | Point |
typedef Traits::PointRef | PointRef |
typedef Traits::Scalar | Scalar |
typedef Traits::Simplex | Simplex |
typedef Traits::SimplexRef | SimplexRef |
typedef Traits::Storage | Storage |
Public Member Functions | |
Eigen::Matrix< typename Traits::Scalar, Traits::NDim+1, 1 > | BarycentricCoordinates (Storage &storage, const typename Traits::Point &xq) const |
Given a simplex as the convex hull of the points in V, compute the barycentric coordinates of the point xq. That is, find the vector lambda such that [v[0], v[1], ... v[n]][lambda] = xq and such that the elements of lambda sum to unity. More... | |
void | ComputeCenter (Storage &storage) |
called after vertices are filled computes the circumcenter More... | |
bool | Contains (Storage &storage, const typename Traits::Point &xq) const |
Interference test, return true if the query point lies inside the closed hull of the point set. More... | |
Eigen::Matrix< typename Traits::Scalar, Traits::NDim, 1 > | CoordinatesOf (Storage &storage, const typename Traits::Point &xq) const |
Given a simplex as the convex hull of the points in V, compute the coordinates of the point xq on the basis defined by [ (v[1] - v[0]), (v[2] - v[0]), ... (v[n] - v[0]) ]. More... | |
uint8_t | IndexOf (PointRef v) const |
return the index of the specified vertex More... | |
SimplexRef | NeighborAcross (PointRef q) const |
return the neighbor across the specified vertex More... | |
void | SetNeighborAcross (PointRef q, SimplexRef n) |
set the neighbor across the specified vertex More... | |
template<typename... PointRefs> | |
void | SetVertices (PointRefs...refs) |
Set the vertices of a simplex directly from a list of point refs. More... | |
template<typename Container > | |
void | SetVertices (Container refs) |
Set the vertices of a simplex directly from a container of pointrefs. More... | |
void | SetVertices (std::initializer_list< PointRef > refs) |
Set the vertices of a simplex directly from an initializer list of pointrefs. More... | |
SimplexBase () | |
initializes version and flags; in debug mode, also zeros out arrays More... | |
Public Attributes | |
Point | c |
circumcenter More... | |
MarkedVec | marked |
flags for marking More... | |
std::array< SimplexRef, Traits::NDim+1 > | N |
neighbors, mapped to vertices More... | |
Scalar | r2 |
circumradius squared More... | |
std::array< PointRef, Traits::NDim+1 > | V |
uint16_t | version |
incremented when flipped More... | |
A simplex in the triangulation. A simplex is the convex hull of Ndim+1 points in R^NDim.
Traits | traits class for simplices in the triangulation, must define, at least
|
As a matter of convenience (as well as an optimization) we index vertices, faces, and neighbor in a corresponding manner. The i'th face is opposite the i'th vertex. Likewise the i'th neighbor is the neighbor opposite the i'th face.
Furthermore, vertices are stored in sorted order.
typedef std::bitset<simplex::NUM_BITS> edelsbrunner96::SimplexBase< Traits >::MarkedVec |
typedef Traits::Point edelsbrunner96::SimplexBase< Traits >::Point |
typedef Traits::PointRef edelsbrunner96::SimplexBase< Traits >::PointRef |
typedef Traits::Scalar edelsbrunner96::SimplexBase< Traits >::Scalar |
typedef Traits::Simplex edelsbrunner96::SimplexBase< Traits >::Simplex |
typedef Traits::SimplexRef edelsbrunner96::SimplexBase< Traits >::SimplexRef |
typedef Traits::Storage edelsbrunner96::SimplexBase< Traits >::Storage |
edelsbrunner96::SimplexBase< Traits >::SimplexBase | ( | ) |
initializes version and flags; in debug mode, also zeros out arrays
Definition at line 37 of file simplex.hpp.
Eigen::Matrix< typename Traits::Scalar, Traits::NDim+1, 1 > edelsbrunner96::SimplexBase< Traits >::BarycentricCoordinates | ( | Storage & | storage, |
const typename Traits::Point & | xq | ||
) | const |
Given a simplex as the convex hull of the points in V, compute the barycentric coordinates of the point xq. That is, find the vector lambda such that [v[0], v[1], ... v[n]][lambda] = xq and such that the elements of lambda sum to unity.
Definition at line 123 of file simplex.hpp.
void edelsbrunner96::SimplexBase< Traits >::ComputeCenter | ( | Storage & | storage | ) |
called after vertices are filled computes the circumcenter
Definition at line 153 of file simplex.hpp.
bool edelsbrunner96::SimplexBase< Traits >::Contains | ( | Storage & | storage, |
const typename Traits::Point & | xq | ||
) | const |
Interference test, return true if the query point lies inside the closed hull of the point set.
Definition at line 146 of file simplex.hpp.
Eigen::Matrix< typename Traits::Scalar, Traits::NDim, 1 > edelsbrunner96::SimplexBase< Traits >::CoordinatesOf | ( | Storage & | storage, |
const typename Traits::Point & | xq | ||
) | const |
Given a simplex as the convex hull of the points in V, compute the coordinates of the point xq on the basis defined by [ (v[1] - v[0]), (v[2] - v[0]), ... (v[n] - v[0]) ].
Definition at line 103 of file simplex.hpp.
|
inline |
return the index of the specified vertex
Definition at line 95 of file simplex.hpp.
|
inline |
return the neighbor across the specified vertex
binary searches V for the correct index
Definition at line 82 of file simplex.hpp.
|
inline |
set the neighbor across the specified vertex
binary searches V for the correct index
Definition at line 89 of file simplex.hpp.
void edelsbrunner96::SimplexBase< Traits >::SetVertices | ( | PointRefs... | refs | ) |
Set the vertices of a simplex directly from a list of point refs.
Definition at line 51 of file simplex.hpp.
void edelsbrunner96::SimplexBase< Traits >::SetVertices | ( | Container | refs | ) |
Set the vertices of a simplex directly from a container of pointrefs.
Definition at line 64 of file simplex.hpp.
void edelsbrunner96::SimplexBase< Traits >::SetVertices | ( | std::initializer_list< PointRef > | refs | ) |
Set the vertices of a simplex directly from an initializer list of pointrefs.
Definition at line 73 of file simplex.hpp.
Point edelsbrunner96::SimplexBase< Traits >::c |
MarkedVec edelsbrunner96::SimplexBase< Traits >::marked |
std::array<SimplexRef, Traits::NDim + 1> edelsbrunner96::SimplexBase< Traits >::N |
Scalar edelsbrunner96::SimplexBase< Traits >::r2 |
std::array<PointRef, Traits::NDim + 1> edelsbrunner96::SimplexBase< Traits >::V |
uint16_t edelsbrunner96::SimplexBase< Traits >::version |