use crate::scene::material::Material;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum RenderMode {
Solid,
Wireframe,
}
pub trait ViewportObject {
fn id(&self) -> u64;
fn mesh_id(&self) -> Option<u64>;
fn model_matrix(&self) -> glam::Mat4;
fn position(&self) -> glam::Vec3;
fn rotation(&self) -> glam::Quat;
fn scale(&self) -> glam::Vec3 {
glam::Vec3::ONE
}
fn is_visible(&self) -> bool;
fn color(&self) -> glam::Vec3;
fn show_normals(&self) -> bool {
false
}
fn render_mode(&self) -> RenderMode {
RenderMode::Solid
}
fn transparency(&self) -> f32 {
1.0
}
fn material(&self) -> Material {
Material::from_color(self.color().into())
}
}