2009-02-06 13:37:46 +00:00
//-----------------------------------------------------------------------------
/** \page naming_conventions Naming Conventions
2010-03-02 14:20:54 +00:00
The following naming conventions are used for the %OpenMesh code:
2009-02-06 13:37:46 +00:00
<b>Files:</b>
\li \c MyClass.cc for C++-Implementation of class \c MyClass
\li \c MyClass.hh for C++-Header of class \c MyClass
<b>Classes:</b>
\li Class names start with a capital letter: \c MyClass
\li Class templates end with \c T: \c MyClassTemplateT
<b>Variables:</b>
\li One leading underscore for parameters in function-calls: \c _var
\li One trailing underscore for member-variables: \c var_
\li Two trailing underscores for static member-variables: \c var__
<b>Functions:</b>
\li Words are separated by underscores: \c my_function()
<b>Accessing members:</b>
\li To get the member \c xxx_ use <tt> const& xxx() const </tt>
\li To set the member \c xxx_ use <tt> void set_xxx(arg) </tt>
**/
//-----------------------------------------------------------------------------
2010-03-02 14:20:54 +00:00
/** \page compiling Compiling %OpenMesh
2009-02-06 13:37:46 +00:00
\section compilers Tested compilers
2009-05-04 14:48:44 +00:00
%OpenMesh has been successfully tested for the following operating
2009-02-06 13:37:46 +00:00
systems / compilers:
<table>
<tr><td> Linux </td><td>
gcc 4.0.x<br>
gcc 4.1.x<br>
gcc 4.2.x<br>
gcc 4.3.x<br>
2010-03-01 16:12:44 +00:00
gcc 4.4.x<br>
2009-02-06 13:37:46 +00:00
</td></tr>
<tr><td> Windows </td><td>
Microsoft Visual Studio 2008<br>
</td></tr>
2010-03-03 16:09:13 +00:00
<tr><td> MacOS X <br>(Panther,Tiger,Leopard,Snow Leopard)</td><td>
2009-02-06 13:37:46 +00:00
gcc 4.0 <br>
2009-05-04 14:48:44 +00:00
gcc 4.2 <br>
2009-02-06 13:37:46 +00:00
</td></tr>
</table>
2009-11-18 07:43:00 +00:00
\section req_libs Required libraries (Only for included Apps)
2009-02-06 13:37:46 +00:00
2009-11-18 07:43:00 +00:00
Install the following external libraries / frameworks if you want to use the included Applications:<br><br>
2009-02-09 11:42:40 +00:00
<table>
<tr><td>Qt4</td><td><a href="http://www.qtsoftware.com/downloads" target="_blank">http://www.qtsoftware.com/downloads</a></td></tr>
<tr><td>GLEW</td><td><a href="http://glew.sourceforge.net/" target="_blank">http://glew.sourceforge.net/</a></td></tr>
2009-05-06 08:11:55 +00:00
</table><br>
2009-05-04 14:48:44 +00:00
\section build_systems Chosing build system
2010-03-01 16:16:21 +00:00
%OpenMesh can be built using the <b>cmake</b> build system.
2009-06-05 06:56:10 +00:00
<br>
<br>
2009-05-06 08:11:55 +00:00
\section sec_compiling_unix Unix
2009-05-04 14:48:44 +00:00
2010-03-02 14:20:54 +00:00
\subsection linux_using_cmake Compiling %OpenMesh using CMake
2009-05-04 14:48:44 +00:00
2010-03-02 14:20:54 +00:00
In order to compile %OpenMesh, create a directory named e.g. "build" in
2009-06-05 06:38:20 +00:00
OpenMesh's root directory. <b>Change to the newly created directory</b> and type
2009-05-04 14:48:44 +00:00
<br/><br/>
<tt>
cmake .. ## Generates the appropriate Makefiles<br>
2009-06-05 06:38:20 +00:00
make ## Builds the project<br>
2009-05-04 14:48:44 +00:00
</tt><br>
2009-06-05 06:38:20 +00:00
You can choose the build type by using cmake with the flag<br>
<b>-DCMAKE_BUILD_TYPE=(Debug|Release)</b><br>
The default is: Debug
<br>
2009-06-16 13:20:03 +00:00
Other flags are:<br/>
<b>-DBUILD_APPS=OFF</b> to disable build of applications and<br/>
2009-11-23 13:46:09 +00:00
<b>-DCMAKE_INSTALL_PREFIX=<path></b> to specify the install path.
2009-06-16 13:20:03 +00:00
<br/>
2010-03-02 14:20:54 +00:00
When calling <b>make install</b> cmake will install %OpenMesh into this
2009-06-16 13:20:03 +00:00
directory using the subdirectories lib/include/bin.
CMake builds both shared and static under Linux.
2009-06-05 06:38:20 +00:00
Everything will then be build in the <b>Build</b> subdirectory containing the libraries in <b>lib</b> and the binaries in <b>bin</b>.
2009-06-24 08:23:52 +00:00
There are some additional targets:<br>
<b>doc</b>: Builds the Documentation<br>
<b>doc-install</b>: Builds the Documentation and installs it<br>
2009-06-05 06:38:20 +00:00
<br>
<br>
2009-05-04 14:48:44 +00:00
2009-02-06 13:37:46 +00:00
\section sec_compiling_windows Windows
2010-03-02 14:20:54 +00:00
\subsection windows_using_cmake Compiling %OpenMesh using CMake
2009-05-04 14:48:44 +00:00
If you want to use cmake to build your Visual Studio 2008 solution file,<br>
download and install CMake from <a href="http://www.cmake.org/cmake/resources/software.html">www.cmake.org</a>.<br>
2010-03-02 14:20:54 +00:00
(Note: This is not mandatory since there are already VS2008 solution files included in %OpenMesh).<br><br>
2009-05-04 14:48:44 +00:00
Install the OpenGL Extension Wrangler Library (GLEW) from <a href="http://glew.sourceforge.net" target="_blank">http://glew.sourceforge.net</a>.
<br>
<br>
<ul>
2009-05-06 08:03:51 +00:00
<li> Get Visual Studio 2008 </li>
2010-03-02 14:20:54 +00:00
<li> Extract %OpenMesh source code. </li>
2009-05-06 08:03:51 +00:00
<li> Get all required libraries and install them ( including headers! ).</li>
<li> Get cmake for windows from http://www.cmake.org/cmake/resources/software.html <li>
2010-03-02 14:20:54 +00:00
<li> Start the cmake gui and open the %OpenMesh toplevel directory as source directory </li>
2010-03-02 14:15:04 +00:00
<li> Choose a build directory (e.g. create a directory called "build" in OpenMesh's root folder) </li>
<li> Click on configure .... If any libraries are left unconfigured, you can adjust the path manually. Rerun configure until everything is configured correctly.
Attention: Some build variables are only visible in advanced view mode. Select Visual Studio 9 2008 as
generator. </li>
2009-05-06 08:03:51 +00:00
<li> Click generate to create the visual studio project files </li>
2010-03-02 14:15:04 +00:00
<li> You can now find a Visual Studio solution file (OpenMesh.sln) in the <b>build</b> directory you chose in cmake </li>
2010-03-02 14:20:54 +00:00
<li> Now you can build %OpenMesh from within Visual Studio using the newly created project file. </li>
2009-05-04 14:48:44 +00:00
</ul>
2010-03-02 14:20:54 +00:00
Note: Set the CMAKE_BUILD_TYPE variable to "Release" if you want %OpenMesh to be built as release.
2010-03-02 14:15:04 +00:00
In Visual Studio 2008 choose "Release" in the appropriate select box and build the solution afterwards.
2009-06-05 06:56:10 +00:00
<br>
<br>
2009-05-04 14:48:44 +00:00
\section sec_compiling_macosx MacOS X
2009-02-06 13:37:46 +00:00
2009-05-06 08:11:55 +00:00
Download and install required libraries as stated above.
2010-11-22 14:35:47 +00:00
Because some of the examples depend on the GLEW library, it's recommended to install glew via MacPorts portage system <a href="http://www.macports.org/" target="_blank">MacPorts</a>.<br>
2009-05-04 14:48:44 +00:00
If you have not installed it yet, follow the instructions given on their site in order to install it.<br>
2009-02-09 11:42:40 +00:00
Type
<tt>
2009-05-04 14:48:44 +00:00
sudo port -v install glew
2009-02-09 11:42:40 +00:00
</tt>
2010-11-22 14:35:47 +00:00
to install glew headers and libraries. ( MacPorts usually installs header files to \c /opt/local/include and libraries to \c /opt/local/lib. )<br>
2009-02-09 11:42:40 +00:00
<br>
2009-05-04 14:48:44 +00:00
2010-03-02 14:20:54 +00:00
\subsection mac_using_cmake Compiling %OpenMesh using CMake
2009-05-04 14:48:44 +00:00
If you're using cmake as preferred build system create a directory
2010-03-02 14:20:54 +00:00
named e.g. in %OpenMesh's root directory and change to it.
2009-05-04 14:48:44 +00:00
<br/><br/>
<tt>
cmake .. ## Generates the appropriate Makefiles<br>
make ## Builds the project (use 'make debug' to build debug version)<br>
</tt><br>
The mac application bundle will be found under "Build" in the recently created build folder.
It automatically contains all needed shared objects (libs, fonts, textures, etc.).
2009-06-16 13:20:03 +00:00
CMake builds both shared and static under MacOS X.
2009-02-06 13:37:46 +00:00
**/
//-----------------------------------------------------------------------------