pub struct Lod { /* private fields */ }Expand description
Level of Detail structure containing meshes at a specific quality level.
LODs allow the game engine to render lower-poly versions of models at greater distances, improving performance. Each LOD contains one or more mesh blocks.
Implementations§
Source§impl Lod
impl Lod
Sourcepub fn visibility_distance(&self) -> &f32
pub fn visibility_distance(&self) -> &f32
Distance in game units at which this LOD becomes visible. Lower distances = higher detail. Typically: LOD0 = 0.0, LOD1 = 75.0, LOD2 = 150.0, etc.
Authored LOD index (0 = highest quality, 1 = medium, 2 = low, etc.).
Sourcepub fn quality_level(&self) -> &u32
pub fn quality_level(&self) -> &u32
Quality level indicator (purpose not fully documented).
Sourcepub fn mesh_blocks(&self) -> &Vec<MeshBlock>
pub fn mesh_blocks(&self) -> &Vec<MeshBlock>
Individual mesh blocks that make up this LOD. Each block has its own geometry and material.
Source§impl Lod
impl Lod
Sourcepub fn visibility_distance_mut(&mut self) -> &mut f32
pub fn visibility_distance_mut(&mut self) -> &mut f32
Distance in game units at which this LOD becomes visible. Lower distances = higher detail. Typically: LOD0 = 0.0, LOD1 = 75.0, LOD2 = 150.0, etc.
Authored LOD index (0 = highest quality, 1 = medium, 2 = low, etc.).
Sourcepub fn quality_level_mut(&mut self) -> &mut u32
pub fn quality_level_mut(&mut self) -> &mut u32
Quality level indicator (purpose not fully documented).
Sourcepub fn mesh_blocks_mut(&mut self) -> &mut Vec<MeshBlock>
pub fn mesh_blocks_mut(&mut self) -> &mut Vec<MeshBlock>
Individual mesh blocks that make up this LOD. Each block has its own geometry and material.
Source§impl Lod
impl Lod
Sourcepub fn set_visibility_distance(&mut self, val: f32) -> &mut Self
pub fn set_visibility_distance(&mut self, val: f32) -> &mut Self
Distance in game units at which this LOD becomes visible. Lower distances = higher detail. Typically: LOD0 = 0.0, LOD1 = 75.0, LOD2 = 150.0, etc.
Authored LOD index (0 = highest quality, 1 = medium, 2 = low, etc.).
Sourcepub fn set_quality_level(&mut self, val: u32) -> &mut Self
pub fn set_quality_level(&mut self, val: u32) -> &mut Self
Quality level indicator (purpose not fully documented).
Sourcepub fn set_mesh_blocks(&mut self, val: Vec<MeshBlock>) -> &mut Self
pub fn set_mesh_blocks(&mut self, val: Vec<MeshBlock>) -> &mut Self
Individual mesh blocks that make up this LOD. Each block has its own geometry and material.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lod
impl<'de> Deserialize<'de> for Lod
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 Lod
Auto Trait Implementations§
impl Freeze for Lod
impl RefUnwindSafe for Lod
impl Send for Lod
impl Sync for Lod
impl Unpin for Lod
impl UnsafeUnpin for Lod
impl UnwindSafe for Lod
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.