NEWS: This project is now hosted on GitHub https://github.com/Microsoft/DirectXMesh. This site is being maintained for now, but please move to using GitHub. https://github.com/Microsoft/DirectXMesh/wiki/DirectXMesh

The DirectXMesh library includes various geometry processing functions. This is intended primarily for tool usage.

Headers

The majority of the header files here are intended for internal implementation of the library only (DirectXMeshP.h and scoped.h). Only DirectXMesh.h (and DirectXMesh.inl) is meant as a 'public' header for the library.

Namespace

All the functions in the library are in the DirectX C++ namespace.

Classes

VBReader

VBWriter

Functions

Normals, tangents, and bi-tangents

Adjacency computation

Mesh cleanup and validation

Mesh optimization

Remap functions

Utility functions

Parameters

The following standard parameters are used throughout the library:

indices: A 16-bit or 32-bit indexed description of the triangles in a mesh. This must have 3 * nFaces entries, and every group of 3 describes the vertices for a triangle face.
  • This is the index buffer data suited for use with D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST.
  • An entry of -1u is reserved as 'unused' (Direct3D 11 interprets this special value as a strip restart). Any face containing one or more -1u entries is considered an 'unused' face.
nFaces: Number of faces in the mesh.

positions: The vertex positions of the mesh as indexed by entries in indices. This must have nVerts entries.

texcoords: The UV texture coordinates of the mesh as indexed by entries in indices. This must have nVerts entries.

nVerts: Number of vertices in the mesh.

pointRep: A 32-bit index array with nVerts entries containing the point representatives for each vertex in a mesh. Can be -1u to indicate an unused entry. See Adjacency computation for more information.

adjacency: A 32-bit index array with nFaces * 3 entries containing the edge adjacencies for each face in a mesh. Can be -1u to indicate an unused entry. See Adjacency computation for more information.

attributes: A 3-2bit index array with nFaces entries which contains the attribute id for each face in the mesh.

Adding to a VS solution

In your application's solution, right-click on the Solution and use "Add \ Existing Project..." to add the appropriate .vcxproj file to your solution.
  • DirectXMesh_Desktop_2015 is for Windows desktop applications building with VS 2015.
  • DirectXMesh_Desktop_2013 is for Windows desktop applications building with VS 2013 Express for Desktop, VS 2013 Community, VS 2013 Professional or higher.
  • DirectXMesh_Desktop_2012 is for Windows desktop applications building with VS 2012 Express for Desktop, VS 2012 Professional or higher
  • DirectXMesh_Windows10 is for universal Windows apps building with VS 2015 targeting Windows 10
  • DirectXMesh_Windows81 is for Windows Store apps building with VS 2013 targeting Windows 8.1
  • DirectXMesh_Windows8 is for Windows Store apps building with VS 2012 targeting Windows 8
  • DirectXMesh_WindowsPhone81 is for Windows phone 8.1 apps building with VS 2013 Update 2 or later.
  • DirectXMesh_XboxOneXDK is for Xbox One exclusive applications building with VS 2012 using the Xbox One XDK
  • DirectXMesh_XboxOneADK is for Xbox One hub apps building with VS 2012 using the Xbox One ADK
In your application's project, right-click on the Project and use "References...", then "Add New Reference...", and then check the DirectXMesh project name and click OK. For a Windows Store app, Windows phone, or Xbox One solution, you need to set Reference Assembly Output to false since DirectXMesh is a static C++ library and not a WinRT component.

In your application's project settings, on the "C++ / General" page set Configuration to "All Configurations", set Platform to "All Platforms", and then add the relative path to DirectXMesh;--assuming you have the DirectXMesh folder in the same directory as your sln file, it should be $(SolutionDir$)\DirectXMesh;--to the Additional Include Directories properties. Click Apply.

http://blogs.msdn.com/b/vcblog/archive/2010/05/03/flexible-project-to-project-references.aspx

Last edited Jul 29, 2015 at 11:58 PM by walbourn, version 27