Skip to content
Angel Uriot edited this page Sep 8, 2021 · 7 revisions

This section contains all the lights classes. There is an abstract class Light and its three derived classes : AmbientLight, DirectionalLight and PointLight. They are mainly used by Scene and Window but can be used separately.

Light

An abstract class that represents a light. (see AmbientLight, DirectionalLight and PointLight)

  • Enums :

    • Type : The type of light.
      • Ambient : An ambient light. (set at 0)
      • Directional : A light at an infinite distance shining in a certain direction, like the sun. (set at 1)
      • Point : A light shining in all directions at a certain position. (set at 2)
  • Functions :

    • You can get the type of the light.
    • There are setters and getters for the color and the intensity of the light.

AmbientLight

A derived class from Light that represents an ambient light.

  • Constructors :

    • You can specify the color and the intensity of the light.
  • Functions :

    • All the Light functions.

DirectionalLight

A derived class from Light that represents a light at an infinite distance shining in a certain direction. (like the sun)

  • Constructors :

    • You can specify the direction, the color and the intensity of the light.
  • Functions :

    • All the Light functions.
    • You can get and set the direction of the light.

PointLight

A derived class from Light that represents a light shining in all directions at a certain position.

  • Constructors :

    • You can specify the position, the color and the intensity of the light.
  • Functions :

    • All the Light functions.
    • You can get and set the position of the light.

Clone this wiki locally