cherry_rs/specs/
surfaces.rs

1use serde::{Deserialize, Serialize};
2
3use crate::core::Float;
4
5/// Specifies the type of interaction of light with a sequential model surface.
6#[derive(Debug, Serialize, Deserialize, Clone, Copy)]
7pub enum SurfaceType {
8    Refracting,
9    Reflecting,
10    NoOp,
11}
12
13/// Specifies a surface in a sequential optical system model.
14#[derive(Debug, Serialize, Deserialize)]
15pub enum SurfaceSpec {
16    Conic {
17        semi_diameter: Float,
18        radius_of_curvature: Float,
19        conic_constant: Float,
20        surf_type: SurfaceType,
21    },
22    Image,
23    Object,
24    Probe,
25    Stop {
26        semi_diameter: Float,
27    },
28    // Toric {
29    //     semi_diameter: Float,
30    //     radius_of_curvature_vert: Float,
31    //     radius_of_curvature_horz: Float,
32    //     conic_constant: Float,
33    //     surf_type: SurfaceType,
34    // },
35}