pub struct GraphicsMesh {
pub source: String,
pub parts: Vec<MeshPart>,
pub material_instances: Vec<Vec<Option<String>>>,
pub bones: Vec<Bone>,
pub bounds_min: [f32; 3],
pub bounds_max: [f32; 3],
}Expand description
A mesh: its parts, its material sets, its skeleton and its bounds.
Fields§
§source: StringThe original model file.
parts: Vec<MeshPart>The parts.
material_instances: Vec<Vec<Option<String>>>Material instance references, one list per material set.
bones: Vec<Bone>The skeleton’s bones (empty for a rigid mesh).
bounds_min: [f32; 3]The smallest corner of the bounding box.
bounds_max: [f32; 3]The largest corner of the bounding box.
Implementations§
Source§impl GraphicsMesh
impl GraphicsMesh
Sourcepub fn read(r: &mut Reader<'_>) -> Result<Self>
pub fn read(r: &mut Reader<'_>) -> Result<Self>
Read a mesh. Block version 0 (meshes from older toolkits, in mods) keeps each part’s geometry with the part (the DX9 block, then the DX11 block); later versions keep all of it in the two platform blocks at the end, the DX11 one led by an integer.
Original: Graphics::GraphicsMesh::Serialize and PlatformSerialize; the version 0 part
geometry, Runtime 0x1800a55c0.
Original: Runtime 0x180101c40, Runtime 0x1800a5830.
Trait Implementations§
Source§impl Clone for GraphicsMesh
impl Clone for GraphicsMesh
Source§fn clone(&self) -> GraphicsMesh
fn clone(&self) -> GraphicsMesh
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphicsMesh
impl RefUnwindSafe for GraphicsMesh
impl Send for GraphicsMesh
impl Sync for GraphicsMesh
impl Unpin for GraphicsMesh
impl UnsafeUnpin for GraphicsMesh
impl UnwindSafe for GraphicsMesh
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