[][src]Struct salva3d::object::Boundary

pub struct Boundary {
    pub positions: Vec<Point<Real>>,
    pub velocities: Vec<Vector<Real>>,
    pub volumes: Vec<Real>,
    pub forces: Option<RwLock<Vec<Vector<Real>>>>,
}

A boundary object.

A boundary object is composed of static particles, or of particles coupled with non-fluid bodies.

Fields

positions: Vec<Point<Real>>

The world-space position of the boundary particles.

velocities: Vec<Vector<Real>>

The artificial velocities of each boundary particle.

volumes: Vec<Real>

The volume computed for each boundary particle.

forces: Option<RwLock<Vec<Vector<Real>>>>

The forces applied to each particle of this boundary object. If this is set to None (which is the default), the boundary won't receive any force for fluids.

Implementations

impl Boundary[src]

pub fn new(particle_positions: Vec<Point<Real>>) -> Self[src]

Initialize a boundary object with the given particles.

pub fn num_particles(&self) -> usize[src]

The number of particles of this boundary object.

pub fn transform_by(&mut self, pose: &Isometry<Real>)[src]

Transforms all the particle positions of this boundary by the given isometry.

pub fn apply_force(&self, i: usize, f: Vector<Real>)[src]

Apply a force f to the i-th particle of this boundary object.

This call relies on thread-safe interior mutability.

pub fn clear_forces(&mut self, resize_buffer: bool)[src]

Clears all the forces applied to this boundary object's particles.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,