[−][src]Struct building_blocks_mesh::greedy_quads::Quad
A single quad of connected cubic voxel faces. Must belong to a QuadGroup
to be useful.
Fields
minimum: Point3i
width: i32
height: i32
Implementations
impl Quad
[src]
pub fn simple_tex_coords(&self) -> [[f32; 2]; 4]
[src]
Returns the UV coordinates of the 4 corners of the quad. Returns in the same order as
QuadGroup::quad_corners
.
This is just one way of assigning UVs to voxel quads. It assumes that each material has a single tile texture with wrapping coordinates, and each voxel face should show the entire texture. It also assumes a particular orientation for the texture. This should be sufficient for minecraft-style meshing.
If you need to use a texture atlas, you must calculate your own coordinates from the Quad
.
Trait Implementations
impl Clone for Quad
[src]
impl Copy for Quad
[src]
impl Debug for Quad
[src]
impl Eq for Quad
[src]
impl PartialEq<Quad> for Quad
[src]
impl StructuralEq for Quad
[src]
impl StructuralPartialEq for Quad
[src]
Auto Trait Implementations
impl RefUnwindSafe for Quad
impl Send for Quad
impl Sync for Quad
impl Unpin for Quad
impl UnwindSafe for Quad
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,