Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
CookedDataStorage.h
Go to the documentation of this file.
1#pragma once
2
10
11#include <vector>
12#include <memory>
13
14namespace ph
15{
16
18{
19public:
20 CookedDataStorage() = default;
22 ~CookedDataStorage() = default;
23
24 void clear();
25
26 void add(std::unique_ptr<Intersectable> intersectable);
27 void add(std::unique_ptr<PrimitiveMetadata> metadata);
28 void add(std::unique_ptr<Emitter> emitter);
29 void add(std::unique_ptr<math::Transform> transform);
30 void add(std::vector<std::unique_ptr<Intersectable>>&& intersectables);
31 void add(std::vector<std::unique_ptr<math::Transform>>&& transforms);
32 void add(CookedDataStorage&& other);
33
34 std::size_t numIntersectables() const;
35 std::size_t numEmitters() const;
36
41
46
51
56
61
66
67 // forbid copying
68 //
69 CookedDataStorage(const CookedDataStorage& other) = delete;
71
72private:
73 std::vector<std::unique_ptr<Intersectable>> m_intersectables;
74 std::vector<std::unique_ptr<PrimitiveMetadata>> m_primitiveMetadatas;
75 std::vector<std::unique_ptr<Emitter>> m_emitters;
76 std::vector<std::unique_ptr<math::Transform>> m_transforms;
77};
78
79}// end namespace ph
Definition CookedDataStorage.h:18
std::size_t numEmitters() const
Definition CookedDataStorage.cpp:96
CookedDataStorage(const CookedDataStorage &other)=delete
CookedDataStorage()=default
void add(std::unique_ptr< Intersectable > intersectable)
Definition CookedDataStorage.cpp:27
~CookedDataStorage()=default
void clear()
Definition CookedDataStorage.cpp:12
TConstIteratorProxy< std::vector< std::unique_ptr< PrimitiveMetadata > > > primitiveMetadatas() const
Definition CookedDataStorage.h:52
TConstIteratorProxy< std::vector< std::unique_ptr< Emitter > > > emitters() const
Definition CookedDataStorage.h:62
TConstIteratorProxy< std::vector< std::unique_ptr< Intersectable > > > intersectables() const
Definition CookedDataStorage.h:42
std::size_t numIntersectables() const
Definition CookedDataStorage.cpp:91
CookedDataStorage & operator=(const CookedDataStorage &rhs)=delete
TIteratorProxy< std::vector< std::unique_ptr< Intersectable > > > intersectables()
Definition CookedDataStorage.h:37
TIteratorProxy< std::vector< std::unique_ptr< Emitter > > > emitters()
Definition CookedDataStorage.h:57
TIteratorProxy< std::vector< std::unique_ptr< PrimitiveMetadata > > > primitiveMetadatas()
Definition CookedDataStorage.h:47
Definition TConstIteratorProxy.h:8
Definition TIteratorProxy.h:8
The root for all renderer implementations.
Definition EEngineProject.h:6