|
|
trimesh2 is a C++ library and set of utilities for input, output,
and basic manipulation of 3D triangle meshes. The goals of the code are
ease of use and efficiency, possibly at the expense of some generality.
|
|
Features
The library includes the following:
- Support for reading PLY, OFF, 3DS, and Wavefront OBJ files, together with
a few other formats of mostly local interest (SM, RAY).
- Support for writing PLY, OFF, and OBJ files.
- A templated C++ class for constant-length vectors, with support for the
usual arithmetic operations (add, subtract, componentwise multiply and
divide, dot product, cross product, etc.)
- A class for rigid-body transformations.
- An OpenGL trackball/arcball implementation, with automatic selection of
rotation center.
- Algorithms for subdivision, smoothing, curvature estimation, triangle
stripping, and various other simple mesh manipulations.
Bundled together with the library are:
In addition, the following utility programs are included:
- mesh_view: a simple 3D mesh viewer
- mesh_make: create arbitrarily-tessellated meshes of various simple shapes
- mesh_filter: applies a variety of simple transformations to a mesh,
such as converting formats, flipping faces, subdivision, smoothing,
rigid-body transformations, etc.
- mesh_cc: list and/or extract connected components from a mesh
- mesh_cat: combine several meshes into a single file
- mesh_align: align 2 meshes using ICP
- mesh_shade: a few procedural shaders for adding per-vertex color
The author of trimesh2 is Szymon Rusinkiewicz,
and the library is distributed under the
GNU General Public License
(GPL), version 2. The various libraries distributed with trimesh2 are
open source, and are believed to be covered by GPL-compatible licenses.
Please see the COPYING file.
The code is written in C++, and is known to compile using a recent (3.x)
version of g++ on several Unix-like OSes (Linux x86 and x86-64, Solaris,
Mac OSX). Compiling under Windows is possible using Cygwin or
Mingw32, as well as MS Visual Studio .NET (but not MSVC 6).
Warning: some gcc versions are known to miscompile
trimesh2.
Versions 3.4.x (x >= 3), 4.0.y (y >= 1), and 4.1.z (z != 2)
are believed to be OK.
|
Download
Both of these packages include source, as well as Linux (32- and 64-bit)
and Windows binaries.
Changes
The most recent version is 2.8
Changes since version 2.7:
- Many compilation, portability, and bug fixes
- Colors are now stored as floats - this will require updating
external code that uses trimesh2
- Support for maintaining range grids as grids, instead of automatically
converting to meshes upon read
- Rudimentary (possibly broken, incomplete) support for reading VVD files
- mesh_filter: Added bilateral mesh filtering using the method of
[Jones et al. 2003]
- mesh_make: Added Klein bottle, rhombic triacontahedron
- OpenMP directives in a few places for multi-threading
- Many functions moved from utilities into library
Changes since version 2.6:
- Miscellaneous compilation, portability, and bug fixes
- mesh_filter: Added -pcasnap; added -fly
(butterfly subdivision); more robust -orient
- mesh_make: Added trefoil knot
- Linux x86_64 libraries and binaries now go in lib.Linux64/ and bin.Linux64/
Changes since version 2.5:
- mesh_filter: Added -sharpen and -usmooth flags;
bugfixes for Mac compilation, transforming meshes with normals
- mesh_make: Fix for making cubes with tess = 1
- mesh_align: ICP with isotropic or anisotropic (affine) scale
- mesh_cat: Bugfix in handling normals, colors, etc.
- mesh_shade: Added a few shaders, including coloring based on
mesh-to-mesh distance
Changes since version 2.4:
- Fixed bug in curvature computation
- Small bugfix in mesh_view
- Compile fixes
- Added mesh_shade with a few procedural shaders
Changes since version 2.3:
- Added mesh_align
- XForm.h and some of the utility programs should now support
affine transforms (as opposed to just rigid-body)
- Added yet more options to mesh_filter
Changes since version 2.2:
Changes since version 2.1:
- Added a couple of options to mesh_filter
- Bugfix for depth readback on ATI cards with broken drivers
Changes since version 2.0:
- Added mesh_cat utility
- Added several options to mesh_filter
- Many bugfixes, including compilation errors, I/O, and mesh_view
Please contact smr at princeton edu if you have any questions about
the code.