nif/blocks/ni_main/
ni_lod_node.rs

1use crate::common::BlockRef;
2
3use super::ni_switch_node::NiSwitchNode;
4use binrw::{
5    io::{Read, Seek},
6    BinRead, BinReaderExt,
7};
8
9#[derive(Debug, PartialEq, BinRead)]
10pub struct NiLODNode {
11    pub base: NiSwitchNode,
12    pub lod_level_data_ref: BlockRef,
13}
14
15impl NiLODNode {
16    pub fn parse<R: Read + Seek>(reader: &mut R) -> anyhow::Result<Self> {
17        Ok(reader.read_le()?)
18    }
19}
20
21impl std::ops::Deref for NiLODNode {
22    type Target = NiSwitchNode;
23
24    fn deref(&self) -> &Self::Target {
25        &self.base
26    }
27}