pub struct Mesh { /* private fields */ }Expand description
Mesh geometry container with vertices, indices, and metadata.
Contains all geometric data needed to render a mesh: vertex positions/normals/UVs, triangle indices, bounding box for culling, and shader parameters.
Implementations§
Source§impl Mesh
impl Mesh
Sourcepub fn material_type(&self) -> &MaterialType
pub fn material_type(&self) -> &MaterialType
Material type determines vertex format and material data structure.
Sourcepub fn shader_params(&self) -> &ShaderParams
pub fn shader_params(&self) -> &ShaderParams
Raw shader parameter data (format not fully documented).
Sourcepub fn lighting_constants(&self) -> &String
pub fn lighting_constants(&self) -> &String
Lighting configuration string (format not fully documented).
Source§impl Mesh
impl Mesh
Sourcepub fn name_mut(&mut self) -> &mut String
pub fn name_mut(&mut self) -> &mut String
Human-readable mesh name (e.g., “head_mesh”, “sword_blade”).
Sourcepub fn material_type_mut(&mut self) -> &mut MaterialType
pub fn material_type_mut(&mut self) -> &mut MaterialType
Material type determines vertex format and material data structure.
Sourcepub fn shader_params_mut(&mut self) -> &mut ShaderParams
pub fn shader_params_mut(&mut self) -> &mut ShaderParams
Raw shader parameter data (format not fully documented).
Sourcepub fn min_bb_mut(&mut self) -> &mut Vector3<f32>
pub fn min_bb_mut(&mut self) -> &mut Vector3<f32>
Axis-aligned bounding box minimum corner (x, y, z).
Sourcepub fn max_bb_mut(&mut self) -> &mut Vector3<f32>
pub fn max_bb_mut(&mut self) -> &mut Vector3<f32>
Axis-aligned bounding box maximum corner (x, y, z).
Sourcepub fn lighting_constants_mut(&mut self) -> &mut String
pub fn lighting_constants_mut(&mut self) -> &mut String
Lighting configuration string (format not fully documented).
Sourcepub fn vertices_mut(&mut self) -> &mut Vec<Vertex>
pub fn vertices_mut(&mut self) -> &mut Vec<Vertex>
Vertex data array. Format depends on material_type and vertex format.
See Vertex for field details.
Sourcepub fn indices_mut(&mut self) -> &mut Vec<u16>
pub fn indices_mut(&mut self) -> &mut Vec<u16>
Index buffer defining triangles (groups of 3 indices into vertices).
Source§impl Mesh
impl Mesh
Sourcepub fn set_name(&mut self, val: String) -> &mut Self
pub fn set_name(&mut self, val: String) -> &mut Self
Human-readable mesh name (e.g., “head_mesh”, “sword_blade”).
Sourcepub fn set_material_type(&mut self, val: MaterialType) -> &mut Self
pub fn set_material_type(&mut self, val: MaterialType) -> &mut Self
Material type determines vertex format and material data structure.
Sourcepub fn set_shader_params(&mut self, val: ShaderParams) -> &mut Self
pub fn set_shader_params(&mut self, val: ShaderParams) -> &mut Self
Raw shader parameter data (format not fully documented).
Sourcepub fn set_min_bb(&mut self, val: Vector3<f32>) -> &mut Self
pub fn set_min_bb(&mut self, val: Vector3<f32>) -> &mut Self
Axis-aligned bounding box minimum corner (x, y, z).
Sourcepub fn set_max_bb(&mut self, val: Vector3<f32>) -> &mut Self
pub fn set_max_bb(&mut self, val: Vector3<f32>) -> &mut Self
Axis-aligned bounding box maximum corner (x, y, z).
Sourcepub fn set_lighting_constants(&mut self, val: String) -> &mut Self
pub fn set_lighting_constants(&mut self, val: String) -> &mut Self
Lighting configuration string (format not fully documented).
Sourcepub fn set_vertices(&mut self, val: Vec<Vertex>) -> &mut Self
pub fn set_vertices(&mut self, val: Vec<Vertex>) -> &mut Self
Vertex data array. Format depends on material_type and vertex format.
See Vertex for field details.
Sourcepub fn set_indices(&mut self, val: Vec<u16>) -> &mut Self
pub fn set_indices(&mut self, val: Vec<u16>) -> &mut Self
Index buffer defining triangles (groups of 3 indices into vertices).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mesh
impl<'de> Deserialize<'de> for Mesh
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Mesh
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.