Nosenzor / trimesh2

C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TriMesh2 (Light and templated)

License: GPL v3 example workflow A C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes.

trimesh2 logo

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.

Change from Trimesh2

  • 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

Building

Dependencies

  • Trimesh2 relies on fmt library and use vcpkg to manage the dependencies
  • OpenGl dependency has been removed

Build steps

  • The build use Cmake

Info

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

About

C++ library and set of utilities for input, output, and basic manipulation of 3D triangle meshes

License:GNU General Public License v2.0


Languages

Language:C++ 86.8%Language:POV-Ray SDL 12.4%Language:CMake 0.6%Language:C 0.2%