pub struct Transform3D<T: Copy + Debug + 'static> { /* private fields */ }Expand description
Transform3D represents a 3D transformation (rotation + translation) When the glam feature is enabled, it uses glam’s optimized types internally
Implementations§
Source§impl Transform3D<f32>
impl Transform3D<f32>
Sourcepub const fn from_translation_euler_xyz(
translation: [Length32; 3],
rotation: [Angle32; 3],
) -> Self
pub const fn from_translation_euler_xyz( translation: [Length32; 3], rotation: [Angle32; 3], ) -> Self
Creates a transform from unit-typed translation and XYZ Euler angles.
rotation is [roll_x, pitch_y, yaw_z]. Rotations are applied X, then Y, then Z,
producing Rz * Ry * Rx for column vectors. Translation is applied last.
Const unit values use their SI base representation: meters and radians.
Source§impl Transform3D<f64>
impl Transform3D<f64>
Sourcepub const fn from_translation_euler_xyz(
translation: [Length64; 3],
rotation: [Angle64; 3],
) -> Self
pub const fn from_translation_euler_xyz( translation: [Length64; 3], rotation: [Angle64; 3], ) -> Self
Creates a transform from unit-typed translation and XYZ Euler angles.
rotation is [roll_x, pitch_y, yaw_z]. Rotations are applied X, then Y, then Z,
producing Rz * Ry * Rx for column vectors. Translation is applied last.
Const unit values use their SI base representation: meters and radians.
Source§impl Transform3D<f32>
impl Transform3D<f32>
Source§impl Transform3D<f64>
impl Transform3D<f64>
Source§impl Transform3D<f32>
impl Transform3D<f32>
Sourcepub fn position(&self) -> Point3<Length32>
pub fn position(&self) -> Point3<Length32>
The translation as a point: where the pose sits in its parent frame.
Sourcepub fn transform_point(&self, p: Point3<Length32>) -> Point3<Length32>
pub fn transform_point(&self, p: Point3<Length32>) -> Point3<Length32>
p mapped through the transform: rotation, then translation.
Sourcepub fn transform_vector(&self, v: Point3<Length32>) -> Point3<Length32>
pub fn transform_vector(&self, v: Point3<Length32>) -> Point3<Length32>
v mapped through the rotation only, for directions and
offsets.
Sourcepub fn transform_points<const N: usize>(
&self,
points: &mut Point3Soa<Length32, N>,
)
pub fn transform_points<const N: usize>( &self, points: &mut Point3Soa<Length32, N>, )
Every point in the set mapped through the transform, in place.
May differ from Self::transform_point by a rounding step.
Source§impl Transform3D<f64>
impl Transform3D<f64>
Sourcepub fn position(&self) -> Point3<Length64>
pub fn position(&self) -> Point3<Length64>
The translation as a point: where the pose sits in its parent frame.
Sourcepub fn transform_point(&self, p: Point3<Length64>) -> Point3<Length64>
pub fn transform_point(&self, p: Point3<Length64>) -> Point3<Length64>
p mapped through the transform: rotation, then translation.
Sourcepub fn transform_vector(&self, v: Point3<Length64>) -> Point3<Length64>
pub fn transform_vector(&self, v: Point3<Length64>) -> Point3<Length64>
v mapped through the rotation only, for directions and
offsets.
Sourcepub fn transform_points<const N: usize>(
&self,
points: &mut Point3Soa<Length64, N>,
)
pub fn transform_points<const N: usize>( &self, points: &mut Point3Soa<Length64, N>, )
Every point in the set mapped through the transform, in place.
May differ from Self::transform_point by a rounding step.
Source§impl Transform3D<f32>
impl Transform3D<f32>
Trait Implementations§
Source§impl<T: Clone + Copy + Debug + 'static> Clone for Transform3D<T>
impl<T: Clone + Copy + Debug + 'static> Clone for Transform3D<T>
Source§fn clone(&self) -> Transform3D<T>
fn clone(&self) -> Transform3D<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<T: Copy + Copy + Debug + 'static> Copy for Transform3D<T>
Source§impl<T> Decode<()> for Transform3D<T>
impl<T> Decode<()> for Transform3D<T>
Source§impl<'de, T> Deserialize<'de> for Transform3D<T>
impl<'de, T> Deserialize<'de> for Transform3D<T>
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>,
Source§impl<T> Encode for Transform3D<T>
impl<T> Encode for Transform3D<T>
Source§impl From<Transform3D<f32>> for Affine3A
impl From<Transform3D<f32>> for Affine3A
Source§fn from(p: Transform3D<f32>) -> Self
fn from(p: Transform3D<f32>) -> Self
Source§impl From<Transform3D<f64>> for DAffine3
impl From<Transform3D<f64>> for DAffine3
Source§fn from(p: Transform3D<f64>) -> Self
fn from(p: Transform3D<f64>) -> Self
Source§impl Mul for Transform3D<f32>
impl Mul for Transform3D<f32>
Source§impl Mul for Transform3D<f64>
impl Mul for Transform3D<f64>
Source§impl Mul for &Transform3D<f32>
Reference implementations for f32
impl Mul for &Transform3D<f32>
Reference implementations for f32
Source§impl Mul for &Transform3D<f64>
Reference implementations for f64
impl Mul for &Transform3D<f64>
Reference implementations for f64