Lagrange
ibl.h
1/*
2 * Copyright 2021 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/ui/api.h>
15#include <lagrange/fs/filesystem.h>
16#include <lagrange/ui/Entity.h>
17#include <lagrange/ui/components/IBL.h>
18
19namespace lagrange {
20namespace ui {
21
23
29LA_UI_API IBL generate_ibl(const fs::path& path, size_t resolution = 1024);
30
36LA_UI_API IBL generate_ibl(const std::shared_ptr<Texture>& background_texture, size_t resolution = 1024);
37
41LA_UI_API Entity get_ibl_entity(const Registry& registry);
42
46LA_UI_API const IBL* get_ibl(const Registry& registry);
47
49LA_UI_API IBL* get_ibl(Registry& registry);
50
52LA_UI_API Entity add_ibl(Registry& registry, IBL ibl);
53
55LA_UI_API void clear_ibl(Registry& registry);
56
64LA_UI_API bool save_ibl(const IBL& ibl, const fs::path& folder);
65
66} // namespace ui
67} // namespace lagrange
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
LA_UI_API Entity add_ibl(Registry &registry, IBL ibl)
Adds IBL to the scene.
Definition: ibl.cpp:377
LA_UI_API const IBL * get_ibl(const Registry &registry)
Returns pointer to the first IBL found in the registry.
Definition: ibl.cpp:363
LA_UI_API Entity get_ibl_entity(const Registry &registry)
Returns first <IBL> entity found in registry.
Definition: ibl.cpp:356
LA_UI_API void clear_ibl(Registry &registry)
Removes all ibls.
Definition: ibl.cpp:384
LA_UI_API IBL generate_ibl(const fs::path &path, size_t resolution=1024)
Utility functions for Image Based Lights (IBLs)
Definition: ibl.cpp:141
LA_UI_API bool save_ibl(const IBL &ibl, const fs::path &folder)
Saves IBL as individual .png files in given folder.
Definition: ibl.cpp:390
Main namespace for Lagrange.
Definition: AABBIGL.h:30