Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Graphics | 2,708 | 3 | 1 | a month ago | 25 | December 03, 2021 | 147 | apache-2.0 | Python | |
TensorFlow Graphics: Differentiable Graphics Layers for TensorFlow | ||||||||||
Yocto Gl | 2,590 | a month ago | 9 | C++ | ||||||
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics | ||||||||||
Glitter | 2,237 | 4 months ago | 17 | CMake | ||||||
Dead Simple OpenGL | ||||||||||
Three Mesh Bvh | 1,758 | 8 | 7 | 14 days ago | 36 | June 20, 2022 | 66 | mit | JavaScript | |
A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes. | ||||||||||
Three Gpu Pathtracer | 950 | 14 days ago | 5 | July 16, 2022 | 107 | mit | JavaScript | |||
Path tracing renderer and utilities for three.js built on top of three-mesh-bvh. | ||||||||||
Gltfast | 916 | 20 days ago | 114 | apache-2.0 | C# | |||||
Efficient glTF 3D import / export package for Unity | ||||||||||
Fauxgl | 615 | 1 | 1 | 3 years ago | June 10, 2021 | 8 | mit | Go | ||
Software-only 3D renderer written in Go. | ||||||||||
Texturepanner | 598 | a year ago | 2 | mit | C# | |||||
This repository hosts a shader for Unity3D whose main goal is to facilitate the creation of neon-like signs, conveyor belts and basically whatever based on scrolling textures | ||||||||||
Mesh Processing Library | 540 | 2 months ago | mit | C++ | ||||||
C++ libraries and programs demonstrating mesh processing research published in ACM SIGGRAPH (1992-1998) | ||||||||||
Cuda_voxelizer | 426 | 2 months ago | 9 | mit | C++ | |||||
CUDA Voxelizer to convert polygon meshes into annotated voxel grids |
Header only, single file, simple and efficient C++11 library to compute the signed distance function (SDF) to a triangle mesh.
The distance computation to the triangle collection is accelerated with a sphere bounding volume hierarchy. The sign of the distance is resolved with the method presented in "Generating Signed Distance Fields From Triangle Meshes" by Brentzen, Andreas & Aans, Henrik. (2002).
Assuming triangle normals point outwards from the enclosed volume, the sign of the distance will be positive outside and negative inside.
// Declare mesh vertices and triangles
std::vector<std::array<double, 3>> vertices;
std::vector<std::array<int, 3>> triangles;
// (... fill the `vertices` and `triangles` with the mesh data ...)
// Initialize TriangleMeshDistance
tmd::TriangleMeshDistance mesh_distance(vertices, triangles);
// Query TriangleMeshDistance
tmd::Result result = mesh_distance.signed_distance({ x, y, z });
// Print result
std::cout << "Signed distance: " << result.distance << std::endl;
std::cout << "Nearest point: " << result.nearest_point << std::endl;
std::cout << "Nearest entity: " << result.nearest_entity << std::endl;
std::cout << "Nearest triangle index: " << result.triangle_id << std::endl;
TriangleMeshDistance
keeps a copy of the vertex and triangle data.TriangleMeshDistance
can be declared empty and constructed multiple times with different meshes. If the new mesh needs less memory than the curent one, memory allocations will be avoided.