pub struct VertexData {Show 13 fields
pub vertex_buffers: Vec<VertexBufferDescriptor>,
pub index_buffers: Vec<IndexBufferDescriptor>,
pub unk0: u32,
pub unk1: u32,
pub unk2: u32,
pub vertex_buffer_info: Vec<VertexBufferExtInfo>,
pub outline_buffers: Vec<OutlineBufferDescriptor>,
pub vertex_morphs: Option<VertexMorphs>,
pub buffer: Vec<u8>,
pub unk_data: Option<UnkData>,
pub weights: Option<Weights>,
pub unk7: Option<Unk>,
pub unks: [u32; 5],
}
Expand description
Vertex and vertex index buffer data used by a ModelV112.
Fields§
§vertex_buffers: Vec<VertexBufferDescriptor>
§index_buffers: Vec<IndexBufferDescriptor>
§unk0: u32
§unk1: u32
§unk2: u32
§vertex_buffer_info: Vec<VertexBufferExtInfo>
§outline_buffers: Vec<OutlineBufferDescriptor>
§vertex_morphs: Option<VertexMorphs>
§buffer: Vec<u8>
The data buffer containing all the geometry data aligned to 4096. Buffers are typically packed in this buffer in the following order: vertex_buffers, outline_buffers, index_buffers, vertex_morphs, unk7.
unk_data: Option<UnkData>
§weights: Option<Weights>
§unk7: Option<Unk>
§unks: [u32; 5]
Implementations§
Source§impl VertexData
impl VertexData
Source§impl VertexData
impl VertexData
pub fn read<R: Read + Seek>(reader: &mut R) -> BinResult<Self>
Sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, ReadFileError>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, ReadFileError>
Read from path
using a fully buffered reader for performance.
Sourcepub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> BinResult<Self>
pub fn from_bytes<T: AsRef<[u8]>>(bytes: T) -> BinResult<Self>
Read from bytes
using a fully buffered reader for performance.
Trait Implementations§
Source§impl BinRead for VertexData
impl BinRead for VertexData
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T
from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for VertexData
impl Clone for VertexData
Source§fn clone(&self) -> VertexData
fn clone(&self) -> VertexData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VertexData
impl Debug for VertexData
Source§impl PartialEq for VertexData
impl PartialEq for VertexData
Source§impl Xc3Write for VertexData
impl Xc3Write for VertexData
Source§type Offsets<'offsets> = VertexDataOffsets<'offsets>
type Offsets<'offsets> = VertexDataOffsets<'offsets>
The type storing offset data to be used in Xc3WriteOffsets.
Source§fn xc3_write<W: Write + Seek>(
&self,
writer: &mut W,
endian: Endian,
) -> Xc3Result<Self::Offsets<'_>>
fn xc3_write<W: Write + Seek>( &self, writer: &mut W, endian: Endian, ) -> Xc3Result<Self::Offsets<'_>>
Write all fields and placeholder offsets.
This should almost always be derived for non primitive types. Read more
Source§fn should_write(&self) -> Option<bool>
fn should_write(&self) -> Option<bool>
Return
Some(_)
if the offset should be updated and
Some(true)
if the data should also be written.
Defaults to Some(true)
.impl StructuralPartialEq for VertexData
Auto Trait Implementations§
impl Freeze for VertexData
impl RefUnwindSafe for VertexData
impl Send for VertexData
impl Sync for VertexData
impl Unpin for VertexData
impl UnwindSafe for VertexData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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