[−][src]Module tray_rust::geometry::mesh
Defines a triangle mesh geometry. Intersection tests are accelerated internally by storing the triangles of the mesh in a BVH
Scene Usage Example
The mesh is specified by the OBJ file to load and the name of the specific
model within the file to use. The file and other loaded models are kept loaded
so you can easily use the same or other models in the file as well. If no name is
assigned to the model in the file it will be given the name "unnamed_model
",
however it's recommended to name your models.
"geometry": {
"type": "mesh",
"file": "./suzanne.obj",
"model": "Suzanne"
}
Structs
Mesh | A mesh composed of triangles, specified by directly passing the position, normal and index buffers for the triangles making up the mesh |
Triangle | A triangle in some mesh. Just stores a reference to the mesh and the indices of each vertex |
Functions
intersect_triangle |