# panda3d.core.DirectionalLight¶

from panda3d.core import DirectionalLight

class DirectionalLight

Bases: LightLensNode

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

Inheritance diagram

__init__(name: str) → None
setSpecularColor(color: LColor) → None

Sets the color of specular highlights generated by the light.

clearSpecularColor() → None

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

getPoint() → 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.

Return type

LPoint3

setPoint(point: LPoint3) → None

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

getDirection() → LVector3

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

Return type

LVector3

setDirection(direction: LVector3) → None

Sets the direction in which the light is aimed.

static getClassType() → TypeHandle
Return type

TypeHandle

property specular_color
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.

Return type

LColor

property point
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.

Return type

LPoint3

property direction
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.

Return type

LVector3