Class WebSceneAmbientLight#
Defined in File WebSceneAmbientLight.h
Inheritance Relationships#
Base Type#
public Karana::Scene::WebSceneNode(Class WebSceneNode)
Class Documentation#
-
class WebSceneAmbientLight : public Karana::Scene::WebSceneNode#
Specialized node to provide a viewpoint for the WebScene.
See Scene layer for more discussion on the scene layer.
Public Functions
-
WebSceneAmbientLight(std::string_view name, const Karana::Core::ks_ptr<Scene> &scene, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, bool *batching, const Color &color, float intensity)#
WebSceneAmbientLight constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
name – Name for the WebSceneAmbientLight
scene – WebScene to add the camera to.
server – Server to communicate with frontends
batching – Whether transform updates are being batched.
color – Color of the light.
intensity – Intensity of the light.
-
float getIntensity()#
Get the light intensity.
- Returns:
The light intensity
-
void setIntensity(float intensity)#
Set the light intensity.
- Parameters:
intensity – The light intensity
Public Static Functions
-
static Karana::Core::ks_ptr<WebSceneAmbientLight> create(std::string_view name, const Karana::Core::ks_ptr<WebScene> &scene, const Color &color = Color::WHITE, float intensity = 1)#
Create a new WebSceneAmbientLight.
- Parameters:
name – Name for the WebSceneAmbientLight
scene – WebScene to add the camera to.
color – Color of the light.
intensity – Intensity of the light.
- Returns:
A pointer to the new light.
Protected Functions
-
virtual void _discard(Karana::Core::ks_ptr<Karana::Core::Base> &base) override#
Discard the provided WebSceneAmbientLight.
- Parameters:
base – - Base pointer to the WebSceneAmbientLight.
-
WebSceneAmbientLight(std::string_view name, const Karana::Core::ks_ptr<Scene> &scene, const Karana::Core::ks_ptr<Karana::WebUI::Server> &server, bool *batching, const Color &color, float intensity)#