From aec2f3ec86520ab9aee9f030c49e076cdfcb4ecd Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Mon, 1 Mar 2010 16:00:36 +0000 Subject: [PATCH] Tidied up documentation (especially the mainpage) to improve usability. Added a new tutorial on building projects using OpenMesh. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@275 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/Doxyfile | 3 +- Doc/Tutorial/CMakeLists.txt | 20 +++++++++++ Doc/mainpage.docu | 67 ++++++++++++++++++++++++++++--------- Doc/mesh.docu | 6 ++-- Doc/operations.docu | 2 +- Doc/tutorial_build.docu | 29 ++++++++++++++++ 6 files changed, 107 insertions(+), 20 deletions(-) create mode 100644 Doc/Tutorial/CMakeLists.txt create mode 100644 Doc/tutorial_build.docu diff --git a/Doc/Doxyfile b/Doc/Doxyfile index 2bdd3f0c..bcd5f86d 100644 --- a/Doc/Doxyfile +++ b/Doc/Doxyfile @@ -638,7 +638,8 @@ EXAMPLE_PATH = Examples \ # blank all files are included. EXAMPLE_PATTERNS = *.cc \ - *.hh + *.hh \ + *.txt # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude diff --git a/Doc/Tutorial/CMakeLists.txt b/Doc/Tutorial/CMakeLists.txt new file mode 100644 index 00000000..70fe7aa9 --- /dev/null +++ b/Doc/Tutorial/CMakeLists.txt @@ -0,0 +1,20 @@ +include (ACGCommon) + +include_directories ( + ../../.. + ${CMAKE_CURRENT_SOURCE_DIR} +) + +set (targetName MyOwnProject) + +# collect all header and source files +acg_append_files (headers "*.hh" .) +acg_append_files (sources "*.cc" .) + +acg_add_executable (${targetName} ${headers} ${sources}) + +target_link_libraries (${targetName} + OpenMeshCore + OpenMeshTools +) + diff --git a/Doc/mainpage.docu b/Doc/mainpage.docu index 6a418bb1..df906379 100644 --- a/Doc/mainpage.docu +++ b/Doc/mainpage.docu @@ -2,46 +2,83 @@ Welcome to the %OpenMesh documentation. %OpenMesh is a generic and efficient library that offers data structures for representing and manipulating polygonal meshes. +It is a powerful tool for handling polygonal +meshes. Due to its inherent generative structure it allows the user to +create mesh types which are custom tailored to the specific needs of +the application. The user can either supply his own data structures +for representing vertices, edges and faces or he can conveniently use +the predefined structures of %OpenMesh. +Additionally %OpenMesh offers dynamic properties allowing the user to attach +and detach data to the mesh during runtime. + Here you can find information on how to build projects using the %OpenMesh library as well as further information on mesh handling in %OpenMesh. The tutorials explain how to use %OpenMesh by demonstrating real code examples. -\section iov Introduction +\section iov Building OpenMesh In this section all necessary information on how to build projects using %OpenMesh -is given. Additionally you can read about the internal naming conventions -to facilitate understanding the %OpenMesh source code. Changes to %OpenMesh are -logged in the Version history. +is given. \li \ref compiling -\li \ref naming_conventions -\li \ref history + +\section tutorial Tutorials (code examples) + +This section is supposed to introduce the basic concepts of +%OpenMesh. + + + +\li \ref mesh_type +\li \ref tutorial_01 +\li \ref tutorial_build +\li \ref tutorial_02 +\li \ref tutorial_03 +\li \ref tutorial_04 +\li \ref tutorial_05 +\li \ref tutorial_06 +\li \ref tutorial_07 +\li \ref tutorial_07b +\li \ref tutorial_08 +\li \ref tutorial_09 \section mesh_docu Using and understanding OpenMesh + We provide a short overview over the functionality of the %OpenMesh -library and some additional concepts in \ref tutorial. Additionally we explain the +library and some additional concepts in \ref tutorial. Additionally, we explain the most important topics of %OpenMesh in the following sections: \li \ref mesh_first_to_read \li \ref mesh_features \li \ref mesh_cpp +\li \ref mesh_hierarchy \li \ref mesh_hds \li \ref mesh_iterators \li \ref mesh_navigation \li \ref mesh_io -\li \ref mesh_type \li \ref mesh_operations -\li \ref mesh_hierarchy -\li \ref mesh_members The %OpenMeshTools library that contains some useful tools for i.e. mesh processing: - + \li \ref tools_docu -\section tov Tutorials -This section offers some useful code examples in order to show -how to use the provided mesh structures. +\section background Additional information on OpenMesh -\li \ref tutorial +\li \ref mesh_members +\li \ref naming_conventions +\li \ref history **/ diff --git a/Doc/mesh.docu b/Doc/mesh.docu index 7f259f9e..c01352f8 100644 --- a/Doc/mesh.docu +++ b/Doc/mesh.docu @@ -1,7 +1,7 @@ //----------------------------------------------------------------------------- -/** \page mesh_first_to_read Start here (Notes on template programming)! +/** \page mesh_first_to_read Notes on template programming Please note, that %OpenMesh makes heavily use of C++ templates, generic programming and all that stuff (see \ref mesh_cpp). Therefore @@ -47,7 +47,7 @@ OpenMesh::PolyMeshT can use any kernel. //----------------------------------------------------------------------------- -/** \page mesh_features Features and Goals +/** \page mesh_features Features and Goals of OpenMesh The main features of the underlying data structure are: @@ -602,7 +602,7 @@ provides the pubic member functions of //----------------------------------------------------------------------------- -/** \page mesh_io Mesh Input and Output +/** \page mesh_io Mesh Read and write files This section explains the methods used to read a mesh from a file or write it to a file. The corresponding functions are defined in the diff --git a/Doc/operations.docu b/Doc/operations.docu index 97b77fa5..991d14e8 100644 --- a/Doc/operations.docu +++ b/Doc/operations.docu @@ -1,4 +1,4 @@ -/** \page mesh_operations Some basic operations on a mesh +/** \page mesh_operations Some basic operations: Flipping and collapsing edges In this section you will learn about some basic operations on a mes that %OpenMesh already provides. Comprising the flipping of edges in a triangle mesh as well as diff --git a/Doc/tutorial_build.docu b/Doc/tutorial_build.docu new file mode 100644 index 00000000..8eb13d05 --- /dev/null +++ b/Doc/tutorial_build.docu @@ -0,0 +1,29 @@ +/** \page tutorial_build How to create your own project using OpenMesh + +In this tutorial we will explain, how to create a new project using +%OpenMesh and build it with the CMake build system. We assume, that you have already +downloaded the %OpenMesh source files as well as installed the CMake build tools. + +There are quite few steps to follow to successfully add your own application to the build tree: + +\li Go to OpenMeshRoot/src/OpenMesh/Apps and create a new directory, say "MyOwnProject" +\li Now create a new file called "CMakeLists.txt" containing the following lines: + +\include CMakeLists.txt + +(Remember to replace "MyProjectName" with whatever you have chosen as your project's name. +Note: If you don't want to use *.hh and *.cc as your C++ source file suffices, you'll +have to change this, too, because CMake won't build your sources otherwise. + +\li Create your source files as for example explained in the previous tutorial (\ref tutorial_01) +and save them in the same directory. + +\li Add \code add_subdirectory (MyOwnProject) \endcode to OpenMeshRoot/src/OpenMesh/Apps/CMakeLists.txt (note: You can either +add this line right after the other projects or at the end of the file). + +\li Create a directory called "build" in OpenMesh's root directory. Change to the newly created directory and call +\code cmake .. \endcode and \code make \endcode + +That's all. Your project will now be built. + +**/ -- GitLab