pub enum NormalMode {
None,
FaceNormals,
BufferedGradient(BufferedElevations),
}Expand description
How (and whether) per-vertex normals are computed for the oct-encoded vertex-normals extension.
Variants§
None
No vertex-normals extension.
FaceNormals
Per-tile face normals (crate::normals::face_normals). Simple, but
produces a visible shading seam at tile boundaries.
BufferedGradient(BufferedElevations)
Seam-free DEM-gradient normals
(crate::normals::buffered_gradient_normals) sampled from a
buffer-extended grid. Its tile_grid_size must equal the encode
grid_size.
The caller is responsible for filling the buffer-cell halo around
the tile with the neighbour tiles’ elevations — that overlap is
what makes edge normals match across the seam. A halo filled by
edge-replication still encodes fine, but won’t be seam-free.
Trait Implementations§
Source§impl Clone for NormalMode
impl Clone for NormalMode
Source§fn clone(&self) -> NormalMode
fn clone(&self) -> NormalMode
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 NormalMode
impl Debug for NormalMode
Source§impl Default for NormalMode
impl Default for NormalMode
Source§fn default() -> NormalMode
fn default() -> NormalMode
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NormalMode
impl RefUnwindSafe for NormalMode
impl Send for NormalMode
impl Sync for NormalMode
impl Unpin for NormalMode
impl UnsafeUnpin for NormalMode
impl UnwindSafe for NormalMode
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