Struct CubeDefinition
#[non_exhaustive]pub struct CubeDefinition {
pub origin: [f32; 3],
pub dimensions: [f32; 3],
pub grow: CubeDeformation,
pub mirror: bool,
pub tex_coord: [i32; 2],
pub tex_scale: [f32; 2],
pub visible_faces: [bool; 6],
}Expand description
One box of a part (CubeDefinition), as a CubeListBuilder adds it.
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.origin: [f32; 3]Its corner at the least x, y and z, in texels from the part’s pivot.
dimensions: [f32; 3]Its size in texels, which is also the size of its faces on the texture.
grow: CubeDeformationGrowth beyond the box dimensions.
mirror: boolDrawn with its texture flipped left to right, as a left limb draws a right one’s.
tex_coord: [i32; 2]The top left corner of its faces on the texture, in texels (texOffs).
tex_scale: [f32; 2]How many of the texture’s texels one of its own texels takes, 1 for most.
visible_faces: [bool; 6]The faces it has, in Direction::ALL’s order; all six for most.
Trait Implementations§
§impl Clone for CubeDefinition
impl Clone for CubeDefinition
§fn clone(&self) -> CubeDefinition
fn clone(&self) -> CubeDefinition
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 more§impl Debug for CubeDefinition
impl Debug for CubeDefinition
§impl<'de> Deserialize<'de> for CubeDefinition
impl<'de> Deserialize<'de> for CubeDefinition
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CubeDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CubeDefinition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for CubeDefinition
impl PartialEq for CubeDefinition
§impl Serialize for CubeDefinition
impl Serialize for CubeDefinition
§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 CubeDefinition
Auto Trait Implementations§
impl Freeze for CubeDefinition
impl RefUnwindSafe for CubeDefinition
impl Send for CubeDefinition
impl Sync for CubeDefinition
impl Unpin for CubeDefinition
impl UnsafeUnpin for CubeDefinition
impl UnwindSafe for CubeDefinition
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