Skip to content

AmbientLight

Represents a light that gets emitted in all directions equally.

This light cannot be used to cast shadows as it does not have a direction.

cpp
auto ambient_light = vglx::AmbientLight::Create({
  .color = 0xFFFFFF,
  .intensity = 0.3f
});

INFO

Derives from Light and inherits all public properties and methods.

Construction

Constructors


AmbientLight()

cpp
vglx::AmbientLight::AmbientLight(const Parameters &params)
ParameterDescription
paramsAmbientLight::Parameters

Constructs an AmbientLight object.

Factories preferred


AmbientLight::Create() auto

cpp
static auto vglx::AmbientLight::Create(const Parameters &params)
ParameterDescription
paramsAmbientLight::Parameters

Creates a shared pointer to an AmbientLight object.

Types

AmbientLight::Parameters struct

Parameters for constructing an AmbientLight object.

NameTypeDescription
colorColorLight color.
intensityfloatLight intensity.

Functions

GetType() LightType virtual

cpp
LightType vglx::AmbientLight::GetType() const override

Returns light type.

Released under the MIT License.