pub struct QuadCoordinateConfig {
    pub faces: [OrientedBlockFace; 6],
    pub u_flip_face: Axis,
}
Expand description

A configuration of XYZ –> NUV axis mappings and orientations of the cube faces for a given coordinate system.

See the geometry module documentation for more information on {N, U, V} space.

Fields

faces: [OrientedBlockFace; 6]u_flip_face: Axis

For a given coordinate system, one of the two axes that isn’t UP must be flipped in the U texel coordinate direction to avoid incorrect texture mirroring. For example, in a right-handed coordinate system with +Y pointing up, you should set u_flip_face to Axis::X, because those faces need their U coordinates to be flipped relative to the other faces:

                        +X face  O           
        +Z face                / |           
    ^  O--------O          ^ O   |           
    |  |        |          | |   |           
 +V |  |        |       +V | |   O  ^        
    |  |        |          | | /  /          
    |  O--------O          | O  /                 
     ------------ >        |  /  +U
          +U                

                   +Y      
                   | -Z    
             -X____|/____+X
                  /|       
                +Z |       
                   -Y      

As you can see, for the +Z face, +U is toward positive X. But for the +X face, +U is towards negative Z.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.