Windows combines Visual Studio 2012 configuration Openmesh

Source: Internet
Author: User
Tags visual studio

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.