Struct rin_scene::transformation::PreviousTransformation [−][src]
pub struct PreviousTransformation(pub Node);
Implementations
impl PreviousTransformation
[src]
impl PreviousTransformation
[src]pub fn new(pos: Pnt3, rot: UnitQuat, scale: Vec3) -> PreviousTransformation
[src]
pub fn from_position(pos: Pnt3) -> 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]
&self
) -> Option<Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>>
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]
&mut self,
angle: Rad<f32>,
axis: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
)
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]
&mut self,
at: &Point<f32, U3>,
up: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
) -> Result<(), Error>
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]
&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>
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]
&mut self,
node: &N,
up: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
) -> Result<(), Error> where
N: NodeRef,
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]
&mut self,
angle: Rad<f32>,
axis: &Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
)
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]
&mut self,
t: &Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
)
Append a translation to the current local position
pub fn scale(
&self
) -> Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
[src]
&self
) -> Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
Returns the current local scale
pub fn set_scale(
&mut self,
s: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
)
[src]
&mut self,
s: Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
)
Sets the local scale
pub fn local_x_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
The node orientation x axis
pub fn local_y_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
The node orientation y axis
pub fn local_z_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
The node orientation z axis
pub fn global_x_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
The node orientation x axis
pub fn global_y_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
The node orientation y axis
pub fn global_z_axis(
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
[src]
&self
) -> Unit<Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>>
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]
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
Local transformation matrix
pub fn global_transformation(
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
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]
&self
) -> Matrix<f32, U3, U1, <DefaultAllocator as Allocator<f32, U3, U1>>::Buffer>
Global scale of this node
pub fn inv_local_transformation(
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
[src]
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
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]
&self
) -> Matrix<f32, U4, U4, <DefaultAllocator as Allocator<f32, U4, U4>>::Buffer>
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]
&mut self,
parent_loc: Option<&Node>,
parent_orientation: Option<&Node>,
parent_scale: Option<&Node>
) -> bool
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 Clone for PreviousTransformation
[src]fn clone(&self) -> PreviousTransformation
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Component for PreviousTransformation
[src]
impl Component for PreviousTransformation
[src]impl<'a> DebugParameter for PreviousTransformation
[src]
impl<'a> DebugParameter for PreviousTransformation
[src]fn debug<S: Serializer>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
impl Default for PreviousTransformation
[src]
impl Default for PreviousTransformation
[src]fn default() -> PreviousTransformation
[src]
impl Deref for PreviousTransformation
[src]
impl Deref for PreviousTransformation
[src]impl<'de> Deserialize<'de> for PreviousTransformation
[src]
impl<'de> Deserialize<'de> for PreviousTransformation
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize 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> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[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]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<C> ComponentSend for C where
C: Component + Send,
[src]
C: Component + Send,
impl<C> ComponentThreadLocal for C where
C: Component,
[src]
C: Component,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,