pub struct BoxReflection { /* private fields */ }Implementations§
Source§impl BoxReflection
impl BoxReflection
pub fn x(&self) -> f32
pub fn y(&self) -> f32
pub fn z(&self) -> f32
pub const fn tile_width() -> usize
pub const fn tile_height() -> usize
pub fn from_dynamic_image( image: &DynamicImage, pos: Vector3, ) -> Result<Self, BoxReflectionError>
pub fn from_dds( data: Vec<u8>, pos: Vector3, ) -> Result<BoxReflection, BoxReflectionError>
pub fn create_dds( &self, layout: Option<CubemapLayout>, ) -> Result<Vec<u8>, BoxReflectionError>
pub fn create_dds_with_rotation( &self, layout: Option<CubemapLayout>, rotation: [Option<Orientation>; 3], ) -> Result<Vec<u8>, BoxReflectionError>
pub fn create_dynamic_image( &self, layout: CubemapLayout, ) -> Result<DynamicImage, BoxReflectionError>
pub fn create_dynamic_image_with_rotation( &self, layout: CubemapLayout, rotation: [Option<Orientation>; 3], ) -> Result<DynamicImage, BoxReflectionError>
Trait Implementations§
Source§impl BinRead for BoxReflection
impl BinRead for BoxReflection
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for BoxReflection
impl BinWrite for BoxReflection
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for BoxReflection
impl Clone for BoxReflection
Source§fn clone(&self) -> BoxReflection
fn clone(&self) -> BoxReflection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BoxReflection
impl Debug for BoxReflection
Source§impl Default for BoxReflection
impl Default for BoxReflection
Source§fn default() -> BoxReflection
fn default() -> BoxReflection
Returns the “default value” for a type. Read more
Source§impl<'a> FromIterator<&'a BoxReflection> for BoxReflectionCachewhere
BoxReflection: Clone,
impl<'a> FromIterator<&'a BoxReflection> for BoxReflectionCachewhere
BoxReflection: Clone,
Source§fn from_iter<T: IntoIterator<Item = &'a BoxReflection>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = &'a BoxReflection>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<BoxReflection> for BoxReflectionCache
impl FromIterator<BoxReflection> for BoxReflectionCache
Source§fn from_iter<T: IntoIterator<Item = BoxReflection>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = BoxReflection>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for BoxReflection
impl RefUnwindSafe for BoxReflection
impl Send for BoxReflection
impl Sync for BoxReflection
impl Unpin for BoxReflection
impl UnsafeUnpin for BoxReflection
impl UnwindSafe for BoxReflection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.