[][src]Module tray_rust::geometry::animated_mesh

Defines an animated triangle mesh geometry. It is required that the topology of the mesh being animated does not change. While properties of triangles can be changed over time triangles can't be added or removed. Intersection test 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": "animated_mesh",
    "model": "Suzanne"
    "keyframes": [
        {
            "file": "./suzanne001.obj",
            "time": 0
        },
        {
            "file": "./suzanne002.obj",
            "time": 0.1
        }
    ]
}

Structs

AnimatedMesh

An animated mesh composed of a series of meshes linearly interpolated between over time. It's assumed the mesh topology does not change.

AnimatedMeshData
AnimatedTriangle

An animated triangle in the mesh. Just stores a reference to the mesh and the indices of each vertex