Struct blender_armature::BoneKeyframes [−][src]
The keyframes for the transformations for a bone
TODO: Custom deserialize to guarantee that the frame_range_inclusive is correct by checking against all of the keyframes
Implementations
impl BoneKeyframes
[src]
pub fn sample(&self, joint_idx: u8, sample_desc: SampleDesc) -> Bone
[src]
Sample the bone transforms
impl BoneKeyframes
[src]
pub fn new() -> BoneKeyframes
[src]
Create an empty set of bone keyframes.
pub fn smallest_frame(&self) -> Option<u16>
[src]
pub fn largest_frame(&self) -> Option<u16>
[src]
pub fn frame_duration(&self) -> Option<u16>
[src]
pub fn frame_range_inclusive(&self) -> Option<(u16, u16)>
[src]
pub fn insert_bone_keyframe(&mut self, bone_idx: u8, keyframe: BoneKeyframe)
[src]
Add a trnasformation keyframe for a bone.
Methods from Deref<Target = HashMap<u8, SortedKeyframes>>
pub fn capacity(&self) -> usize
1.0.0[src]
Returns the number of elements the map can hold without reallocating.
This number is a lower bound; the HashMap<K, V>
might be able to hold
more, but is guaranteed to be able to hold at least this many.
Examples
use std::collections::HashMap; let map: HashMap<i32, i32> = HashMap::with_capacity(100); assert!(map.capacity() >= 100);
pub fn keys(&self) -> Keys<'_, K, V>
1.0.0[src]
An iterator visiting all keys in arbitrary order.
The iterator element type is &'a K
.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert("a", 1); map.insert("b", 2); map.insert("c", 3); for key in map.keys() { println!("{}", key); }
pub fn values(&self) -> Values<'_, K, V>
1.0.0[src]
An iterator visiting all values in arbitrary order.
The iterator element type is &'a V
.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert("a", 1); map.insert("b", 2); map.insert("c", 3); for val in map.values() { println!("{}", val); }
pub fn iter(&self) -> Iter<'_, K, V>
1.0.0[src]
An iterator visiting all key-value pairs in arbitrary order.
The iterator element type is (&'a K, &'a V)
.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert("a", 1); map.insert("b", 2); map.insert("c", 3); for (key, val) in map.iter() { println!("key: {} val: {}", key, val); }
pub fn len(&self) -> usize
1.0.0[src]
Returns the number of elements in the map.
Examples
use std::collections::HashMap; let mut a = HashMap::new(); assert_eq!(a.len(), 0); a.insert(1, "a"); assert_eq!(a.len(), 1);
pub fn is_empty(&self) -> bool
1.0.0[src]
Returns true
if the map contains no elements.
Examples
use std::collections::HashMap; let mut a = HashMap::new(); assert!(a.is_empty()); a.insert(1, "a"); assert!(!a.is_empty());
pub fn hasher(&self) -> &S
1.9.0[src]
Returns a reference to the map’s BuildHasher
.
Examples
use std::collections::HashMap; use std::collections::hash_map::RandomState; let hasher = RandomState::new(); let map: HashMap<i32, i32> = HashMap::with_hasher(hasher); let hasher: &RandomState = map.hasher();
pub fn get<Q>(&self, k: &Q) -> Option<&V> where
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
1.0.0[src]
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but
Hash
and Eq
on the borrowed form must match those for
the key type.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert(1, "a"); assert_eq!(map.get(&1), Some(&"a")); assert_eq!(map.get(&2), None);
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)> where
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
1.40.0[src]
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
Returns the key-value pair corresponding to the supplied key.
The supplied key may be any borrowed form of the map’s key type, but
Hash
and Eq
on the borrowed form must match those for
the key type.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert(1, "a"); assert_eq!(map.get_key_value(&1), Some((&1, &"a"))); assert_eq!(map.get_key_value(&2), None);
pub fn contains_key<Q>(&self, k: &Q) -> bool where
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
1.0.0[src]
Q: Hash + Eq + ?Sized,
K: Borrow<Q>,
Returns true
if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but
Hash
and Eq
on the borrowed form must match those for
the key type.
Examples
use std::collections::HashMap; let mut map = HashMap::new(); map.insert(1, "a"); assert_eq!(map.contains_key(&1), true); assert_eq!(map.contains_key(&2), false);
pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S>
[src]
hash_raw_entry
)Creates a raw immutable entry builder for the HashMap.
Raw entries provide the lowest level of control for searching and manipulating a map. They must be manually initialized with a hash and then manually searched.
This is useful for
- Hash memoization
- Using a search key that doesn’t work with the Borrow trait
- Using custom comparison logic without newtype wrappers
Unless you are in such a situation, higher-level and more foolproof APIs like
get
should be preferred.
Immutable raw entries have very limited use; you might instead want raw_entry_mut
.
Trait Implementations
impl Clone for BoneKeyframes
[src]
fn clone(&self) -> BoneKeyframes
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BoneKeyframes
[src]
impl Default for BoneKeyframes
[src]
fn default() -> BoneKeyframes
[src]
impl Deref for BoneKeyframes
[src]
type Target = HashMap<u8, SortedKeyframes>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'de> Deserialize<'de> for BoneKeyframes
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<BoneKeyframes> for BoneKeyframes
[src]
fn eq(&self, other: &BoneKeyframes) -> bool
[src]
fn ne(&self, other: &BoneKeyframes) -> bool
[src]
impl Serialize for BoneKeyframes
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for BoneKeyframes
[src]
Auto Trait Implementations
impl RefUnwindSafe for BoneKeyframes
impl Send for BoneKeyframes
impl Sync for BoneKeyframes
impl Unpin for BoneKeyframes
impl UnwindSafe for BoneKeyframes
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<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>,