Repository navigation
neraulgraphics 0.3.0
Triangle meshes and dynamic scenes.
Added
- Apache-2.0 license.
- Triangle meshes.
Meshis geometry, built into a BVH once;Instanceplaces a
mesh with its ownTransformandMaterial. The number of instances is not
capped, unlike spheres. Pass them toRenderer(..., meshes, instances). Renderer::set_instance_transforms()(Python: an(N, 3, 4)array or a list of
Transform) moves instances without touching the meshes. The tree over
instances is refitted in place and rebuilt only when it has loosened too far.make_transform(position,(x, y, z, w)quaternion, scale),make_boxand
make_icosphere, in C++ and Python.make raytracerbuilds the viewer and links it as./raytracer;make run
andmake testdo the obvious. The viewer takes--instances Nto spawn
spinning shapes.
Known limits
- Triangles are shaded flat, with no vertex normals or textures.
- Updating instances runs on the CPU: about 9 ms for 10,000 and 90 ms for 100,000.
- Ray-triangle tests are not watertight along an exact shared edge.