pub struct RobSegment {
pub total_size: u32,
pub segment_name: [u8; 8],
pub segment_type: u16,
pub segment_flags: u16,
pub segment_attribs: u8,
pub _face_count_low: [u8; 3],
pub _unused_14: u32,
pub bbox: SegmentBBox,
pub data_size: u32,
pub data: Vec<u8>,
}Expand description
Parsed ROB segment record with metadata and optional payload bytes.
Fields§
§total_size: u32§segment_name: [u8; 8]§segment_type: u16§segment_flags: u16§segment_attribs: u8Attribute flags byte at offset 0x10. 0x02 = texture preload, 0x40 = special object.
_face_count_low: [u8; 3]Bytes at 0x11..0x14: collision flags, reserved zero, and face_count mod 256.
_unused_14: u32Never read at runtime.
bbox: SegmentBBox§data_size: u32§data: Vec<u8>Implementations§
Source§impl RobSegment
impl RobSegment
Sourcepub fn render_mode(&self) -> u8
pub fn render_mode(&self) -> u8
Render mode derived from the high byte of segment_flags.
Value 0 or >0xFD defaults to 0xFF (standard rendering).
Sourcepub const fn has_embedded_3d_data(&self) -> bool
pub const fn has_embedded_3d_data(&self) -> bool
Returns true when this segment stores embedded 3D model bytes.
Sourcepub const fn has_special_embedded_data(&self) -> bool
pub const fn has_special_embedded_data(&self) -> bool
Returns true when this segment stores embedded special-object bytes.
Sourcepub const fn points_to_external_file(&self) -> bool
pub const fn points_to_external_file(&self) -> bool
Returns true when this segment references an external file.
Sourcepub fn parse_embedded_3d_data(&self) -> Result<Model3DFile>
pub fn parse_embedded_3d_data(&self) -> Result<Model3DFile>
Parses embedded 3D bytes in this segment into a Model3DFile.
Trait Implementations§
Source§impl Clone for RobSegment
impl Clone for RobSegment
Auto Trait Implementations§
impl Freeze for RobSegment
impl RefUnwindSafe for RobSegment
impl Send for RobSegment
impl Sync for RobSegment
impl Unpin for RobSegment
impl UnsafeUnpin for RobSegment
impl UnwindSafe for RobSegment
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.