#pragma once #include #include #include #include #include #include namespace motionbricks::detail { class neural_runtime; } struct mb_runtime_options { mb_device device = MB_DEVICE_AUTO; std::uint32_t threads = 0; std::string backend_directory; }; struct mb_model { std::string bundle_directory; std::uint64_t parameter_count = 0; std::vector joint_names; std::vector joint_parents; std::vector neutral_joints; std::vector motion_mean; std::vector motion_std; std::shared_ptr runtime; }; struct mb_style { std::string name; float speed = 0.0F; std::uint32_t frames = 0; std::vector global_joint_positions; std::vector global_joint_rotations; std::vector global_root_positions; std::vector global_headings; std::array allowed_tokens{}; }; struct mb_command { const mb_style * style = nullptr; std::array movement_direction{0.0F, 0.0F, 0.0F}; std::array facing_direction{0.0F, 0.0F, 1.0F}; float target_speed = -1.0F; std::array world_target{0.0F, 0.0F, 0.0F}; float world_target_heading = 0.0F; std::uint32_t has_world_target = 0; std::uint64_t seed = 0; }; struct mb_agent { const mb_model * model = nullptr; const mb_style * initial_style = nullptr; std::vector context_root_xyz; std::vector context_local_rotations_xyzw; std::uint64_t context_frames = 0; std::unique_ptr current_motion; std::uint32_t current_frame = 0; }; struct mb_motion { std::uint64_t frames = 0; std::uint64_t joints = 0; std::vector root_translations; std::vector local_rotations_xyzw; std::uint64_t target_frames = 0; std::vector target_root_translations; std::vector target_local_rotations_xyzw; };