ADD: Update Docs
This commit is contained in:
@@ -640,7 +640,54 @@ void Engine::clear_all_instance_node_offsets(const std::string& instanceName)
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Lighting
|
||||
// Lighting - Directional (Sunlight)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void Engine::set_sunlight_direction(const glm::vec3& dir)
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
_engine->_sceneManager->setSunlightDirection(dir);
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec3 Engine::get_sunlight_direction() const
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
return _engine->_sceneManager->getSunlightDirection();
|
||||
}
|
||||
return glm::vec3(0.0f, -1.0f, 0.0f);
|
||||
}
|
||||
|
||||
void Engine::set_sunlight_color(const glm::vec3& color, float intensity)
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
_engine->_sceneManager->setSunlightColor(color, intensity);
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec3 Engine::get_sunlight_color() const
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
return _engine->_sceneManager->getSunlightColor();
|
||||
}
|
||||
return glm::vec3(1.0f);
|
||||
}
|
||||
|
||||
float Engine::get_sunlight_intensity() const
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
return _engine->_sceneManager->getSunlightIntensity();
|
||||
}
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Lighting - Point Lights
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
size_t Engine::add_point_light(const PointLight& light)
|
||||
@@ -1139,6 +1186,19 @@ void Engine::hot_reload_shaders()
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Time
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
float Engine::get_delta_time() const
|
||||
{
|
||||
if (_engine->_sceneManager)
|
||||
{
|
||||
return _engine->_sceneManager->getDeltaTime();
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Statistics
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
@@ -298,7 +298,20 @@ public:
|
||||
void clear_all_instance_node_offsets(const std::string& instanceName);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Lighting
|
||||
// Lighting - Directional (Sunlight)
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Set sunlight direction (normalized automatically)
|
||||
void set_sunlight_direction(const glm::vec3& dir);
|
||||
glm::vec3 get_sunlight_direction() const;
|
||||
|
||||
// Set sunlight color and intensity
|
||||
void set_sunlight_color(const glm::vec3& color, float intensity);
|
||||
glm::vec3 get_sunlight_color() const;
|
||||
float get_sunlight_intensity() const;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Lighting - Point Lights
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Add point light (returns index)
|
||||
@@ -399,6 +412,13 @@ public:
|
||||
// Hot reload all changed shaders
|
||||
void hot_reload_shaders();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Time
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// Get delta time in seconds for the current frame (clamped to 0.0-0.1)
|
||||
float get_delta_time() const;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Statistics (read-only)
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user