Represents a skybox in a 3D scene.
More...
#include <skybox.hpp>
|
| | Skybox (std::shared_ptr< Cubemap > cubemap, const std::string &shader_path="shaders/skybox.glsl") |
| | Constructs a Skybox with the given cubemap and shader.
|
| |
|
| ~Skybox () |
| | Destructor for the Skybox class.
|
| |
| void | render (std::shared_ptr< Camera > camera) |
| | Renders the skybox using the specified camera.
|
| |
| void | set_cubemap (std::shared_ptr< Cubemap > cubemap) |
| | Sets the cubemap texture for the skybox.
|
| |
| std::shared_ptr< Cubemap > | get_cubemap () const |
| | Retrieves the cubemap texture used by the skybox.
|
| |
| void | set_exposure (float exposure) |
| | Sets the exposure level for the skybox rendering.
|
| |
| float | get_exposure () const |
| | Retrieves the exposure level for the skybox rendering.
|
| |
| std::shared_ptr< renderer::Shader > | get_shader () const |
| | Retrieves the shader used for rendering the skybox.
|
| |
Represents a skybox in a 3D scene.
The Skybox class manages the rendering of a skybox using a cubemap texture. It provides methods to render the skybox with a specified camera and shader.
◆ Skybox()
| lmgl::scene::Skybox::Skybox |
( |
std::shared_ptr< Cubemap > | cubemap, |
|
|
const std::string & | shader_path = "shaders/skybox.glsl" ) |
Constructs a Skybox with the given cubemap and shader.
Creates a Skybox object using the provided Cubemap and shader file path. If no shader path is provided, a default skybox shader is used.
- Parameters
-
| cubemap | A shared pointer to the Cubemap object to be used for the skybox. |
| shader_path | The file path to the shader used for rendering the skybox (default is "shaders/skybox.glsl"). |
◆ get_cubemap()
| std::shared_ptr< Cubemap > lmgl::scene::Skybox::get_cubemap |
( |
| ) |
const |
|
inline |
Retrieves the cubemap texture used by the skybox.
- Returns
- A shared pointer to the Cubemap object used for the skybox.
◆ get_exposure()
| float lmgl::scene::Skybox::get_exposure |
( |
| ) |
const |
|
inline |
Retrieves the exposure level for the skybox rendering.
- Returns
- The current exposure level.
◆ get_shader()
Retrieves the shader used for rendering the skybox.
- Returns
- A shared pointer to the Shader object used for the skybox.
◆ render()
| void lmgl::scene::Skybox::render |
( |
std::shared_ptr< Camera > | camera | ) |
|
Renders the skybox using the specified camera.
Renders the skybox by setting up the appropriate shader uniforms and drawing the cube geometry.
- Parameters
-
| camera | A shared pointer to the Camera object used for rendering. |
◆ set_cubemap()
| void lmgl::scene::Skybox::set_cubemap |
( |
std::shared_ptr< Cubemap > | cubemap | ) |
|
|
inline |
Sets the cubemap texture for the skybox.
Sets the Cubemap object to be used for rendering the skybox.
- Parameters
-
| cubemap | A shared pointer to the Cubemap object to be used for the skybox. |
◆ set_exposure()
| void lmgl::scene::Skybox::set_exposure |
( |
float | exposure | ) |
|
|
inline |
Sets the exposure level for the skybox rendering.
- Parameters
-
| exposure | The exposure level to set. |
The documentation for this class was generated from the following files:
- include/lmgl/scene/skybox.hpp
- src/scene/skybox.cpp