[]Struct lumol::sys::ParticleVec

pub struct ParticleVec {
    pub name: Vec<String>,
    pub kind: Vec<ParticleKind>,
    pub charge: Vec<f64>,
    pub mass: Vec<f64>,
    pub position: Vec<Vector3D>,
    pub velocity: Vec<Vector3D>,
}

An analog to Vec<Particle> with Struct of Array (SoA) layout

Fields

A vector of name from a Particle

A vector of kind from a Particle

A vector of charge from a Particle

A vector of mass from a Particle

A vector of position from a Particle

A vector of velocity from a Particle

Methods

impl ParticleVec

Similar to Vec<Particle> ::with_capacity(), initializing all fields with the given capacity.

Similar to Vec<Particle> ::capacity(), the capacity of all fields should be the same.

Similar to Vec<Particle> ::reserve(), reserving the same additional space for all fields.

Similar to Vec<Particle> ::reserve_exact() reserving the same additional space for all fields.

Similar to Vec<Particle> ::shrink_to_fit() shrinking all fields.

Similar to Vec<Particle> ::truncate() truncating all fields.

Similar to Vec<Particle> ::len(), all the fields should have the same length.

Similar to Vec<Particle> ::is_empty(), all the fields should have the same length.

Create a slice of this vector matching the given range. This is analogous to Index<Range<usize>>.

Create a mutable slice of this vector matching the given range. This is analogous to IndexMut<Range<usize>>.

impl ParticleVec

impl ParticleVec

Get an iterator over the ParticleRef in this vector

impl ParticleVec

Get a mutable iterator over the ParticleRefMut in this vector

Trait Implementations

impl<'a> IntoIterator for &'a mut ParticleVec

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<'a> IntoIterator for &'a ParticleVec

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Debug for ParticleVec

Formats the value using the given formatter. Read more

impl Clone for ParticleVec

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for ParticleVec

impl Sync for ParticleVec

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more