pub struct Directions {
pub resolution: f64,
pub crease: f64,
pub rounds: u32,
pub cutoff: Cutoff,
}Expand description
How face_directions and axis_of_revolution read a mesh’s
normals.
Fields§
§resolution: f64The angle, in radians, within which normals are one direction: face directions closer than this are one, a face direction is the mean normal of the triangles within it, and a wall is a triangle whose normal is within it of perpendicular to an axis. At most π/6, so the ring out to three times it stays on one side of the perpendicular.
crease: f64The angle, in radians, between two neighbouring triangles’ normals at which smoothing stops: an edge this sharp is a crease, and the faces either side of it are smoothed apart.
rounds: u32Rounds of smoothing: each averages every triangle’s normal with its neighbours’ across the edges that are not creases, by area.
cutoff: CutoffHow far past the resolution a face direction reaches for the
triangles only their smoothed normals put within it: to the
cutoff’s threshold over the angles of its triangles’ own normals
from their mean, weighed by area, and never less than the
resolution. Cutoff::All takes every one.
Implementations§
Source§impl Directions
impl Directions
Sourcepub fn check(&self) -> OgeomResult<()>
pub fn check(&self) -> OgeomResult<()>
The options checked: a resolution in (0, π/6], a crease in (0, π] and the cutoff’s number finite and positive.
§Errors
OgeomError::Domain for any of
them out of its range or not finite.
Trait Implementations§
Source§impl Clone for Directions
impl Clone for Directions
impl Copy for Directions
Source§impl Debug for Directions
impl Debug for Directions
Source§impl Default for Directions
impl Default for Directions
Source§fn default() -> Self
fn default() -> Self
A resolution of 5°, a crease of 30°, three rounds and a cutoff at
three RMS: a draft of a degree or two is one direction with its
face, the angle a scan’s noise of a tenth of a millimetre opens
between neighbouring triangles a millimetre across stays well inside
the crease, and three rounds average each normal with some thirty
triangles’. A face’s noise spreads its normals’ angles as a Rayleigh
distribution, so three RMS leave out one of a face’s triangles in
some eight thousand (e⁻⁹).
Source§impl PartialEq for Directions
impl PartialEq for Directions
impl StructuralPartialEq for Directions
Auto Trait Implementations§
impl Freeze for Directions
impl RefUnwindSafe for Directions
impl Send for Directions
impl Sync for Directions
impl Unpin for Directions
impl UnsafeUnpin for Directions
impl UnwindSafe for Directions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.