Struct sparkl2d_core::dynamics::ParticlePosition
source · #[repr(C)]pub struct ParticlePosition {
pub point: Point<Real>,
}
Fields§
§point: Point<Real>
Implementations§
source§impl ParticlePosition
impl ParticlePosition
pub fn closest_grid_pos(&self, cell_width: Real) -> Point<Real>
pub fn associated_cell_index_in_block_off_by_two( &self, cell_width: Real, ) -> Point<u32>
pub fn associated_grid_pos(&self, cell_width: Real) -> Point<Real>
pub fn dir_to_closest_grid_node(&self, cell_width: Real) -> Vector<Real>
pub fn dir_to_associated_grid_node(&self, cell_width: Real) -> Vector<Real>
Trait Implementations§
source§impl Clone for ParticlePosition
impl Clone for ParticlePosition
source§fn clone(&self) -> ParticlePosition
fn clone(&self) -> ParticlePosition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParticlePosition
impl Debug for ParticlePosition
source§impl Default for ParticlePosition
impl Default for ParticlePosition
source§fn default() -> ParticlePosition
fn default() -> ParticlePosition
Returns the “default value” for a type. Read more
source§impl PartialEq for ParticlePosition
impl PartialEq for ParticlePosition
source§fn eq(&self, other: &ParticlePosition) -> bool
fn eq(&self, other: &ParticlePosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl RealStruct for ParticlePosition
impl RealStruct for ParticlePosition
impl Copy for ParticlePosition
impl Pod for ParticlePosition
impl StructuralPartialEq for ParticlePosition
Auto Trait Implementations§
impl Freeze for ParticlePosition
impl RefUnwindSafe for ParticlePosition
impl Send for ParticlePosition
impl Sync for ParticlePosition
impl Unpin for ParticlePosition
impl UnwindSafe for ParticlePosition
Blanket Implementations§
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.