Added documentation for the eigen vector interface

This commit is contained in:
Jan Möbius
2019-01-17 08:19:29 +01:00
parent a7e9657759
commit 2a01991523
2 changed files with 37 additions and 0 deletions

View File

@@ -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

View File

@@ -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>
*/ */