Skip to main content

Module mesh

Module mesh 

Source
Expand description

Mesh-based items (Surface, Sphere, etc.)

Modulesยง

gltfgltf
glTF scene-graph import (opt-in via the gltf feature). glTF 2.0 scene-graph import into trees of MeshItems, opt-in via the gltf cargo feature. The gltf crate itself is re-exported here, so callers can parse documents without their own matching dependency.
sphere ๐Ÿ”’
Sphere โ€” a sphere mesh item.
surface ๐Ÿ”’
Surface โ€” a parametric surface mesh item.

Structsยง

MeshItem
A high-level mesh item with per-vertex data wrapped in PointVec for animation support.
Sphere
A sphere primitive centered at the origin.
Surface
A parametric surface defined by pre-generated mesh data.

Functionsยง

angle_between ๐Ÿ”’
Angle (in radians) between two vectors.
compute_smooth_normals
Compute smooth vertex normals from a triangle mesh.
generate_grid_indices
Generate triangle indices for a nu ร— nv grid of vertices (row-major layout).