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 face winding, where the vertices are like so:

                  1
                 /|
          A    /  |
        /    /    |
      /    /      | |
    /    /        | |
       /          | |
     /            | V
   /              |
3 *---------------* 2
      <-------

Counter-Clockwise face winding, where the vertices are like so:

                  1
                 /|
          /    /  |
        /    /    |
      /    /      | A
    V    /        | |
       /          | |
     /            | |
   /              |
3 *---------------* 2
      ------->

Trait Implementations

impl Debug for FaceWinding
[src]

Formats the value using the given formatter.

impl Clone for FaceWinding
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for FaceWinding
[src]

impl PartialEq for FaceWinding
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for FaceWinding
[src]