pub struct Transform3D {
pub matrix: Matrix4<f32>,
}
Expand description
A 3D transformation that can be applied to points and point clouds
Fields§
§matrix: Matrix4<f32>
Implementations§
Source§impl Transform3D
impl Transform3D
Sourcepub fn translation(translation: Vector3<f32>) -> Self
pub fn translation(translation: Vector3<f32>) -> Self
Create a translation transformation
Sourcepub fn rotation(rotation: UnitQuaternion<f32>) -> Self
pub fn rotation(rotation: UnitQuaternion<f32>) -> Self
Create a rotation transformation from a quaternion
Sourcepub fn uniform_scaling(scale: f32) -> Self
pub fn uniform_scaling(scale: f32) -> Self
Create a uniform scaling transformation
Sourcepub fn from_translation_rotation(
translation: Vector3<f32>,
rotation: UnitQuaternion<f32>,
) -> Self
pub fn from_translation_rotation( translation: Vector3<f32>, rotation: UnitQuaternion<f32>, ) -> Self
Create a transformation from translation and rotation
Sourcepub fn transform_point(&self, point: &Point3<f32>) -> Point3<f32>
pub fn transform_point(&self, point: &Point3<f32>) -> Point3<f32>
Apply the transformation to a point
Sourcepub fn transform_vector(&self, vector: &Vector3<f32>) -> Vector3<f32>
pub fn transform_vector(&self, vector: &Vector3<f32>) -> Vector3<f32>
Apply the transformation to a vector
Sourcepub fn is_identity(&self, epsilon: f32) -> bool
pub fn is_identity(&self, epsilon: f32) -> bool
Check if this is approximately the identity transformation
Trait Implementations§
Source§impl Clone for Transform3D
impl Clone for Transform3D
Source§fn clone(&self) -> Transform3D
fn clone(&self) -> Transform3D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Transform3D
impl Debug for Transform3D
Source§impl Default for Transform3D
impl Default for Transform3D
Source§impl<'de> Deserialize<'de> for Transform3D
impl<'de> Deserialize<'de> for Transform3D
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
Source§impl From<Isometry<f32, Unit<Quaternion<f32>>, 3>> for Transform3D
impl From<Isometry<f32, Unit<Quaternion<f32>>, 3>> for Transform3D
Source§impl From<Matrix<f32, Const<4>, Const<4>, ArrayStorage<f32, 4, 4>>> for Transform3D
impl From<Matrix<f32, Const<4>, Const<4>, ArrayStorage<f32, 4, 4>>> for Transform3D
Source§impl From<Transform<f32, TGeneral, 3>> for Transform3D
impl From<Transform<f32, TGeneral, 3>> for Transform3D
Source§fn from(transform: Transform3<f32>) -> Self
fn from(transform: Transform3<f32>) -> Self
Converts to this type from the input type.
Source§impl Mul for Transform3D
impl Mul for Transform3D
Source§impl PartialEq for Transform3D
impl PartialEq for Transform3D
Source§impl Serialize for Transform3D
impl Serialize for Transform3D
impl Copy for Transform3D
impl StructuralPartialEq for Transform3D
Auto Trait Implementations§
impl Freeze for Transform3D
impl RefUnwindSafe for Transform3D
impl Send for Transform3D
impl Sync for Transform3D
impl Unpin for Transform3D
impl UnwindSafe for Transform3D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.