27 #ifndef MPBLOCKS_SIMPLEX_TREE_SIMPLEX_H_
28 #define MPBLOCKS_SIMPLEX_TREE_SIMPLEX_H_
30 #include <Eigen/Dense>
35 namespace simplex_tree {
47 template <
class Traits>
53 typedef typename Traits::Node
Node_t;
56 typedef Eigen::Matrix<Format_t,Traits::NDim,1>
Vector_t;
57 typedef Eigen::Matrix<Format_t,Traits::NDim,1>
Point_t;
58 typedef Eigen::Matrix<Format_t,Traits::NDim+1,Traits::NDim>
Normals_t;
59 typedef Eigen::Matrix<Format_t,Traits::NDim+1,1>
Offsets_t;
Eigen::Matrix< Format_t, Traits::NDim+1, 1 > Offsets_t
Normals_t m_n
vertex of the parent which is replaced in creating this node
SimplexList_t m_children
offsets of the faces
std::vector< Simplex_t * > SimplexList_t
Eigen::Matrix< Format_t, Traits::NDim+1, Traits::NDim > Normals_t
Simplex< Traits > Simplex_t
Eigen::Matrix< Format_t, Traits::NDim, 1 > Vector_t
void insert(Node_t *)
insert the point into the simplex, recursively inserting into children or splitting as necessary ...
bool contains(Node_t *)
return true if the simplex contains the point
void setFace(Index_t i, const Vector_t &n, Format_t d)
set the i'th face of this simplex with the specified normal and distance
Offsets_t m_d
normals of the faces
void initAsLeaf(Simplex_t *parent, Index_t i, Point_t &v)
initialize the simplex as leaf, reserving storage for all the child node pointers ...
std::vector< Node_t * > NodeList_t
SimplexList_t m_neighbors
list of neighbors
void split()
list of points in this node, if it's a leaf
base class for nodes, implements storage and interface for the simplex tree
Point_t m_v
index of the vertex of the parent which is replaced in creating this node
Eigen::Matrix< Format_t, Traits::NDim, 1 > Point_t