physis/layer/
trigger_box.rs

1// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4use binrw::{binread, binrw};
5
6use super::read_bool_from;
7
8#[binrw]
9#[brw(repr = i32)]
10#[derive(Debug, PartialEq)]
11pub enum TriggerBoxShape {
12    Box = 0x1,
13    Sphere = 0x2,
14    Cylinder = 0x3,
15    Board = 0x4,
16    Mesh = 0x5,
17    BoardBothSides = 0x6,
18}
19
20#[binread]
21#[derive(Debug)]
22#[br(little)]
23pub struct TriggerBoxInstanceObject {
24    pub trigger_box_shape: TriggerBoxShape,
25    pub priority: i16,
26    #[br(map = read_bool_from::<u8>)]
27    pub enabled: bool,
28    padidng: u8,
29    padding1: u32,
30}