pub struct Mesh3D { /* private fields */ }Expand description
Indexed triangle mesh with local axis-aligned bounding box, 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 compute_smooth_normals(&mut self)
pub fn compute_smooth_normals(&mut self)
Recomputes area-weighted smooth per-vertex normals across all indexed triangles.
§Arguments
&Self- Mutable 3D mesh.
Sourcepub fn compute_lengyel_tangents(&mut self)
pub fn compute_lengyel_tangents(&mut self)
Computes MikkTSpace-compatible Lengyel tangent-space vectors (tx, ty, tz, handedness) from positions, normals, and uv0.
§Arguments
&Self- Mutable 3D mesh.
Sourcepub fn resolve_triangle_material(
&self,
tri_index: usize,
primary_material: PbrMaterial,
) -> (PbrMaterial, u16)
pub fn resolve_triangle_material( &self, tri_index: usize, primary_material: PbrMaterial, ) -> (PbrMaterial, u16)
Sourcepub fn box_mesh(
name: &str,
width_val: f32,
height_val: f32,
delta_val: f32,
ground_pivot: bool,
material: PbrMaterial,
) -> Self
pub fn box_mesh( name: &str, width_val: f32, height_val: f32, delta_val: 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,
width_val: f32,
delta_val: f32,
subdivisions: usize,
material: PbrMaterial,
) -> Self
pub fn ground_plane( name: &str, width_val: f32, delta_val: f32, subdivisions: usize, material: PbrMaterial, ) -> Self
Sourcepub fn coastal_ocean_ring(
name: &str,
outer_span: f32,
inner_half_x: f32,
inner_half_z: f32,
subdivisions: usize,
material: PbrMaterial,
) -> Self
pub fn coastal_ocean_ring( name: &str, outer_span: f32, inner_half_x: f32, inner_half_z: f32, subdivisions: usize, material: PbrMaterial, ) -> Self
Builds a subdivided coastal ocean water ring mesh spanning outer_span while omitting submerged interior quads strictly inside the solid island footprint and grouping triangles into spatially coherent 4x4 blocks for Nanite frustum culling.
§Arguments
&str- Mesh asset name.f32- Total horizontal outer span in meters along X and Z.f32- Solid island half-width along X in meters.f32- Solid island half-depth along Z in meters.usize- Grid subdivisions along each axis (8..=32).PbrMaterial- Ocean water PBR material.
§Returns
Self- Watertight coastal ocean ring mesh with spatial meshlets.
Sourcepub fn sports_car(name: &str, material: PbrMaterial) -> Self
pub fn sports_car(name: &str, material: PbrMaterial) -> Self
Sourcepub fn aventador_svj(name: &str, material: PbrMaterial) -> Self
pub fn aventador_svj(name: &str, material: PbrMaterial) -> Self
Builds an ultra-sculpted authentic Lamborghini (Revuelto / Aventador SVJ V12 DNA) supercar mesh with continuous Catmull-Rom curved bodywork, smooth normals, carved wheel arches, teardrop canopy, exposed V12 engine bay, Y-shaped LED headlights and taillights, swan-neck curved GT wing, multi-fin carbon diffuser, high-mounted central twin hexagonal titanium exhausts, and concave 10-spoke Y-pattern wheels.
§Arguments
&str- Asset name.PbrMaterial- Primary metallic pearlescent body paint PBR material.
§Returns
Self- Closed smooth-shaded multi-material Lamborghini supercar mesh.
Sourcepub fn lamborghini_revuelto(name: &str, material: PbrMaterial) -> Self
pub fn lamborghini_revuelto(name: &str, material: PbrMaterial) -> Self
Sourcepub fn shelby_cobra(name: &str, material: PbrMaterial) -> Self
pub fn shelby_cobra(name: &str, material: PbrMaterial) -> Self
Builds an ultra-sculpted authentic 2025/2026 Ford Mustang S650 (Dark Horse / GT Fastback DNA) mesh with continuous Catmull-Rom curved Coke-bottle bodywork, domed power-bulge hood with heat extractor vent, trapezoidal S650 hex grille, tri-bar DRL brow and triple-projector LED headlamps, sweeping fastback roofline, concave gloss-black rear decklid with glowing tri-bar red LED taillights, sculpted diffuser with quad outboard dark-chrome exhaust tips, curved performance decklid spoiler, and split-5-spoke forged wheels with red Brembo calipers.
§Arguments
&str- Asset name.PbrMaterial- Primary metallic muscle-car paint PBR material.
§Returns
Self- Closed smooth-shaded multi-material Ford Mustang S650 mesh.
Sourcepub fn mustang_s650(name: &str, material: PbrMaterial) -> Self
pub fn mustang_s650(name: &str, material: PbrMaterial) -> Self
Sourcepub fn npc_sedan(name: &str, material: PbrMaterial) -> Self
pub fn npc_sedan(name: &str, material: PbrMaterial) -> Self
Sourcepub fn npc_coupe(name: &str, material: PbrMaterial) -> Self
pub fn npc_coupe(name: &str, material: PbrMaterial) -> Self
Sourcepub fn npc_suv(name: &str, material: PbrMaterial) -> Self
pub fn npc_suv(name: &str, material: PbrMaterial) -> Self
Sourcepub fn building_art_deco_tower(name: &str, material: PbrMaterial) -> Self
pub fn building_art_deco_tower(name: &str, material: PbrMaterial) -> Self
Builds Archetype 1: an Art-Deco stepped setback skyscraper ([-0.5, +0.5] unit footprint, y in [0, 1]) featuring a grand stone podium, three tiered setbacks with vertical corner pilasters, an illuminated warm-gold crown pavilion, and a slender tapered spire.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary curtain-wall facade material (slot 0).
§Returns
Self- Closed multi-material unit Art-Deco setback tower mesh.
Sourcepub fn building_chamfered_glass_tower(name: &str, material: PbrMaterial) -> Self
pub fn building_chamfered_glass_tower(name: &str, material: PbrMaterial) -> Self
Builds Archetype 2: a chamfered octagonal modernist glass tower ([-0.5, +0.5] unit footprint, y in [0, 1]) with horizontal structural sky-deck slab bands, a recessed illuminated mid-level sky-garden notch, and a sculpted angled roof parapet.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary glass curtain-wall material (slot 0).
§Returns
Self- Closed multi-material unit chamfered glass tower mesh.
Sourcepub fn building_twisted_spire_tower(name: &str, material: PbrMaterial) -> Self
pub fn building_twisted_spire_tower(name: &str, material: PbrMaterial) -> Self
Builds Archetype 3: a twisted tapering futuristic spire ([-0.5, +0.5] unit footprint, y in [0, 1]) with helical metallic exoskeletal ribs, a glowing observation rim band, and an asymmetrical diagonal roof fin.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary curtain-wall facade material (slot 0).
§Returns
Self- Closed multi-material unit twisted spire mesh.
Sourcepub fn building_cantilever_tech_tower(name: &str, material: PbrMaterial) -> Self
pub fn building_cantilever_tech_tower(name: &str, material: PbrMaterial) -> Self
Builds Archetype 4: a cantilevered contemporary tech and cultural tower ([-0.5, +0.5] unit footprint, y in [0, 1]) with a sleek glass podium, recessed atrium waist, boldly offset upper cantilevered volumes with warm illuminated overhang soffits, and a rooftop louver pergola.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary curtain-wall facade material (slot 0).
§Returns
Self- Closed multi-material unit cantilevered tower mesh.
Sourcepub fn building_cylindrical_landmark(name: &str, material: PbrMaterial) -> Self
pub fn building_cylindrical_landmark(name: &str, material: PbrMaterial) -> Self
Builds Archetype 5: a 16-sided smooth cylindrical landmark glass tower ([-0.5, +0.5] unit footprint, y in [0, 1]) with a recessed lobby colonnade, horizontal metallic floor-slab rings, and a sculpted slanted crown.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary curved glass facade material (slot 0).
§Returns
Self- Closed multi-material unit cylindrical landmark mesh.
Sourcepub fn building_boutique_podium_block(name: &str, material: PbrMaterial) -> Self
pub fn building_boutique_podium_block(name: &str, material: PbrMaterial) -> Self
Builds Archetype 6: a human-scale boutique neo-classical mid-rise boulevard podium block ([-0.5, +0.5] unit footprint, y in [0, 1]) with a recessed warm-lit ground-floor retail arcade colonnade, projecting stone cornices, pilasters, terraced penthouse setback, and rooftop warm accent lighting.
§Arguments
&str- Mesh asset name.PbrMaterial- Primary architectural facade material (slot 0).
§Returns
Self- Closed multi-material unit boutique boulevard podium mesh.
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
Implements impl #impl_generics #name #ty_generics #where_clause.
impl Mesh3D
Implements impl #impl_generics #name #ty_generics #where_clause.