Struct CubeDeformation
#[non_exhaustive]pub struct CubeDeformation {
pub grow_x: f32,
pub grow_y: f32,
pub grow_z: f32,
}Expand description
CubeDeformation: how far a box grows past its size on each side, in
texels, with its texture unchanged: a hat or an armour layer over a head.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.grow_x: f32Growth on the x axis, in texels.
grow_y: f32Growth on the y axis, in texels.
grow_z: f32Growth on the z axis, in texels.
Implementations§
§impl CubeDeformation
impl CubeDeformation
pub const NONE: CubeDeformation
pub const NONE: CubeDeformation
No growth.
pub const fn new(grow: f32) -> CubeDeformation
pub const fn new(grow: f32) -> CubeDeformation
The same growth on every axis (new CubeDeformation(grow)).
pub const fn xyz(grow_x: f32, grow_y: f32, grow_z: f32) -> CubeDeformation
pub const fn xyz(grow_x: f32, grow_y: f32, grow_z: f32) -> CubeDeformation
Growth on each axis.
pub fn extend(self, by: f32) -> CubeDeformation
pub fn extend(self, by: f32) -> CubeDeformation
This growth and by more on every axis (extend).
pub fn extend_xyz(self, x: f32, y: f32, z: f32) -> CubeDeformation
pub fn extend_xyz(self, x: f32, y: f32, z: f32) -> CubeDeformation
This growth extended separately on each axis.
Trait Implementations§
§impl Clone for CubeDeformation
impl Clone for CubeDeformation
§fn clone(&self) -> CubeDeformation
fn clone(&self) -> CubeDeformation
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 moreimpl Copy for CubeDeformation
§impl Debug for CubeDeformation
impl Debug for CubeDeformation
§impl Default for CubeDeformation
impl Default for CubeDeformation
§fn default() -> CubeDeformation
fn default() -> CubeDeformation
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for CubeDeformation
impl<'de> Deserialize<'de> for CubeDeformation
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CubeDeformation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CubeDeformation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for CubeDeformation
impl PartialEq for CubeDeformation
§impl Serialize for CubeDeformation
impl Serialize for CubeDeformation
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CubeDeformation
Auto Trait Implementations§
impl Freeze for CubeDeformation
impl RefUnwindSafe for CubeDeformation
impl Send for CubeDeformation
impl Sync for CubeDeformation
impl Unpin for CubeDeformation
impl UnsafeUnpin for CubeDeformation
impl UnwindSafe for CubeDeformation
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