DirectionalLight

from panda3d.core import DirectionalLight
class DirectionalLight

Bases:

Bases: LightLensNode

A light shining from infinitely far away in a particular direction, like sunlight.

Inheritance diagram

Inheritance diagram of DirectionalLight

__init__(name: str)
clear_specular_color()

Clears a custom specular color setting, meaning that the specular color will now come from the color.

property direction LVector3
Getter

Returns the direction in which the light is aimed. This is local to the coordinate space in which the light is assigned.

Setter

Sets the direction in which the light is aimed.

static get_class_type() TypeHandle
get_direction() LVector3

Returns the direction in which the light is aimed. This is local to the coordinate space in which the light is assigned.

get_point() LPoint3

Returns the point in space at which the light is located. This is local to the coordinate space in which the light is assigned.

This actually has no bearing on the visual effect of the light, since the light is rendered as if it were infinitely far away. This is only used to create a visible representation of the light.

property point LPoint3
Getter

Returns the point in space at which the light is located. This is local to the coordinate space in which the light is assigned.

This actually has no bearing on the visual effect of the light, since the light is rendered as if it were infinitely far away. This is only used to create a visible representation of the light.

Setter

Sets the point in space at which the light is located.

set_direction(direction: LVector3)

Sets the direction in which the light is aimed.

set_point(point: LPoint3)

Sets the point in space at which the light is located.

set_specular_color(color: LColor)

Sets the color of specular highlights generated by the light.

property specular_color LColor
Getter

Returns the color of specular highlights generated by the light. This is usually the same as get_color().

Setter

Sets the color of specular highlights generated by the light.