Enum blender_armature::Bone [−][src]
A bone in an armature. Can either be a dual quaternion or a matrix. When you export bones from Blender they come as matrices - BlenderArmature lets you convert them into dual quaternions which are usually more favorable for when implementing skeletal animation with rigid transformations.
Variants
A transform represented as a matrix
DualQuat(DualQuaternion<f32>)
A rigid transform represented as a dual quaternion
Implementations
impl Bone
[src]
pub fn relative_to_parent(&self, parent_bone: Bone) -> Bone
[src]
Get this bone’s transform relative to some parent bone.
You could typically use this when both bones are in world space.
use nalgebra::{Matrix4, Vector3, Point3}; let axis_angle = Vector3::default(); let parent = Bone::Matrix(Matrix4::new_rotation_wrt_point( axis_angle, Point3::new(4., 5., 6.) )); let child = Bone::Matrix(Matrix4::new_rotation_wrt_point( axis_angle, Point3::new(44., 55., 66.) )); let expected = Bone::Matrix(Matrix4::new_rotation_wrt_point( axis_angle, Point3::new(40., 50., 60.) )); assert_eq!(child.relative_to_parent(parent), expected);
Trait Implementations
impl Clone for Bone
[src]
impl Copy for Bone
[src]
impl Debug for Bone
[src]
impl<'de> Deserialize<'de> for Bone
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<Bone> for Bone
[src]
impl Serialize for Bone
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Bone
[src]
Auto Trait Implementations
impl RefUnwindSafe for Bone
impl Send for Bone
impl Sync for Bone
impl Unpin for Bone
impl UnwindSafe for Bone
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,