pub struct MeshCase {
pub flags: u8,
pub meter: u8,
pub version: [u16; 3],
pub version_type: u8,
pub version_number: u8,
pub resource: Vec<u8>,
pub value: TreeCase,
}Expand description
A Mesh’s or a Sprite’s value, the version and byte order its file has,
the bytes its m_StreamData reads and the meter, for the meshdecode
target (unityrs-meshdecode’s MeshHandler).
Layout: the flags (a byte of MeshCase’s bits), the meter (a byte),
the version (major, minor and build, each a u16, little-endian, then
the type and its number, a byte each), the resource (a u16 of length,
little-endian, and its bytes), then the value, a TreeCase, which runs
to the end. An input that stops inside the header is the default case,
and one that stops inside the resource keeps the header alone.
Fields§
§flags: u8The bits below.
meter: u8The meter: 0 runs the handler under the case’s limits alone; any
other value runs it again under a meter of meter² × 64 bytes.
version: [u16; 3]The version’s major, minor and build.
version_type: u8The version’s type (a UnityVersionType byte, any value).
version_number: u8The number after the type.
resource: Vec<u8>What a resource read returns, at most 65,535 bytes.
value: TreeCaseThe value’s tree and bytes.
Implementations§
Source§impl MeshCase
impl MeshCase
Sourcepub const BIG_ENDIAN: u8 = 2
pub const BIG_ENDIAN: u8 = 2
The file is big-endian (the handler swaps the vertex data’s bytes).
Sourcepub const RESOURCES: u8 = 4
pub const RESOURCES: u8 = 4
The handler has a resource reader (MeshHandler::process’s
Resources), returning Self::resource.