use bevy::prelude::{Component, Reflect, Vec3};
#[derive(Debug, Clone, Component, Reflect)]
pub struct VerletPoint {
pub(crate) old_position: Option<Vec3>,
pub mass: f32,
}
impl Default for VerletPoint {
fn default() -> Self {
Self {
old_position: None,
mass: 1.0,
}
}
}
impl VerletPoint {
#[inline]
#[must_use]
pub fn new(mass: f32) -> Self {
assert!(mass > 0.0);
Self {
mass,
old_position: None,
}
}
}