[][src]Struct mesh_generation::PolyMesh

pub struct PolyMesh {
    pub num_vertices: u32,
    pub vertices: Vec<Vector3<f64>>,
    pub vertices_array: Vec<u32>,
    pub st: Vec<Vector2<f64>>,
    pub normals: Vec<Vector3<f64>>,
    pub num_faces: u32,
    pub face_array: Vec<u32>,
}

Fields

num_vertices: u32vertices: Vec<Vector3<f64>>vertices_array: Vec<u32>st: Vec<Vector2<f64>>normals: Vec<Vector3<f64>>num_faces: u32face_array: Vec<u32>

Implementations

impl PolyMesh[src]

pub fn new(
    subdivision_width: Option<u32>,
    subdivision_height: Option<u32>,
    height: Option<u32>,
    width: Option<u32>
) -> Self
[src]

Creates new mesh with subdivision_width and subdivision_height subdivisions width wise and height wise respectively. Height and width set the scale of the mesh.

pub fn export_to_obj(&self, filename: &str)[src]

Exports mesh to obj format

pub fn calculate_normals(&mut self)[src]

Calculates normals using geometric normals

pub fn displace_with_noise_map(
    &mut self,
    noise_map: Vec<f64>,
    image_width: u32,
    image_height: u32
)
[src]

Displaces mesh according to noise map provided.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.