pub struct DistanceField {
pub name: String,
pub on: MeshId,
pub to: Vec<MeshId>,
pub max_distance: f64,
pub sign: SignMode,
}Expand description
A signed distance field to register with
Scene::add_distance_field.
Fields§
§name: StringThe field’s name, unique among the fields on mesh on.
on: MeshIdThe mesh whose vertices carry the values (mesh A).
to: Vec<MeshId>The meshes the distances are measured to: at least one, all
different, and not on. A vertex’s value is the smallest over them,
ties going to the lowest index (see
Scene::field_nearest).
max_distance: f64The largest distance computed (inclusive); vertices farther away hold
+∞. Zero or greater, may be infinite.
sign: SignModeHow the sign is decided on each mesh of to.
Implementations§
Trait Implementations§
Source§impl Clone for DistanceField
impl Clone for DistanceField
Source§fn clone(&self) -> DistanceField
fn clone(&self) -> DistanceField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DistanceField
impl Debug for DistanceField
Source§impl PartialEq for DistanceField
impl PartialEq for DistanceField
impl StructuralPartialEq for DistanceField
Auto Trait Implementations§
impl Freeze for DistanceField
impl RefUnwindSafe for DistanceField
impl Send for DistanceField
impl Sync for DistanceField
impl Unpin for DistanceField
impl UnsafeUnpin for DistanceField
impl UnwindSafe for DistanceField
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