minor api improvements for track frames container
@@ -8,7 +8,7 @@ use crate::{
},
};
-#[derive(Clone, Debug, Visit)]
+#[derive(Clone, Copy, Debug, Visit, PartialEq, Eq)]
pub enum TrackValueKind {
Vector3,
UnitQuaternion,
@@ -54,6 +54,14 @@ impl TrackFramesContainer {
&mut self.curves
}
+ pub fn set_value_kind(&mut self, kind: TrackValueKind) {
+ self.kind = kind;
+ }
+
+ pub fn value_kind(&self) -> TrackValueKind {
+ self.kind
+ }
+
pub fn fetch(&self, time: f32) -> Option<TrackValue> {
match self.kind {
TrackValueKind::Vector3 => Some(TrackValue::Vector3(Vector3::new(
