#[non_exhaustive]pub struct P3D {
pub version: u32,
pub lods: Vec<LOD>,
}Expand description
An MLOD model.
ⓘ
let _ = dayzmake_core::p3d::P3D { version: 0, lods: Vec::new() };Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version: u32MLOD format version.
lods: Vec<LOD>The model’s LODs, in file order.
Implementations§
Source§impl P3D
impl P3D
Sourcepub fn new(version: u32) -> P3D
pub fn new(version: u32) -> P3D
Creates a model without LODs; version is the MLOD version (0x101 in practice).
Sourcepub fn write<O: Write>(&self, output: &mut O) -> Result<(), Error>
pub fn write<O: Write>(&self, output: &mut O) -> Result<(), Error>
Writes the model as MLOD.
§Errors
Returns an error on I/O failure, or if a LOD is inconsistent (a selection whose size is not points + faces, a vertex index out of range, a tagg name or face texture or material containing a NUL byte, a face that does not have 3 or 4 vertices).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for P3D
impl RefUnwindSafe for P3D
impl Send for P3D
impl Sync for P3D
impl Unpin for P3D
impl UnsafeUnpin for P3D
impl UnwindSafe for P3D
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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