Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
CookingContext.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <Common/assertion.h>
7
8#include <memory>
9
10namespace ph
11{
12
13class VisualWorld;
14class CookedResourceCollection;
15class TransientResourceCache;
16class TransientVisualElement;
17class Geometry;
18class Actor;
19class CookedGeometry;
20
23class CookingContext final
24{
25 // TODO: remove
26 friend class VisualWorld;
27
28public:
29 explicit CookingContext(const VisualWorld* world);
30
31 const CookingConfig& getConfig() const;
32 void setConfig(CookingConfig config);
35
40
46
50 const CookedGeometry* getCooked(const std::shared_ptr<Geometry>& geometry) const;
51
55 const TransientVisualElement* getCached(const std::shared_ptr<Actor>& actor) const;
56
57private:
58 const VisualWorld& getWorld() const;
59
60 CookingConfig m_config;
61 const VisualWorld* m_world;
62 CookedResourceCollection* m_resources;
64};
65
66}// end namespace ph
Definition CookedGeometry.h:13
Provides thread-safe cooked data creation and storage. All methods are thread-safe to call,...
Definition CookedResourceCollection.h:31
Definition CookingConfig.h:7
Information about the world being cooked.
Definition CookingContext.h:24
math::AABB3D getLeafActorsBound() const
Bounds actors from levels finished cooking. The bound is updated every time a level has done cooking....
Definition CookingContext.cpp:60
const TransientVisualElement * getCached(const std::shared_ptr< Actor > &actor) const
Definition CookingContext.cpp:72
TransientResourceCache * getCache() const
Definition CookingContext.cpp:50
const CookingConfig & getConfig() const
Definition CookingContext.cpp:35
const CookedGeometry * getCooked(const std::shared_ptr< Geometry > &geometry) const
Definition CookingContext.cpp:65
CookedResourceCollection * getResources() const
Definition CookingContext.cpp:45
CookingContext(const VisualWorld *world)
Definition CookingContext.cpp:18
void setConfig(CookingConfig config)
Definition CookingContext.cpp:40
math::AABB3D getRootActorsBound() const
Bounds actors cooked in the first level. The bound is only available after the first level has done c...
Definition CookingContext.cpp:55
Provides thread-safe cooked data creation and storage. Similar to TransientVisualElement,...
Definition TransientResourceCache.h:25
A group of cooked data that represent the visible part of the scene at a specific time....
Definition TransientVisualElement.h:19
A virtual world for image synthesis.
Definition VisualWorld.h:34
The root for all renderer implementations.
Definition EEngineProject.h:6