Recently listened to the Mathematics center Sun Jian Teacher's geometry processing a class, told the Openmesh, then tried to try. Laboratory projects have been under windows+vs2012 development, so also think of Openmesh in the win under the combination of vs2012. The environment has been done for a long time. Online methods have also been tried.
The official website provides the Openmesh2.3 support 32/64 bit under VS2010, starts to think 2012 compatibility, installs many times not to fix. such as the online copy lib/include directory, add openmeshtools and Openmeshcore lib file dependencies, add predefined macros _use_math_defines and Nominmax ... Can't handle it.
The Final Solution: under the source code, in vs2012 to recompile the build. Need to use CMake, here are the steps to introduce. Through the CMake build and generate a vs2012 project, open the solution file, can see a lot of works, directly build a named All_build project can. Finally, the corresponding include, Lib and other files can be copy.
The teacher assigned a Hello world job, probably familiar with the environment, and then read a off format file, processing is color-coded mesh based on Valences. Effect as shown in the following figure, the off file marked the point information and the entire topology results, the color of the map is the spot is directly connected to the point around the point than others (the figure is 8, the other is 6).
Openmesh implementation is very simple, direct read in, Openmesh::io::read_mesh (mesh, "Eight.off"), and then traverse the vertex, directly through the Mesh.valence (Vertexhandler) Can get valence value, and then directly with Mesh.set_color (Vertexhandler, Mymesh::color (R,g,b,a)) on the valence value for each point to set the appropriate color information, and finally Write_mesh () , you will be able to keep the information in good order. You can use the other geometry view tools to open to see the effect. The right side of the image above is opened with a openflipper effect.