From 2a01991523bae9997668a04a8691ae0180161488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 17 Jan 2019 08:19:29 +0100 Subject: [PATCH] Added documentation for the eigen vector interface --- Doc/mainpage.docu | 1 + Doc/mesh.docu | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/Doc/mainpage.docu b/Doc/mainpage.docu index 9ce3e3dd..47ddfa3f 100644 --- a/Doc/mainpage.docu +++ b/Doc/mainpage.docu @@ -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 diff --git a/Doc/mesh.docu b/Doc/mesh.docu index 488e06da..c5ea258a 100644 --- a/Doc/mesh.docu +++ b/Doc/mesh.docu @@ -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 +\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; + +EigenTriMesh mesh; + +\endcode + +Now you can use mesh as any other OpenMesh while using Eigen vectors +as the underlying data type. + +
    + + */