Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct A3da {
- pub camera_root: Vec<CameraRoot>,
- }
- #[derive(Debug, Default)]
- pub struct CameraRoot {
- pub interest: ModelTransform,
- pub model_transform: ModelTransform,
- pub view_point: ViewPoint,
- }
- #[derive(Debug, Default)]
- pub struct ViewPoint {
- is_horizontal_fov: bool,
- aspect: Option<f32>,
- camera_aperture_h: Option<f32>,
- camera_aperture_v: Option<f32>,
- fov: Key,
- roll: Key,
- focal_length: Key,
- pub model_transform: ModelTransform,
- }
- #[derive(Debug, Default)]
- pub struct ModelTransform {
- pub scale: Vec3<Key>,
- pub rotation: Vec3<Key>,
- pub translation: Vec3<Key>,
- pub visiblity: Key,
- }
- ///Generic keyframe
- #[derive(Debug)]
- pub enum Key {
- None,
- Pose(f32),
- Mode34(Vec<SmoothKeyframe>),
- }
- ///Keyframe with hermite interpolation
- #[derive(Debug, Default)]
- pub struct SmoothKeyframe {
- pub frame: f32,
- pub value: f32,
- pub tangent_1: f32,
- pub tangent_0: f32,
- }
- impl Default for Key {
- fn default() -> Self {
- Self::None
- }
- }
- ///A 3D vector of T
- #[derive(Debug, Default)]
- pub struct Vec3<T>{
- pub x: T,
- pub y: T,
- pub z: T,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement