pub struct VectorField3D {
pub x: ScalarField3D,
pub y: ScalarField3D,
pub z: ScalarField3D,
}Expand description
3D uniform vector field (three scalar fields)
Fields§
§x: ScalarField3DX component
y: ScalarField3DY component
z: ScalarField3DZ component
Implementations§
Source§impl VectorField3D
impl VectorField3D
Sourcepub fn new(
nx: usize,
ny: usize,
nz: usize,
min: (f32, f32, f32),
max: (f32, f32, f32),
) -> Self
pub fn new( nx: usize, ny: usize, nz: usize, min: (f32, f32, f32), max: (f32, f32, f32), ) -> Self
Create a zero vector field
Sourcepub fn sample(&self, wx: f32, wy: f32, wz: f32) -> (f32, f32, f32)
pub fn sample(&self, wx: f32, wy: f32, wz: f32) -> (f32, f32, f32)
Sample vector at world-space position
Trait Implementations§
Source§impl Clone for VectorField3D
impl Clone for VectorField3D
Auto Trait Implementations§
impl Freeze for VectorField3D
impl RefUnwindSafe for VectorField3D
impl Send for VectorField3D
impl Sync for VectorField3D
impl Unpin for VectorField3D
impl UnsafeUnpin for VectorField3D
impl UnwindSafe for VectorField3D
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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