#[derive(Debug, Clone)]
pub struct Object {
pub mass: f64,
pub temperature: f64,
pub is_celsius: bool,
pub specific_heat_capacity: f64,
pub density: f64,
pub kinetic_energy: f64,
pub velocity: [f64; 3],
pub acceleration: [f64; 3],
pub position: [f64; 3],
}
impl Object {
pub fn new() -> Self {
Self {
mass: 0.0,
temperature: 0.0,
is_celsius: false,
specific_heat_capacity: 0.0,
density: 0.0,
kinetic_energy: 0.0,
velocity: [0.0, 0.0, 0.0],
acceleration: [0.0, 0.0, 0.0],
position: [0.0, 0.0, 0.0],
}
}
pub fn default() -> Self {
Self {
mass: 1.0,
temperature: 293.15,
is_celsius: false,
specific_heat_capacity: 4186.0,
density: 1.0,
kinetic_energy: 0.0,
velocity: [0.0, 0.0, 0.0],
acceleration: [0.0, 0.0, 0.0],
position: [0.0, 0.0, 0.0],
}
}
}