Added documentation for the eigen vector interface
This commit is contained in:
@@ -109,6 +109,7 @@ repeatedly replacing each vertex' position by the center of gravity
|
|||||||
\li \subpage mesh_operations
|
\li \subpage mesh_operations
|
||||||
\li \subpage mesh_hierarchy
|
\li \subpage mesh_hierarchy
|
||||||
\li \subpage mesh_type
|
\li \subpage mesh_type
|
||||||
|
\li \subpage mesh_eigen
|
||||||
|
|
||||||
|
|
||||||
\page additional_information Additional Information on OpenMesh
|
\page additional_information Additional Information on OpenMesh
|
||||||
|
|||||||
@@ -555,6 +555,42 @@ curvature, i.e. vertex color.
|
|||||||
|
|
||||||
That's it.
|
That's it.
|
||||||
|
|
||||||
|
|
||||||
|
/** \page mesh_eigen Specifying an OpenMesh using Eigen3 vectors
|
||||||
|
|
||||||
|
This section will show how to build your own custom mesh type using
|
||||||
|
Eigen3 vectors for points, normals or other entities.
|
||||||
|
|
||||||
|
First of all you need to include the Eigen header shipped with OpenMesh:
|
||||||
|
\code
|
||||||
|
#include <OpenMesh/Core/Geometry/EigenVectorT.hh>
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
This header contains the external functions and vector traits used by
|
||||||
|
OpenMesh.
|
||||||
|
|
||||||
|
Afterwards you can specify your mesh:
|
||||||
|
|
||||||
|
\code
|
||||||
|
struct EigenTraits : OpenMesh::DefaultTraits {
|
||||||
|
using Point = Eigen::Vector3d;
|
||||||
|
using Normal = Eigen::Vector3d;
|
||||||
|
|
||||||
|
using TexCoord2D = Eigen::Vector2d;
|
||||||
|
};
|
||||||
|
|
||||||
|
using EigenTriMesh = OpenMesh::TriMesh_ArrayKernelT<EigenTraits>;
|
||||||
|
|
||||||
|
EigenTriMesh mesh;
|
||||||
|
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Now you can use mesh as any other OpenMesh while using Eigen vectors
|
||||||
|
as the underlying data type.
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user