[−][src]Struct signed_distance_field::distance_field::NormalizedDistanceField
Represents a distance field which was normalized to the range [0, 1]
.
Also contains information about the greatest distances of the unnormalized distance field.
Fields
width: u16
height: u16
distances: D
All distances are in the range of [0..1]
.
zero_distance: f32
In the original distance field, edges are represented by a distance of zero. Normalizing the distance field will result in edges no longer being zero. The normalized field will have edges somewhere between zero and one. This float describes the new value that edges in the normalized field have.
former_min_distance: f32
The largest distance in the image to the nearest edge outside of a shape .
former_max_distance: f32
The largest distance in the image to the nearest edge inside of a shape
Methods
impl<D> NormalizedDistanceField<D> where
D: DistanceStorage,
[src]
D: DistanceStorage,
pub fn from_distance_field(distance_field: SignedDistanceField<D>) -> Self
[src]
Scales all distances such that the smallest distance is zero and the largest is one. Also computes the former minimum and maximum distance, as well as the new edge-value.
Auto Trait Implementations
impl<D> Send for NormalizedDistanceField<D> where
D: Send,
D: Send,
impl<D> Sync for NormalizedDistanceField<D> where
D: Sync,
D: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,