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: u32
§vertices: Vec<Vector3<f64>>
§vertices_array: Vec<u32>
§st: Vec<Vector2<f64>>
§normals: Vec<Vector3<f64>>
§num_faces: u32
§face_array: Vec<u32>
Implementations§
Source§impl PolyMesh
impl PolyMesh
Sourcepub fn new(
subdivision_width: Option<u32>,
subdivision_height: Option<u32>,
height: Option<u32>,
width: Option<u32>,
) -> Self
pub fn new( subdivision_width: Option<u32>, subdivision_height: Option<u32>, height: Option<u32>, width: Option<u32>, ) -> Self
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.
Sourcepub fn export_to_obj(&self, filename: &str)
pub fn export_to_obj(&self, filename: &str)
Exports mesh to obj format
Sourcepub fn calculate_normals(&mut self)
pub fn calculate_normals(&mut self)
Calculates normals using geometric normals
Auto Trait Implementations§
impl Freeze for PolyMesh
impl RefUnwindSafe for PolyMesh
impl Send for PolyMesh
impl Sync for PolyMesh
impl Unpin for PolyMesh
impl UnwindSafe for PolyMesh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.