pub struct Point3Soa<L: Copy + Debug + 'static, const N: usize> {
pub len: usize,
pub x: [L; N],
pub y: [L; N],
pub z: [L; N],
}Fields§
§len: usize§x: [L; N]§y: [L; N]§z: [L; N]Implementations§
Source§impl<L, const N: usize> Point3Soa<L, N>
impl<L, const N: usize> Point3Soa<L, N>
pub fn new(default: Point3<L>) -> Self
pub fn push(&mut self, value: Point3<L>)
pub fn pop(&mut self) -> Option<Point3<L>>
pub fn set(&mut self, index: usize, value: Point3<L>)
pub fn get(&self, index: usize) -> Point3<L>
pub fn apply<F>(&mut self, f: F)
pub fn iter(&self) -> Point3Iterator<'_, L, N> ⓘ
pub fn x(&self) -> &[L]
pub fn x_mut(&mut self) -> &mut [L]
pub fn x_range(&self, range: Range<usize>) -> &[L]
pub fn x_range_mut(&mut self, range: Range<usize>) -> &mut [L]
pub fn y(&self) -> &[L]
pub fn y_mut(&mut self) -> &mut [L]
pub fn y_range(&self, range: Range<usize>) -> &[L]
pub fn y_range_mut(&mut self, range: Range<usize>) -> &mut [L]
pub fn z(&self) -> &[L]
pub fn z_mut(&mut self) -> &mut [L]
pub fn z_range(&self, range: Range<usize>) -> &[L]
pub fn z_range_mut(&mut self, range: Range<usize>) -> &mut [L]
Source§impl<const N: usize> Point3Soa<Length, N>
impl<const N: usize> Point3Soa<Length, N>
Sourcepub fn distances_squared(&self, target: Point3<Length32>, out: &mut [Area32])
pub fn distances_squared(&self, target: Point3<Length32>, out: &mut [Area32])
Squared distance from every point to target, written to
out[..len]. Sqrt-free, so the loop vectorizes; enough for
nearest-neighbor style comparisons. Accurate to 1 ulp.
§Panics
If out is shorter than self.len().
Sourcepub fn distances(&self, target: Point3<Length32>, out: &mut [Length32])
pub fn distances(&self, target: Point3<Length32>, out: &mut [Length32])
Distance from every point to target, written to out[..len].
§Panics
If out is shorter than self.len().
Sourcepub fn lerp_toward(&mut self, target: Point3<Length32>, ratio: f32)
pub fn lerp_toward(&mut self, target: Point3<Length32>, ratio: f32)
Every point moved ratio of the way toward target, in place.
Source§impl<const N: usize> Point3Soa<Length, N>
impl<const N: usize> Point3Soa<Length, N>
Sourcepub fn distances_squared(&self, target: Point3<Length64>, out: &mut [Area64])
pub fn distances_squared(&self, target: Point3<Length64>, out: &mut [Area64])
Squared distance from every point to target, written to
out[..len]. Sqrt-free, so the loop vectorizes; enough for
nearest-neighbor style comparisons. Accurate to 1 ulp.
§Panics
If out is shorter than self.len().
Sourcepub fn distances(&self, target: Point3<Length64>, out: &mut [Length64])
pub fn distances(&self, target: Point3<Length64>, out: &mut [Length64])
Distance from every point to target, written to out[..len].
§Panics
If out is shorter than self.len().
Sourcepub fn lerp_toward(&mut self, target: Point3<Length64>, ratio: f64)
pub fn lerp_toward(&mut self, target: Point3<Length64>, ratio: f64)
Every point moved ratio of the way toward target, in place.
Trait Implementations§
Source§impl<'de, L, const N: usize> Deserialize<'de> for Point3Soa<L, N>
impl<'de, L, const N: usize> Deserialize<'de> for Point3Soa<L, N>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<L, const N: usize> Freeze for Point3Soa<L, N>where
L: Freeze,
impl<L, const N: usize> RefUnwindSafe for Point3Soa<L, N>where
L: RefUnwindSafe,
impl<L, const N: usize> Send for Point3Soa<L, N>where
L: Send,
impl<L, const N: usize> Sync for Point3Soa<L, N>where
L: Sync,
impl<L, const N: usize> Unpin for Point3Soa<L, N>where
L: Unpin,
impl<L, const N: usize> UnsafeUnpin for Point3Soa<L, N>where
L: UnsafeUnpin,
impl<L, const N: usize> UnwindSafe for Point3Soa<L, N>where
L: UnwindSafe,
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