use crate::decoder_buffer::DecoderBuffer;
use crate::keyframe_animation::KeyframeAnimation;
use crate::point_cloud::PointCloud;
use crate::point_cloud_decoder::PointCloudDecoder;
use crate::status::Status;
#[derive(Debug, Default)]
pub struct KeyframeAnimationDecoder;
impl KeyframeAnimationDecoder {
pub fn new() -> Self {
Self
}
pub fn decode(
&mut self,
in_buffer: &mut DecoderBuffer,
animation: &mut KeyframeAnimation,
) -> Status {
let mut point_cloud = PointCloud::new();
let mut decoder = PointCloudDecoder::new();
decoder.decode(in_buffer, &mut point_cloud)?;
*animation = KeyframeAnimation::from_point_cloud(point_cloud);
Ok(())
}
}