A C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes.
This is a fork of the TriMesh2 library (originally by Szymon Rusinkiewicz), which I use a lot in my other graphics projects. I like TriMesh2 because of the low setup costs required to do model loading, as well as the robust and powerful implementation of various model manipulation techniques.
The original TriMesh2 project is quite Linux/GCC-oriented, and only has limited Win32 support (through MinGW compilation targets). The primary aim of this fork is to add a stable Visual Studio solution, for both x86 and x64 targets, whilst staying as close as possible to the original codebase (and subsequent updates).
trimesh.lib, the debug version is
include/TriMesh.h, and make sure the static library is in your build path. All Trimesh2 functions will be in the
TriMesh* themesh = TriMesh::read(filename);.
verticeswhich will be filled with all the vertices of your model, and a data member
faces, which will tell you which vertices make up a face.
normals. You can (re)compute them by calling
need_normalson the mesh. There's also
need_bboxfor a bounding box,
need_dcurvfor curvature, etc.
include/TriMesh.hand the utilities in the
mesh_viewutility has dependencies on OpenGL and Freeglut, because it needs to display a window with a textured model
mscvfolder, verified working with the free Community Editions of Visual Studio. The solutions contain both Debug and Release profiles for 32-bit and 64-bit builds.
lib.(architecture).(visual studio version)in the trimesh2 root folder. For example, for a 64-bit Visual Studio 2017 build, it will be
lib.win64.vs141. The utilities will be placed in
util.(architecture).(visual studio version). This naming scheme is in place to avoid clashing trimesh2 versions.
mesa-common-dev libglu1-mesa-dev libxi-dev.
For the original TriMesh2 project, see the Trimesh2 homepage.
The following utility programs are included:
This fork stays as close as possible to the original trimesh2 code, only changing the actual source files when a solution for compilation errors cannot be reached through VS pre-build steps or preprocessor magic.
Notable changes compared to vanilla trimesh2
Other software for importing and manipulating 3D models: