Enum softrender::render::geometry::FaceWinding
[−]
[src]
pub enum FaceWinding { Clockwise, CounterClockwise, }
Defines face winding variations. These apply to screen-space vertices, so imagine the vertices as they are viewed from the final image.
If all triangles of a mesh have the same face winding, then triangles that are facing away from the screen can be skipped since they will have the opposite winding order, since they are viewed from the back. This is known as backface culling.
Variants
Clockwise
Clockwise face winding, where the vertices are like so:
1
/|
A / |
/ / |
/ / | |
/ / | |
/ | |
/ | V
/ |
3 *---------------* 2
<-------
CounterClockwise
Counter-Clockwise face winding, where the vertices are like so:
1
/|
/ / |
/ / |
/ / | A
V / | |
/ | |
/ | |
/ |
3 *---------------* 2
------->
Trait Implementations
impl Debug for FaceWinding
[src]
impl Clone for FaceWinding
[src]
fn clone(&self) -> FaceWinding
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for FaceWinding
[src]
impl PartialEq for FaceWinding
[src]
fn eq(&self, __arg_0: &FaceWinding) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.