All Projects → Forceflow → Trimesh2

Forceflow / Trimesh2

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

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Trimesh2

Pymesh
Geometry Processing Library for Python
Stars: ✭ 1,135 (+450.97%)
Mutual labels:  graphics, 3d, geometry
Sophus
C++ implementation of Lie Groups using Eigen.
Stars: ✭ 1,048 (+408.74%)
Mutual labels:  graphics, 3d, geometry
Elm Geometry
2D/3D geometry package for Elm
Stars: ✭ 162 (-21.36%)
Mutual labels:  transformations, geometry
Gaiasky
Mirror of Gaia Sky repository hosted on Gitlab: https://gitlab.com/langurmonkey/gaiasky
Stars: ✭ 162 (-21.36%)
Mutual labels:  graphics, 3d
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+908.25%)
Mutual labels:  graphics, 3d
Xbimgeometry
XbimGeometry contains the CLR interop libraries and the c++ engine used to compute the 3D geometry of models.
Stars: ✭ 152 (-26.21%)
Mutual labels:  3d, geometry
Gltfast
glTF runtime loading library for Unity
Stars: ✭ 156 (-24.27%)
Mutual labels:  graphics, 3d
Hole fixer
Demo implementation of smoothly filling holes in 3D meshes using surface fairing
Stars: ✭ 165 (-19.9%)
Mutual labels:  3d, geometry
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+5616.5%)
Mutual labels:  graphics, 3d
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-12.14%)
Mutual labels:  graphics, 3d
Euc
A software rendering crate that lets you write shaders with Rust
Stars: ✭ 180 (-12.62%)
Mutual labels:  graphics, 3d
Satin
A 3D Graphics Framework built on Apple's Metal
Stars: ✭ 182 (-11.65%)
Mutual labels:  graphics, 3d
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-26.21%)
Mutual labels:  graphics, 3d
Building Blocks
A voxel library for real-time applications.
Stars: ✭ 140 (-32.04%)
Mutual labels:  3d, geometry
Sharpgltf
glTF reader and writer for .NET Standard
Stars: ✭ 159 (-22.82%)
Mutual labels:  graphics, 3d
Cityengine Sdk
CityEngine is a 3D city modeling software for urban design, visual effects, and VR/AR production. With its C++ SDK you can create plugins and standalone apps capable to execute CityEngine CGA procedural modeling rules.
Stars: ✭ 137 (-33.5%)
Mutual labels:  3d, geometry
Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (-20.87%)
Mutual labels:  3d, geometry
Css Camera
New way to see a web page with CSS3 3D transform
Stars: ✭ 195 (-5.34%)
Mutual labels:  graphics, 3d
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-40.29%)
Mutual labels:  graphics, 3d
Cellularforms
An implementation of Andy Lomas' Cellular Forms.
Stars: ✭ 124 (-39.81%)
Mutual labels:  graphics, 3d

TriMesh2 (v2.16)

Build Status License: GPL v3

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

trimesh2 logo

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).

Getting started

  • Download a prebuilt release of trimesh2 or build the library yourself (see further below)
    • The static library will be called trimesh.lib, the debug version is trimeshd.lib.
  • Include the header include/TriMesh.h, and make sure the static library is in your build path. All Trimesh2 functions will be in the TriMesh namespace.
  • Typical ways to get started:
    • Loading a model : TriMesh* themesh = TriMesh::read(filename);.
    • This mesh class contains a data member vertices which 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.
    • If your model contains vertex normals, they will be in normals. You can (re)compute them by calling need_normals on the mesh. There's also need_bbox for a bounding box, need_dcurv for curvature, etc.
    • For inspiration on how to use the library and its various features, check out include/TriMesh.h and the utilities in the utilsrc folder.

Building

Dependencies

  • The library itself has no dependencies other than the standard C++ STL
  • The (optional) mesh_view utility has dependencies on OpenGL and Freeglut, because it needs to display a window with a textured model

Build steps

  • For Windows, build solutions for VS2017 and VS2019 are provided in the 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.
    • The built libraries will be placed in a folder named 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.
    • For Linux, a makefile is provided. You might need additional packages before you can build the utilities on your system. On Ubuntu these are: mesa-common-dev libglu1-mesa-dev libxi-dev.
  • For OSX, I'm being told it builds using the makefile, but I have no way to check. If you encounter problems, please, file an issue report :)

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

Fork Details

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

  • MSVC project for Visual Studio Community Edition 2017 and 2019
  • Fixes for FreeGlut / Gluit compilation
  • Fixes for wingetopt replacement in MSVC
  • Added 64-bit MSVC compilation support

See Also

Other software for importing and manipulating 3D models:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].