|
Oxygen Engine
Modern C++ 3D Engine using OpenGL
|
#include <OxygenEngine/scene/component/lighting.h>
Inheritance diagram for oe::component::Lighting:
Collaboration diagram for oe::component::Lighting:Public Member Functions | |
| Lighting (oe::scene::Manager &, oe::render::TextureManager &texture_manager) | |
| Create the component. | |
| virtual void | onUpdate (const std::chrono::nanoseconds, const int8_t) override |
| Update lighting. | |
| void | fillShader (oe::render::ShaderBase &shader) const noexcept |
| Send All lights data to the shader. | |
| void | fillReflectionsShader (oe::render::ShaderBase &shader) const noexcept |
| Send Reflection probes data to the shader. | |
| void | fillTransparencyShader (oe::render::ShaderBase &shader) const noexcept |
| Send Transparency data (ie refractive buffer) to the shader. | |
| void | setRefractionTexture (const std::shared_ptr< oe::render::Texture > &refraction_texture) |
| Set texture that will be used as source for refractive surfaces. | |
| const std::vector< glm::mat4 > | getAreaLights () const |
| Get Area lights Each one packed as a matrix where each xyz rows are the light edges, last component w1 is "double sided" and w2, w3, w4 are "light color". | |
| void | setDefaultReflectionProbe (std::shared_ptr< oe::render::Cubemap > cubemap) |
| Set Default reflection source. | |
Public Member Functions inherited from oe::scene::SceneComponent | |
| SceneComponent (Manager &entity) | |
| Constructor. | |
| Manager & | getSceneManager () |
| Get Scene bound to this component. | |
| const Manager & | getSceneManager () const |
| Get Scene bound to this component. | |
| virtual void | onNodeAdd (Node &) |
| Run actions after a node is added. | |
| virtual void | onNodeRemove (Node &) |
| Run actions before a node is removed. | |
Public Member Functions inherited from oe::component::EntityComponent< Manager > | |
| const std::string & | getName () const |
Public Attributes | |
| int8_t | match_flags = 0 |
Do not update lighting unless flags is same as this value. | |
Public Attributes inherited from oe::component::Component | |
| bool | is_active = true |
| Toggle to check if the Component is active, actual meaning heavily depends of the component type. | |
Protected Attributes | |
| std::vector< std::pair< PointLight *, oe::scene::Node * > > | _point_lights |
| std::vector< std::pair< AreaLight *, oe::scene::Node * > > | _area_lights |
| std::vector< glm::vec3 > | _point_light_positions |
| std::vector< glm::vec3 > | _point_light_colors |
| std::vector< glm::mat4 > | _area_light_matrices |
| ReflectionProbe | _default_reflection_probe |
| oe::render::TextureManager & | _texture_manager |
| oe::render::Pbr | _pbr |
| std::shared_ptr< oe::render::Texture > | _brdf_texture |
| std::shared_ptr< oe::render::Texture > | _refraction_texture |
| friend | PointLight |
| friend | AreaLight |
Protected Attributes inherited from oe::component::EntityComponent< Manager > | |
| Manager & | _entity |
Additional Inherited Members | |
Protected Member Functions inherited from oe::component::EntityComponent< Manager > | |
| EntityComponent (Manager &entity) | |
Lighting component.
Handles lighting + reflections of the scene
| oe::component::Lighting::Lighting | ( | oe::scene::Manager & | , |
| oe::render::TextureManager & | texture_manager | ||
| ) |
Create the component.
|
noexcept |
Send Reflection probes data to the shader.
| shader |
|
noexcept |
Send All lights data to the shader.
| shader |
|
noexcept |
Send Transparency data (ie refractive buffer) to the shader.
| shader |
|
overridevirtual |
Update lighting.
| delta | seconds since last call of update |
| flags | custom flags |
Reimplemented from oe::component::Component.
|
inline |
Set texture that will be used as source for refractive surfaces.
| shader |