pub struct Transform {
pub position: Option<Vector3>,
pub rotation: Option<Quaternion>,
pub scale: Option<Vector3>,
}Expand description
Spatial transformation of an object, relative to it’s parent object. All attributes are optional. But, if an attribute exists, all it’s attributes must exist, too. The application ordering follows industry standard (X3D, ThreeJS) so first scales then rotates and then positions. This basically allows to scale and rotate an object undisturbed and then move it to its position. Think of a cube. Ordering as Matrices is therefore T///R///S///V
Fields§
§position: Option<Vector3>The position of the object, relative to it’s parent.
rotation: Option<Quaternion>The rotation of the object, relative to it’s parent.
scale: Option<Vector3>The scaling of the object’s geometries.
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