draco_core/
keyframe_animation_decoder.rs1use crate::decoder_buffer::DecoderBuffer;
7use crate::keyframe_animation::KeyframeAnimation;
8use crate::point_cloud::PointCloud;
9use crate::point_cloud_decoder::PointCloudDecoder;
10use crate::status::Status;
11
12#[derive(Debug, Default)]
14pub struct KeyframeAnimationDecoder;
15
16impl KeyframeAnimationDecoder {
17 pub fn new() -> Self {
19 Self
20 }
21
22 pub fn decode(
25 &mut self,
26 in_buffer: &mut DecoderBuffer,
27 animation: &mut KeyframeAnimation,
28 ) -> Status {
29 let mut point_cloud = PointCloud::new();
30 let mut decoder = PointCloudDecoder::new();
31 decoder.decode(in_buffer, &mut point_cloud)?;
32 *animation = KeyframeAnimation::from_point_cloud(point_cloud);
33 Ok(())
34 }
35}