pub struct Mesh3D { /* private fields */ }Expand description
Indexed triangle mesh with local AABB, Nanite-style meshlet clusters, and default PBR material.
Implementations§
Source§impl Mesh3D
Mesh construction, Nanite-style meshlet clustering, decimation, and procedural asset generators for Mesh3D.
impl Mesh3D
Mesh construction, Nanite-style meshlet clustering, decimation, and procedural asset generators for Mesh3D.
Sourcepub fn build_meshlets_from_parts(
vertices: &[Vertex3D],
indices: &[[u32; 3]],
) -> Vec<Meshlet3D>
pub fn build_meshlets_from_parts( vertices: &[Vertex3D], indices: &[[u32; 3]], ) -> Vec<Meshlet3D>
Sourcepub fn from_parts(
name: String,
vertices: Vec<Vertex3D>,
indices: Vec<[u32; 3]>,
material: PbrMaterial,
) -> Self
pub fn from_parts( name: String, vertices: Vec<Vertex3D>, indices: Vec<[u32; 3]>, material: PbrMaterial, ) -> Self
Sourcepub fn box_mesh(
name: &str,
w: f32,
h: f32,
d: f32,
ground_pivot: bool,
material: PbrMaterial,
) -> Self
pub fn box_mesh( name: &str, w: f32, h: f32, d: f32, ground_pivot: bool, material: PbrMaterial, ) -> Self
Generates an axis-aligned box mesh of dimensions (w, h, d) resting on y = 0 or centered.
§Arguments
&str- Mesh name.f32- Width along X.f32- Height along Y.f32- Depth along Z.bool- Whentrue, base rests ony = 0; otherwise centered at origin.PbrMaterial- Surface PBR material.
§Returns
Self- Indexed 12-triangle box mesh with crisp flat face normals.
Sourcepub fn ground_plane(
name: &str,
w: f32,
d: f32,
subdivisions: usize,
material: PbrMaterial,
) -> Self
pub fn ground_plane( name: &str, w: f32, d: f32, subdivisions: usize, material: PbrMaterial, ) -> Self
Sourcepub fn sports_car(name: &str, material: PbrMaterial) -> Self
pub fn sports_car(name: &str, material: PbrMaterial) -> Self
Sourcepub fn from_box_desc(desc: &BoxMeshDesc) -> Self
pub fn from_box_desc(desc: &BoxMeshDesc) -> Self
Sourcepub fn from_ground_desc(desc: &GroundPlaneDesc) -> Self
pub fn from_ground_desc(desc: &GroundPlaneDesc) -> Self
Sourcepub fn build_lod_proxy(&self, suffix: &str) -> Self
pub fn build_lod_proxy(&self, suffix: &str) -> Self
Sourcepub fn build_mid_lod(&self, suffix: &str) -> Self
pub fn build_mid_lod(&self, suffix: &str) -> Self
Source§impl Mesh3D
impl Mesh3D
pub fn get_name(&self) -> &String
pub fn get_mut_name(&mut self) -> &mut String
pub fn set_name(&mut self, val: String) -> &mut Self
pub fn get_vertices(&self) -> &Vec<Vertex3D>
pub fn get_mut_vertices(&mut self) -> &mut Vec<Vertex3D>
pub fn set_vertices(&mut self, val: Vec<Vertex3D>) -> &mut Self
pub fn get_indices(&self) -> &Vec<[u32; 3]>
pub fn get_mut_indices(&mut self) -> &mut Vec<[u32; 3]>
pub fn set_indices(&mut self, val: Vec<[u32; 3]>) -> &mut Self
pub fn get_bounds(&self) -> Aabb3D
pub fn get_mut_bounds(&mut self) -> &mut Aabb3D
pub fn set_bounds(&mut self, val: Aabb3D) -> &mut Self
pub fn get_material(&self) -> PbrMaterial
pub fn get_mut_material(&mut self) -> &mut PbrMaterial
pub fn set_material(&mut self, val: PbrMaterial) -> &mut Self
pub fn get_meshlets(&self) -> &Vec<Meshlet3D>
pub fn get_mut_meshlets(&mut self) -> &mut Vec<Meshlet3D>
pub fn set_meshlets(&mut self, val: Vec<Meshlet3D>) -> &mut Self
Trait Implementations§
impl StructuralPartialEq for Mesh3D
Auto Trait Implementations§
impl Forget for Mesh3D
impl Freeze for Mesh3D
impl Move for Mesh3D
impl RefUnwindSafe for Mesh3D
impl Send for Mesh3D
impl Sync for Mesh3D
impl Unpin for Mesh3D
impl UnsafeUnpin for Mesh3D
impl UnwindSafe for Mesh3D
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