30 #include <unordered_map> 31 #include <unordered_set> 54 namespace visualization {
75 MaterialHandle CreateMaterial(
const void* material_data,
size_t data_size);
82 TextureHandle CreateTexture(
const std::shared_ptr<geometry::Image>& image);
99 std::weak_ptr<filament::Material> GetMaterial(
const MaterialHandle&
id);
100 std::weak_ptr<filament::MaterialInstance> GetMaterialInstance(
102 std::weak_ptr<filament::Texture> GetTexture(
const TextureHandle&
id);
103 std::weak_ptr<filament::IndirectLight> GetIndirectLight(
105 std::weak_ptr<filament::Skybox> GetSkybox(
const SkyboxHandle&
id);
106 std::weak_ptr<filament::VertexBuffer> GetVertexBuffer(
108 std::weak_ptr<filament::IndexBuffer> GetIndexBuffer(
115 filament::Engine& engine_;
117 template <
class ResourceType>
118 using ResourcesContainer =
120 std::shared_ptr<ResourceType>>;
122 ResourcesContainer<filament::MaterialInstance> material_instances_;
123 ResourcesContainer<filament::Material> materials_;
124 ResourcesContainer<filament::Texture> textures_;
125 ResourcesContainer<filament::IndirectLight> ibls_;
126 ResourcesContainer<filament::Skybox> skyboxes_;
127 ResourcesContainer<filament::VertexBuffer> vertex_buffers_;
128 ResourcesContainer<filament::IndexBuffer> index_buffers_;
134 std::unordered_map<REHandle_abstract, std::unordered_set<REHandle_abstract>>
137 filament::Texture* LoadTextureFromImage(
138 const std::shared_ptr<geometry::Image>& image);
139 filament::Texture* LoadFilledTexture(
const Eigen::Vector3f&
color,
Definition: FilamentResourceManager.h:59
static const MaterialInstanceHandle kColorMapMaterial
Definition: FilamentResourceManager.h:65
Definition: TriangleMesh.h:746
math::float4 color
Definition: LineSetBuffers.cpp:46
static const TextureHandle kDefaultNormalMap
Definition: FilamentResourceManager.h:68
static const TextureHandle kDefaultColorMap
Definition: FilamentResourceManager.h:67
Definition: Open3DViewer.h:29
static const MaterialInstanceHandle kDepthMaterial
Definition: FilamentResourceManager.h:63
static const MaterialInstanceHandle kNormalsMaterial
Definition: FilamentResourceManager.h:64
static const TextureHandle kDefaultTexture
Definition: FilamentResourceManager.h:66
static const MaterialHandle kDefaultUnlit
Definition: FilamentResourceManager.h:62
Definition: Renderer.h:45
Definition: FilamentCamera.h:31
Definition: RendererHandle.h:71
The Image class stores image with customizable width, height, num of channels and bytes per channel...
Definition: Image.h:53
static const MaterialHandle kDefaultLit
Definition: FilamentResourceManager.h:61