Abstraction over format

This commit is contained in:
Connor Slade
2024-11-02 13:52:05 -04:00
parent 66977e44b6
commit a0f5ee5303
14 changed files with 132 additions and 52 deletions

View File

@@ -1,8 +1,12 @@
use nalgebra::{Vector2, Vector3};
use serde::{Deserialize, Serialize};
use crate::format::Format;
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct SliceConfig {
pub format: Format,
pub platform_resolution: Vector2<u32>,
pub platform_size: Vector3<f32>,
pub slice_height: f32,
@@ -25,6 +29,8 @@ pub struct ExposureConfig {
impl Default for SliceConfig {
fn default() -> Self {
Self {
format: Format::Goo,
platform_resolution: Vector2::new(11_520, 5_120),
platform_size: Vector3::new(218.88, 122.904, 260.0),
slice_height: 0.05,

6
common/src/format.rs Normal file
View File

@@ -0,0 +1,6 @@
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug)]
pub enum Format {
Goo,
}

View File

@@ -1,4 +1,5 @@
pub mod config;
pub mod format;
pub mod image;
pub mod misc;
pub mod oklab;