pub struct ParticleSystem<'p, V, S, T: ?Sized> {
pub affected: &'p [PointMass<V, S>],
pub massive: &'p T,
}
Expand description
Flexible, copyable storage with references to affected particles and a generic massive storage.
Fields§
§affected: &'p [PointMass<V, S>]
Particles for which the acceleration is computed.
massive: &'p T
Particles responsible for the acceleration exerted on the affected
particles, in a
storage T
.
Implementations§
Source§impl<'p, V, S, T: ?Sized> ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> ParticleSystem<'p, V, S, T>
Sourcepub const fn with(affected: &'p [PointMass<V, S>], massive: &'p T) -> Self
pub const fn with(affected: &'p [PointMass<V, S>], massive: &'p T) -> Self
Creates a new ParticleSystem
with the given slice of particles and massive storage.
Trait Implementations§
Source§impl<V, S, T: ?Sized> Clone for ParticleSystem<'_, V, S, T>
impl<V, S, T: ?Sized> Clone for ParticleSystem<'_, V, S, T>
Source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
Source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
Source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
Source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
Source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
Source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
Source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
Source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
Source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
Source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
Source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
Source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
Source§impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForce<'_>
impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForce<'_>
Source§impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForceSoftened<'_>
impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForceSoftened<'_>
impl<V, S, T: ?Sized> Copy for ParticleSystem<'_, V, S, T>
Auto Trait Implementations§
impl<'p, V, S, T> Freeze for ParticleSystem<'p, V, S, T>where
T: ?Sized,
impl<'p, V, S, T> RefUnwindSafe for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T> Send for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T> Sync for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T> Unpin for ParticleSystem<'p, V, S, T>where
T: ?Sized,
impl<'p, V, S, T> UnwindSafe for ParticleSystem<'p, V, S, T>
Blanket Implementations§
Source§impl<U> AsPrimitive for U
impl<U> AsPrimitive for U
Source§fn as_<F: FromPrimitive<Self>>(self) -> F
fn as_<F: FromPrimitive<Self>>(self) -> F
Converts this primitive into the input primitive.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<const X: usize, const D: usize, V, S, C, O> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, ParticleTree<X, D, V, S>>, Output = O>,
V: Copy + FloatVector<Float = S, Array = [S; D]>,
S: Copy + Float + Sum + PartialOrd + FromPrimitive<usize>,
BoundingBox<[S; D]>: SubDivide<Division = [BoundingBox<[S; D]>; X]>,
impl<const X: usize, const D: usize, V, S, C, O> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, ParticleTree<X, D, V, S>>, Output = O>,
V: Copy + FloatVector<Float = S, Array = [S; D]>,
S: Copy + Float + Sum + PartialOrd + FromPrimitive<usize>,
BoundingBox<[S; D]>: SubDivide<Division = [BoundingBox<[S; D]>; X]>,
Source§fn compute(
&mut self,
system: ParticleSystem<'_, V, S, [PointMass<V, S>]>,
) -> <C as ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>>>::Output
fn compute( &mut self, system: ParticleSystem<'_, V, S, [PointMass<V, S>]>, ) -> <C as ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>>>::Output
Performs the computation between objects contained in the storage.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more