Trait TriangleMeshView

Source
pub trait TriangleMeshView {
    // Required methods
    fn position_count(&self) -> usize;
    fn position(&self, index: usize) -> DVec3;
    fn triangle_count(&self) -> usize;
    fn triangle(&self, index: usize) -> [u64; 3];
}
Expand description

Read-only triangle mesh with arbitrary caller index storage.

This is the validation seam for foreign meshes. Implementations must return a finite, stable position for every index < position_count(); triangle indices may be invalid and are reported by validation rather than trusted.

Required Methods§

Source

fn position_count(&self) -> usize

Number of addressable positions.

Source

fn position(&self, index: usize) -> DVec3

Position at a valid index.

Source

fn triangle_count(&self) -> usize

Number of complete triangle records.

Source

fn triangle(&self, index: usize) -> [u64; 3]

Three caller-provided position indices for one triangle.

Implementors§