use super::core::EditorState;
use crate::GearRemapRow;
use indicatrix::optics::materials::GemMaterial;
use indicatrix_cut_core::{Design, RemapRounding};
impl EditorState {
pub(in crate::gui::editor) fn material_combo_options(
&self,
custom: &[GemMaterial],
) -> Vec<String> {
self.material_combo_cache.borrow_mut().options(custom)
}
}
pub(in crate::gui::editor) fn gear_remap_preview(
design: &Design,
from_gear: i32,
to_gear: i32,
rounding: RemapRounding,
) -> Vec<GearRemapRow> {
indicatrix_editor::material::gear_remap_preview(design, from_gear, to_gear, rounding)
.into_iter()
.map(|row| GearRemapRow {
name: row.name.into(),
old_indices: row.old_indices.into(),
new_indices: row.new_indices.into(),
non_integral: row.non_integral,
})
.collect()
}