pub struct Transform {
pub position: Point3<f32>,
pub orientation: Quaternion<f32>,
pub scale: f32,
}
Expand description
Position, rotation, and scale of the scene node.
Fields
position: Point3<f32>
Position.
orientation: Quaternion<f32>
Orientation.
scale: f32
Scale.
Implementations
sourceimpl Transform
impl Transform
sourcepub fn new() -> Transform
pub fn new() -> Transform
Creates a new Transform
with default position, orientation, and scale.
- The default position is
(0, 0, 0)
, meaning the global origin when in world space, or meaning no translation relative to a parent in local space. - The default orientation has no rotation, meaning the coordinate axes will match the global axes when the transform is in world space, or will match the axis of the parent when in local space.
- The default scale is 1, meaning no change from the object’s natural dimensions, or no change relative to the parent’s dimensions.
Trait Implementations
sourceimpl From<Decomposed<Vector3<f32>, Quaternion<f32>>> for Transform
impl From<Decomposed<Vector3<f32>, Quaternion<f32>>> for Transform
sourcefn from(tf: Decomposed<Vector3<f32>, Quaternion<f32>>) -> Self
fn from(tf: Decomposed<Vector3<f32>, Quaternion<f32>>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Transform
Auto Trait Implementations
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.