Enum vulkano::image::Dimensions
source · pub enum Dimensions {
Dim1d {
width: u32,
},
Dim1dArray {
width: u32,
array_layers: u32,
},
Dim2d {
width: u32,
height: u32,
},
Dim2dArray {
width: u32,
height: u32,
array_layers: u32,
},
Dim3d {
width: u32,
height: u32,
depth: u32,
},
Cubemap {
size: u32,
},
CubemapArray {
size: u32,
array_layers: u32,
},
}
Variants
Implementations
sourceimpl Dimensions
impl Dimensions
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn width_height(&self) -> [u32; 2]
pub fn depth(&self) -> u32
pub fn width_height_depth(&self) -> [u32; 3]
pub fn array_layers(&self) -> u32
pub fn array_layers_with_cube(&self) -> u32
sourcepub fn to_image_dimensions(&self) -> ImageDimensions
pub fn to_image_dimensions(&self) -> ImageDimensions
Builds the corresponding ImageDimensions
.
sourcepub fn to_view_type(&self) -> ViewType
pub fn to_view_type(&self) -> ViewType
Builds the corresponding ViewType
.
sourcepub fn num_texels(&self) -> u32
pub fn num_texels(&self) -> u32
Returns the total number of texels for an image of these dimensions.
Trait Implementations
sourceimpl Clone for Dimensions
impl Clone for Dimensions
sourcefn clone(&self) -> Dimensions
fn clone(&self) -> Dimensions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Dimensions
impl Debug for Dimensions
sourceimpl PartialEq<Dimensions> for Dimensions
impl PartialEq<Dimensions> for Dimensions
sourcefn eq(&self, other: &Dimensions) -> bool
fn eq(&self, other: &Dimensions) -> bool
impl Copy for Dimensions
impl Eq for Dimensions
impl StructuralEq for Dimensions
impl StructuralPartialEq for Dimensions
Auto Trait Implementations
impl RefUnwindSafe for Dimensions
impl Send for Dimensions
impl Sync for Dimensions
impl Unpin for Dimensions
impl UnwindSafe for Dimensions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.