Struct gfx::tex::ImageInfoCommon []

pub struct ImageInfoCommon<F> {
    pub xoffset: u16,
    pub yoffset: u16,
    pub zoffset: u16,
    pub width: u16,
    pub height: u16,
    pub depth: u16,
    pub format: F,
    pub mipmap: u8,
}

Describes a subvolume of a texture, which image data can be uploaded into.

Fields

xoffset: u16 yoffset: u16 zoffset: u16 width: u16 height: u16 depth: u16 format: F

Format of each texel.

mipmap: u8

Which mipmap to select.

Methods

impl<F> ImageInfoCommon<F>

fn get_texel_count(&self) -> usize

Get the total number of texels.

fn convert<T>(&self, new_format: T) -> ImageInfoCommon<T>

Convert into a differently typed format.

fn is_inside(&self, (u16, u16, u16, AaMode)) -> bool

Check if it fits inside given dimensions.

Trait Implementations

impl<F> Debug for ImageInfoCommon<F> where F: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl<F> Clone for ImageInfoCommon<F> where F: Clone

fn clone(&self) -> ImageInfoCommon<F>

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<F> Copy for ImageInfoCommon<F> where F: Copy

impl<F> Hash for ImageInfoCommon<F> where F: Hash

fn hash<__HF>(&self, __arg_0: &mut __HF) where __HF: Hasher

impl<F> PartialOrd<ImageInfoCommon<F>> for ImageInfoCommon<F> where F: PartialOrd<F>

fn partial_cmp(&self, __arg_0: &ImageInfoCommon<F>) -> Option<Ordering>

fn lt(&self, __arg_0: &ImageInfoCommon<F>) -> bool

fn le(&self, __arg_0: &ImageInfoCommon<F>) -> bool

fn gt(&self, __arg_0: &ImageInfoCommon<F>) -> bool

fn ge(&self, __arg_0: &ImageInfoCommon<F>) -> bool

impl<F> PartialEq<ImageInfoCommon<F>> for ImageInfoCommon<F> where F: PartialEq<F>

fn eq(&self, __arg_0: &ImageInfoCommon<F>) -> bool

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

fn ne(&self, __arg_0: &ImageInfoCommon<F>) -> bool

This method tests for !=.

impl<F> Ord for ImageInfoCommon<F> where F: Ord

fn cmp(&self, __arg_0: &ImageInfoCommon<F>) -> Ordering

impl<F> Eq for ImageInfoCommon<F> where F: Eq