Light

from acron.core import Light
class Light

Bases:

The abstract interface to all kinds of lights. The actual light objects also inherit from AcronNode, and can therefore be added to the scene graph at some arbitrary point to define the coordinate system of effect.

Inheritance diagram

digraph inheritanced9500b3348 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "Light" [URL="acron.core.Light.html#acron.core.Light",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "Light" [arrowsize=0.75,style=""]; }
as_node()
property color → LColor

Returns/Sets the basic color of the light.

property color_temperature → float
Getter

Returns the basic color temperature of the light, assuming has_color_temperature() returns true.

Added in version 1.10.0.

Setter

Sets the color temperature of the light in kelvins. This will recalculate the light’s color.

The default value is 6500 K, corresponding to a perfectly white light assuming a D65 white point.

Added in version 1.10.0.

get_attenuation()

Returns the terms of the attenuation equation for the light. These are, in order, the constant, linear, and quadratic terms based on the distance from the point to the vertex.

get_class_priority()
static get_class_type()
get_color()

Returns the basic color of the light.

get_color_temperature()

Returns the basic color temperature of the light, assuming has_color_temperature() returns true.

Added in version 1.10.0.

get_exponent()

For spotlights, returns the exponent that controls the amount of light falloff from the center of the spotlight. For other kinds of lights, returns 0.

get_priority()

Returns the priority associated with this light. See set_priority().

get_specular_color()

Returns the color of specular highlights generated by the light. This value is meaningless for ambient lights.

has_color_temperature()

Returns true if the color was specified as a temperature in kelvins, and get_color_temperature() is defined.

Added in version 1.10.0.

is_ambient_light()

Returns true if this is an AmbientLight, false if it is some other kind of light.

property priority → int
Getter

Returns the priority associated with this light. See set_priority().

Setter

Changes the relative importance of this light relative to the other lights that are applied simultaneously.

The priority number is used to decide which of the requested lights are to be selected for rendering when more lights are requested than the hardware will support. The highest-priority n lights are selected for rendering.

This is similar to TextureStage.set_priority().

set_color()

Sets the basic color of the light.

set_color_temperature()

Sets the color temperature of the light in kelvins. This will recalculate the light’s color.

The default value is 6500 K, corresponding to a perfectly white light assuming a D65 white point.

Added in version 1.10.0.

set_priority()

Changes the relative importance of this light relative to the other lights that are applied simultaneously.

The priority number is used to decide which of the requested lights are to be selected for rendering when more lights are requested than the hardware will support. The highest-priority n lights are selected for rendering.

This is similar to TextureStage.set_priority().