A C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes.
This is a fork of TriMesh2 which in turn is a fork of 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.
- Mesh and some other function have been template and support both and float representation for points and vectors
- Hence reader have been adpated to import either in float or double
- Writer (exporter) use fmt to format floating points and integer indexes
- prints have be shunt off
- A lot of unctions have be removed :-( including viewer, hence the trimeshlight name
- Trimesh2 relies on fmt library and use vcpkg to manage the dependencies
- OpenGl dependency has been removed
- The build use Cmake
For the original TriMesh2 project, see the Trimesh2 homepage.
Features:
- Support for reading/writing PLY, OFF, OBJ files. Read-only: 3DS, SM, RAY.
- Vec: a templated C++ class for constant-length vectors, with support for the usual arithmetic operations and XForm: 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.
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
- mesh_check: Check for some kinds of topological oddities (e.g., more than 2 faces at an edge) in a mesh file.
- mesh_crunch: Quick-n-dirty mesh decimation using the Rossignac-Borrel method of vertex collapse
- mesh_info: Print out some information about a mesh
- xf: Create or compose transformations in .xf files