Struct rin::scene::transformation::PreviousTransformation[][src]

pub struct PreviousTransformation(pub Node);

Implementations

impl PreviousTransformation[src]

pub fn new(
    pos: Point<f32, U3>,
    rot: Unit<Quaternion<f32>>,
    scale: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> PreviousTransformation
[src]

pub fn from_position(pos: Point<f32, U3>) -> PreviousTransformation[src]

Methods from Deref<Target = Node>

pub fn has_changed(&self) -> bool[src]

pub fn reset_changed(&mut self)[src]

pub fn clone_with_preparent(&self, preparent: &Node) -> Node[src]

Clones this node but applies a preparent transformation

Allows to parent this node with it’s current position, orientation and scale as absolute instead of relative to the parent.

pub fn set_position(&mut self, pos: Point<f32, U3>)[src]

Sets the local position of this node

pub fn position(&self) -> Point<f32, U3>[src]

Returns the local position of this node

pub fn preparent(
    &self
) -> Option<Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>>
[src]

Returns the initial parent inverse transformation if there’s one

pub fn set_angle_axis(
    &mut self,
    angle: Rad<f32>,
    axis: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
)
[src]

Sets the orientation for this node from an angle and axis of rotation

pub fn set_orientation(&mut self, q: Unit<Quaternion<f32>>)[src]

Sets the orientation for this node from a quaternion

pub fn orientation(&self) -> Unit<Quaternion<f32>>[src]

Returns the orientation of this node as a quaternion which is how it’s stored internally

pub fn rotation(&self) -> Rotation<f32, U3>[src]

Returns the orientation of this node as a Rotation3.

This method converts the internal quaternion into a Rotation3

pub fn look_at(
    &mut self,
    at: &Point<f32, U3>,
    up: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> Result<(), Error>
[src]

Changes the orientation of the node to look at the passed position using the up vector

Returns an error if the look at direction and the up vector are parallel

pub fn face_towards(
    &mut self,
    dir: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>,
    up: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> Result<(), Error>
[src]

Changes the orientation of the node to look at the passed direction using the up vector

Returns an error if the look at direction and the up vector are parallel

pub fn look_at_node<N>(
    &mut self,
    node: &N,
    up: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
) -> Result<(), Error> where
    N: NodeRef
[src]

Changes the orientation of the node to look at the passed node global position using the up vector

Returns an error if the look at direction and the up vector are parallel

pub fn rotate(
    &mut self,
    angle: Rad<f32>,
    axis: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
)
[src]

Rotate this note a certain angle around the axis of rotation

pub fn append_orientation(&mut self, rot: &Unit<Quaternion<f32>>)[src]

Append the passed quaternion to the current local orientation

pub fn translate(
    &mut self,
    t: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
)
[src]

Append a translation to the current local position

pub fn scale(
    &self
) -> Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
[src]

Returns the current local scale

pub fn set_scale(
    &mut self,
    s: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
)
[src]

Sets the local scale

pub fn local_x_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation x axis

pub fn local_y_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation y axis

pub fn local_z_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation z axis

pub fn global_x_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation x axis

pub fn global_y_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation y axis

pub fn global_z_axis(
    &self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]

The node orientation z axis

pub fn tilt(&mut self, angle: Rad<f32>)[src]

rotate this node around it’s local x axis

pub fn pan(&mut self, angle: Rad<f32>)[src]

rotate this node around it’s local y axis

pub fn roll(&mut self, angle: Rad<f32>)[src]

rotate this node around it’s local z axis

pub fn local_transformation(
    &self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]

Local transformation matrix

pub fn global_transformation(
    &self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]

Global transformation matrix

pub fn global_position(&self) -> Point<f32, U3>[src]

Global position of this node

pub fn global_orientation(&self) -> Unit<Quaternion<f32>>[src]

Global orientation of this node

pub fn global_scale(
    &self
) -> Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
[src]

Global scale of this node

pub fn inv_local_transformation(
    &self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]

Inverse local transformation of this node

This is cacheed internally and uses the fastest version posible to calculate the inverse so it’s usually faster than calling local_transformation().try_inverse()

pub fn inv_global_transformation(
    &self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]

Inverse global transformation of this node

This is cacheed internally and uses the fastest version posible to calculate the inverse so it’s usually faster than calling global_transformation().try_inverse()

pub fn update_with_parent(&mut self, parent: Option<&Node>) -> bool[src]

Updates the internal matrices including the glonal matrices using the optional parent passed as argument

pub fn update_with_parent_parts(
    &mut self,
    parent_loc: Option<&Node>,
    parent_orientation: Option<&Node>,
    parent_scale: Option<&Node>
) -> bool
[src]

Updates the internal matrices including the glonal matrices using the optional parent passed as argument and flags

Trait Implementations

impl Clone for PreviousTransformation[src]

impl Component for PreviousTransformation[src]

type Storage = KeyedDenseVec<usize, PreviousTransformation>

type MutStorageCacheGuard = ()

impl Debug for PreviousTransformation[src]

impl<'a> DebugParameter for PreviousTransformation[src]

impl Default for PreviousTransformation[src]

impl Deref for PreviousTransformation[src]

type Target = Node

The resulting type after dereferencing.

impl DerefMut for PreviousTransformation[src]

impl<'de> Deserialize<'de> for PreviousTransformation[src]

impl Serialize for PreviousTransformation[src]

Auto Trait Implementations

impl RefUnwindSafe for PreviousTransformation

impl Send for PreviousTransformation

impl Sync for PreviousTransformation

impl Unpin for PreviousTransformation

impl UnwindSafe for PreviousTransformation

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<C> ComponentSend for C where
    C: Component + Send
[src]

impl<C> ComponentThreadLocal for C where
    C: Component
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]