Environment light, based on a cube map.
More...
#include <environment_light.hpp>
|
| Environment_light (const glm::vec3 &position=glm::vec3(0.0f, 0.0f, 1.0f), const glm::vec3 &extent=glm::vec3(50.0f), float strength=0.0f, float falloff=0.1f, float near=0.1f) |
|
auto | position (const glm::vec3 &position) -> void |
| Set position. More...
|
|
auto | position () const -> glm::vec3 |
| Get position. More...
|
|
auto | extent (const glm::vec3 &extent) -> void |
| Set extent and recalculate cube camera projections. More...
|
|
auto | extent () const -> glm::vec3 |
| Get extent. More...
|
|
auto | inside (const glm::vec3 &point) const -> bool |
| Check if a point is inside the environment light box. More...
|
|
auto | camera (size_t index) const -> Camera |
| Get one of the six cube cameras, for rendering. More...
|
|
|
static auto | load (const std::string &directory, const std::string &path, const glm::mat4 &parent_transform=glm::mat4(1.0f)) -> Environment_light |
|
Environment light, based on a cube map.
◆ Environment_light()
mos::gfx::Environment_light::Environment_light |
( |
const glm::vec3 & |
position = glm::vec3(0.0f, 0.0f, 1.0f) , |
|
|
const glm::vec3 & |
extent = glm::vec3(50.0f) , |
|
|
float |
strength = 0.0f , |
|
|
float |
falloff = 0.1f , |
|
|
float |
near = 0.1f |
|
) |
| |
|
explicit |
- Parameters
-
extent | Describes how big the environment is, for parallax/box correction. |
◆ camera()
auto mos::gfx::Environment_light::camera |
( |
size_t |
index | ) |
const -> Camera |
Get one of the six cube cameras, for rendering.
◆ extent() [1/2]
auto mos::gfx::Environment_light::extent |
( |
const glm::vec3 & |
extent | ) |
-> void |
Set extent and recalculate cube camera projections.
◆ extent() [2/2]
auto mos::gfx::Environment_light::extent |
( |
| ) |
const -> glm::vec3 |
◆ inside()
auto mos::gfx::Environment_light::inside |
( |
const glm::vec3 & |
point | ) |
const -> bool |
Check if a point is inside the environment light box.
◆ position() [1/2]
auto mos::gfx::Environment_light::position |
( |
const glm::vec3 & |
position | ) |
-> void |
◆ position() [2/2]
auto mos::gfx::Environment_light::position |
( |
| ) |
const -> glm::vec3 |
◆ falloff
float mos::gfx::Environment_light::falloff {0.1f} |
◆ strength
float mos::gfx::Environment_light::strength {0.0f} |
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/mos/checkouts/latest/include/mos/gfx/environment_light.hpp