OpenGP  1.1
Open Geometry Processing Library
Public Member Functions | Static Public Member Functions | List of all members
OpenGP::AABBSearcher< VertexMatrix, FaceMatrix > Class Template Reference

acceleration data structure for closest point computation on a triangular mesh More...

#include <AABBSearcher.h>

Public Member Functions

template<typename Derived1 , typename Derived2 >
void build (Eigen::MatrixBase< Derived1 > &vertices, Eigen::MatrixBase< Derived2 > &faces)
 Builds the acceleration structure to look for closest points on a triangular mesh. More...
 
template<typename Derived1 , typename Derived2 >
void closest_point (const Eigen::MatrixBase< Derived1 > &queries, Eigen::MatrixBase< Derived2 > &footpoints)
 Find closest points on the surface. More...
 
template<typename Derived >
Eigen::Matrix< Derived, 3, 1 > closest_point (Eigen::Matrix< Derived, 3, 1 > query)
 Find closest points on the surface.
 
template<typename Derived1 , typename Derived2 , typename Derived3 >
void closest_point (const Eigen::MatrixBase< Derived1 > &queries, Eigen::MatrixBase< Derived2 > &footpoints, Eigen::MatrixBase< Derived3 > &indexes)
 Find closest points on the surface. More...
 
template<typename Derived1 , typename Derived2 , typename Derived3 >
void barycentric (const Eigen::MatrixBase< Derived1 > &footpoints, const Eigen::MatrixBase< Derived2 > &indexes, Eigen::MatrixBase< Derived3 > &coordinates)
 Converts the pair of {3D footpoint,face index} into its barycentric coordinate coordinates. More...
 

Static Public Member Functions

static Point_3 tr (Vertex v)
 Conversion Eigen-CGAL.
 

Detailed Description

template<typename VertexMatrix, typename FaceMatrix>
class OpenGP::AABBSearcher< VertexMatrix, FaceMatrix >

acceleration data structure for closest point computation on a triangular mesh

Member Function Documentation

template<typename VertexMatrix , typename FaceMatrix >
template<typename Derived1 , typename Derived2 , typename Derived3 >
void OpenGP::AABBSearcher< VertexMatrix, FaceMatrix >::barycentric ( const Eigen::MatrixBase< Derived1 > &  footpoints,
const Eigen::MatrixBase< Derived2 > &  indexes,
Eigen::MatrixBase< Derived3 > &  coordinates 
)
inline

Converts the pair of {3D footpoint,face index} into its barycentric coordinate coordinates.

Parameters
footpointsone 3D footpoint per column
indexesindex of the face where footpoint was found
coordinatesbarycentric coordinates of the footpoint in the corresponding face (not checked for degenerate triangles!!!)
template<typename VertexMatrix , typename FaceMatrix >
template<typename Derived1 , typename Derived2 >
void OpenGP::AABBSearcher< VertexMatrix, FaceMatrix >::build ( Eigen::MatrixBase< Derived1 > &  vertices,
Eigen::MatrixBase< Derived2 > &  faces 
)
inline

Builds the acceleration structure to look for closest points on a triangular mesh.

Parameters
verticesvertices of the surface (one vertex per column)
facesfaces.col(i) contains the indexes of vertices on the face

Bake triangle set

template<typename VertexMatrix , typename FaceMatrix >
template<typename Derived1 , typename Derived2 >
void OpenGP::AABBSearcher< VertexMatrix, FaceMatrix >::closest_point ( const Eigen::MatrixBase< Derived1 > &  queries,
Eigen::MatrixBase< Derived2 > &  footpoints 
)
inline

Find closest points on the surface.

One query per column Only returns footpoints

Parameters
queriesquery point cloud (one point per column)
footpointsfetched closest point on the input triangle set (one point per column)
template<typename VertexMatrix , typename FaceMatrix >
template<typename Derived1 , typename Derived2 , typename Derived3 >
void OpenGP::AABBSearcher< VertexMatrix, FaceMatrix >::closest_point ( const Eigen::MatrixBase< Derived1 > &  queries,
Eigen::MatrixBase< Derived2 > &  footpoints,
Eigen::MatrixBase< Derived3 > &  indexes 
)
inline

Find closest points on the surface.

Parameters
queriesquery point cloud (one point per column)
footpointsfetched closest point on the input triangle set (one point per column)
indexesindex of triangle on which the footpoint was found (one index per query)
coordinatesbarycentric coordinates of the footpoint in the corresponding face
Note
NO INSURANCE on degenerate triangles. Matrix inversion will fail!!

The documentation for this class was generated from the following file: