Light

Inherits: VisualInstance < Spatial < Node < Object

Inherited By: SpotLight, OmniLight, DirectionalLight

Category: Core

Brief Description

Provides a base class for different kinds of light nodes.

Member Functions

Color get_color ( ) const
int get_cull_mask ( ) const
float get_param ( int param ) const
Color get_shadow_color ( ) const
bool get_shadow_reverse_cull_face ( ) const
bool has_shadow ( ) const
bool is_editor_only ( ) const
bool is_negative ( ) const
void set_color ( Color color )
void set_cull_mask ( int cull_mask )
void set_editor_only ( bool editor_only )
void set_negative ( bool enabled )
void set_param ( int param, float value )
void set_shadow ( bool enabled )
void set_shadow_color ( Color shadow_color )
void set_shadow_reverse_cull_face ( bool enable )

Member Variables

Numeric Constants

  • PARAM_ENERGY = 0
  • PARAM_SPECULAR = 1
  • PARAM_RANGE = 2
  • PARAM_ATTENUATION = 3
  • PARAM_SPOT_ANGLE = 4
  • PARAM_SPOT_ATTENUATION = 5
  • PARAM_CONTACT_SHADOW_SIZE = 6
  • PARAM_SHADOW_MAX_DISTANCE = 7
  • PARAM_SHADOW_SPLIT_1_OFFSET = 8
  • PARAM_SHADOW_SPLIT_2_OFFSET = 9
  • PARAM_SHADOW_SPLIT_3_OFFSET = 10
  • PARAM_SHADOW_NORMAL_BIAS = 11
  • PARAM_SHADOW_BIAS = 12
  • PARAM_MAX = 14

Description

Light is the abstract base class for light nodes, so it shouldn’t be used directly (It can’t be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting.

Member Function Description

  • Color get_color ( ) const
  • int get_cull_mask ( ) const
  • Color get_shadow_color ( ) const
  • bool get_shadow_reverse_cull_face ( ) const
  • bool has_shadow ( ) const
  • bool is_editor_only ( ) const
  • bool is_negative ( ) const
  • void set_color ( Color color )
  • void set_cull_mask ( int cull_mask )
  • void set_editor_only ( bool editor_only )
  • void set_negative ( bool enabled )
  • void set_param ( int param, float value )
  • void set_shadow ( bool enabled )
  • void set_shadow_color ( Color shadow_color )
  • void set_shadow_reverse_cull_face ( bool enable )