Radium Engine  1.5.0
AssimpCameraDataLoader.hpp
1 #pragma once
2 
3 #include <Core/Asset/DataLoader.hpp>
4 #include <Core/Types.hpp>
5 #include <IO/RaIO.hpp>
6 
7 #include <set>
8 
9 struct aiScene;
10 struct aiCamera;
11 struct aiNode;
12 
13 namespace Ra {
14 namespace Engine {
15 class CameraComponent;
16 } // namespace Engine
17 
18 namespace Core {
19 namespace Asset {
20 class Camera;
21 }
22 } // namespace Core
23 
24 namespace IO {
25 
28 class RA_IO_API AssimpCameraDataLoader : public Core::Asset::DataLoader<Core::Asset::Camera>
29 {
30  public:
31  explicit AssimpCameraDataLoader( const bool VERBOSE_MODE = false );
32 
33  ~AssimpCameraDataLoader() override;
34 
36  void loadData( const aiScene* scene,
37  std::vector<std::unique_ptr<Core::Asset::Camera>>& data ) override;
38 
39  protected:
41  inline bool sceneHasCamera( const aiScene* scene ) const;
42 
44  uint sceneCameraSize( const aiScene* scene ) const;
45 
47  void loadCameraData( const aiScene* scene, const aiCamera& camera, Core::Asset::Camera& data );
48 
50  Core::Matrix4 loadCameraFrame( const aiScene* scene,
51  const Core::Matrix4& parentFrame,
52  const aiCamera& node ) const;
53 };
54 
55 } // namespace IO
56 } // namespace Ra
Camera class storing the Camera frame and the projection properties The view direction is -z in camer...
Definition: Camera.hpp:16
Definition: Cage.cpp:3