pub struct Transform {
pub rotation: [f32; 3],
pub translation: [f32; 3],
pub scale: [f32; 3],
}Expand description
Specifies the position, rotation, and scale at which a model is displayed.
Note that translations are applied to the model before rotations.
Fields§
§rotation: [f32; 3]Specifies the rotation of the model in degrees according to the scheme
[x, y, z].
translation: [f32; 3]Specifies the position of the model according to the scheme [x, y, z].
The unit of distance is 1/16th of a block (0.0625 meters).
The values should be clamped between -80 and 80.
scale: [f32; 3]Specifies the scale of the model according to the scheme [x, y, z].
If the value is greater than 4, it is displayed as 4.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Transform
impl<'de> Deserialize<'de> for Transform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
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