Commit 2a019915 authored by Jan Möbius's avatar Jan Möbius

Added documentation for the eigen vector interface

parent a7e96577
......@@ -109,6 +109,7 @@ repeatedly replacing each vertex' position by the center of gravity
\li \subpage mesh_operations
\li \subpage mesh_hierarchy
\li \subpage mesh_type
\li \subpage mesh_eigen
\page additional_information Additional Information on OpenMesh
......
......@@ -555,6 +555,42 @@ curvature, i.e. vertex color.
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>
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment