mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 13:54:21 +00:00
23 lines
631 B
Rust
23 lines
631 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Winding order which classifies the "front" face.
|
|
#[repr(C)]
|
|
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
|
pub enum FrontFace {
|
|
/// Triangles with vertices in counter clockwise order are considered the front face.
|
|
///
|
|
/// This is the default with right handed coordinate spaces.
|
|
Ccw = 0,
|
|
|
|
/// Triangles with vertices in clockwise order are considered the front face.
|
|
///
|
|
/// This is the default with left handed coordinate spaces.
|
|
Cw = 1,
|
|
}
|
|
|
|
impl Default for FrontFace {
|
|
fn default() -> Self {
|
|
FrontFace::Ccw
|
|
}
|
|
}
|