Radium Engine  1.5.20
Loading...
Searching...
No Matches
AssimpLightDataLoader.hpp
1#pragma once
2
3#include <Core/Asset/DataLoader.hpp>
4#include <Core/Asset/LightData.hpp>
5#include <Core/Types.hpp>
6#include <IO/RaIO.hpp>
7
8#include <set>
9
10struct aiScene;
11struct aiLight;
12struct aiNode;
13
14namespace Ra {
15namespace Engine {
16class Light;
17}
18
19} // namespace Ra
20
21namespace Ra {
22namespace IO {
23
24class RA_IO_API AssimpLightDataLoader : public Core::Asset::DataLoader<Core::Asset::LightData>
25{
26 public:
28 explicit AssimpLightDataLoader( const std::string& filepath, const bool VERBOSE_MODE = false );
29
31 ~AssimpLightDataLoader() override;
32
34 void loadData( const aiScene* scene,
36
37 protected:
39 inline bool sceneHasLight( const aiScene* scene ) const;
40
41 uint sceneLightSize( const aiScene* scene ) const;
42
44
45 // Core::Asset::LightData *loadLightData(const aiScene *scene, const aiLight &light);
46 std::unique_ptr<Core::Asset::LightData> loadLightData( const aiScene* scene,
47 const aiLight& light );
48
49 Core::Matrix4 loadLightFrame( const aiScene* scene,
50 const Core::Matrix4& parentFrame,
51 const std::string& lightName ) const;
52
54 std::string fetchName( const aiLight& light ) const;
55
57 Core::Asset::LightData::LightType fetchType( const aiLight& light ) const;
58
60 inline void setFrame( const Core::Matrix4& frame ) { m_frame = frame; }
61
62 private:
63 std::string m_filepath;
64 Core::Transform m_frame;
65};
66
67} // namespace IO
68} // namespace Ra
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3