physis/layer/
common.rs

1// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4use binrw::binrw;
5
6#[binrw]
7#[derive(Debug)]
8#[brw(little)]
9pub struct RelativePositions {
10    pos: i32,
11    pos_count: i32,
12}
13
14#[binrw]
15#[derive(Debug, Clone, Copy)]
16#[brw(little)]
17#[repr(C)]
18#[allow(dead_code)] // most of the fields are unused at the moment
19pub struct Transformation {
20    pub translation: [f32; 3],
21    pub rotation: [f32; 3],
22    pub scale: [f32; 3],
23}
24
25#[binrw]
26#[derive(Debug)]
27#[brw(little)]
28pub struct Color {
29    pub red: u8,
30    pub green: u8,
31    pub blue: u8,
32    pub alpha: u8,
33}
34
35#[binrw]
36#[derive(Debug)]
37#[brw(little)]
38pub struct ColorHDRI {
39    pub red: u8,
40    pub green: u8,
41    pub blue: u8,
42    pub alpha: u8,
43    pub intensity: f32,
44}