pub struct FieldGrid {
pub strengths: Vec<f32>,
pub colors: Vec<Vec4>,
pub emissions: Vec<f32>,
pub resolution: u32,
pub bounds_min: Vec3,
pub bounds_max: Vec3,
pub step: Vec3,
}Expand description
Sampled 3D field grid.
Fields§
§strengths: Vec<f32>§colors: Vec<Vec4>§emissions: Vec<f32>§resolution: u32§bounds_min: Vec3§bounds_max: Vec3§step: Vec3Implementations§
Source§impl FieldGrid
impl FieldGrid
pub fn index(&self, x: usize, y: usize, z: usize) -> usize
pub fn strength_at(&self, x: usize, y: usize, z: usize) -> f32
pub fn position_at(&self, x: usize, y: usize, z: usize) -> Vec3
pub fn color_at(&self, x: usize, y: usize, z: usize) -> Vec4
pub fn emission_at(&self, x: usize, y: usize, z: usize) -> f32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FieldGrid
impl RefUnwindSafe for FieldGrid
impl Send for FieldGrid
impl Sync for FieldGrid
impl Unpin for FieldGrid
impl UnsafeUnpin for FieldGrid
impl UnwindSafe for FieldGrid
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.