pub type Transform = Transform<Scalar, Scalar, Scalar>;

Aliased Type§

struct Transform {
    pub position: Vec3<f32>,
    pub orientation: Quaternion<f32>,
    pub scale: Vec3<f32>,
}

Fields§

§position: Vec3<f32>

Local position.

§orientation: Quaternion<f32>

Local orientation; It is not named rotation because rotation denotes an operation, but not a current state.

§scale: Vec3<f32>

Local scale.

Trait Implementations§

source§

impl<P, O, S> Clone for Transform<P, O, S>where P: Clone, O: Clone, S: Clone,

source§

fn clone(&self) -> Transform<P, O, S>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<P, O, S> Debug for Transform<P, O, S>where P: Debug, O: Debug, S: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<P, O, S> Default for Transform<P, O, S>where P: Zero, O: Zero + One, S: One,

The default Transform has a zero position, identity orientation and unit scale.

let a = Transform {
    position: Vec3::<f32>::zero(),
    orientation: Quaternion::<f32>::identity(),
    scale: Vec3::<f32>::one(),
};
assert_eq!(a, Transform::default());
source§

fn default() -> Transform<P, O, S>

Returns the “default value” for a type. Read more
source§

impl<'de, P, O, S> Deserialize<'de> for Transform<P, O, S>where P: Deserialize<'de>, O: Deserialize<'de>, S: Deserialize<'de>,

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Transform<P, O, S>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<P, O, S> Hash for Transform<P, O, S>where P: Hash, O: Hash, S: Hash,

source§

fn hash<__H>(&self, state: &mut __H)where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<P, O, S, Factor> Lerp<Factor> for Transform<P, O, S>where Factor: Copy + Into<O>, P: Lerp<Factor, Output = P>, S: Lerp<Factor, Output = S>, O: Lerp<O, Output = O> + Real<Output = O> + Add<O>,

LERP on a Transform is defined as LERP-ing between the positions and scales, and performing SLERP between the orientations.

§

type Output = Transform<P, O, S>

The resulting type after performing the LERP operation.
source§

fn lerp_unclamped( a: Transform<P, O, S>, b: Transform<P, O, S>, t: Factor ) -> Transform<P, O, S>

Returns the linear interpolation of from to to with factor unconstrained, using the supposedly fastest but less precise implementation. Read more
source§

fn lerp_unclamped_precise( a: Transform<P, O, S>, b: Transform<P, O, S>, t: Factor ) -> Transform<P, O, S>

Returns the linear interpolation of from to to with factor unconstrained, using a possibly slower but more precise operation. Read more
source§

fn lerp_unclamped_inclusive_range( range: RangeInclusive<Self>, factor: Factor ) -> Self::Output

Version of lerp_unclamped() that used a single RangeInclusive parameter instead of two values.
source§

fn lerp_unclamped_precise_inclusive_range( range: RangeInclusive<Self>, factor: Factor ) -> Self::Output

Version of lerp_unclamped_precise() that used a single RangeInclusive parameter instead of two values.
source§

impl<P, O, S> PartialEq<Transform<P, O, S>> for Transform<P, O, S>where P: PartialEq<P>, O: PartialEq<O>, S: PartialEq<S>,

source§

fn eq(&self, other: &Transform<P, O, S>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<P, O, S> Serialize for Transform<P, O, S>where P: Serialize, O: Serialize, S: Serialize,

source§

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
source§

impl<P, O, S> Copy for Transform<P, O, S>where P: Copy, O: Copy, S: Copy,

source§

impl<P, O, S> Eq for Transform<P, O, S>where P: Eq, O: Eq, S: Eq,

source§

impl<P, O, S> StructuralEq for Transform<P, O, S>

source§

impl<P, O, S> StructuralPartialEq for Transform<P, O, S>