pub struct Simulator {
pub rigid_bodies: Arc<RwLock<Vec<RigidBody2D>>>,
pub springs: Arc<RwLock<Vec<Spring>>>,
/* private fields */
}Fields§
§rigid_bodies: Arc<RwLock<Vec<RigidBody2D>>>§springs: Arc<RwLock<Vec<Spring>>>Implementations§
Source§impl Simulator
impl Simulator
pub fn builder() -> SimulatorBuilder
pub fn average_node_position(&self) -> Vec2
pub fn max_node_mass(&self) -> f32
pub fn insert_node(&self, vec: Vec3)
pub fn simulation_step(&self)
pub fn find_closest_node_index(&self, loc: Vec3) -> Option<u32>
pub fn set_node_location_by_index(&self, loc: Vec3, index: u32)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Simulator
impl RefUnwindSafe for Simulator
impl Send for Simulator
impl Sync for Simulator
impl Unpin for Simulator
impl UnwindSafe for Simulator
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)