Struct genmesh::Neighbors[][src]

pub struct Neighbors<T> {
    pub vertices: Vec<T>,
    pub polygons: Vec<Triangle<usize>>,
    // some fields omitted
}

Neighbors search accelerating structure.

Fields

Mesh vertices.

Mesh polygons.

Methods

impl<T> Neighbors<T>
[src]

Build a Neighbors search based on the supplied vertices and supplied triangle list.

return the vector and triangle list used to create the Neighbors

looks up the index of every polygon that contains vertex t, this can be used to calculate new faces

looks up the index of every polygon that is a neighbor of polygon at index i. This can be used to prep data for a Geometry shader (eg trinagle_adjacency)

Calculate the normal for face. This is a flat shading

You must supply a function that can be used to lookup The position which is needed to calculate the normal

Calculate the normal for an vertex based on the average of it's Neighbors this is a smooth shading

You must supply a function that can be used to lookup The position which is needed to calculate the normal

Auto Trait Implementations

impl<T> Send for Neighbors<T> where
    T: Send

impl<T> Sync for Neighbors<T> where
    T: Sync