# panda3d.core.DirectionalLight¶

class DirectionalLight

Bases: LightLensNode

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

Inheritance diagram

__init__(name: str) → None
clearSpecularColor() → None

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

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

static getClassType() → TypeHandle
Return type

TypeHandle

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

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

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

setDirection(direction: LVector3) → None

Sets the direction in which the light is aimed.

setPoint(point: LPoint3) → None

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

setSpecularColor(color: LColor) → None

Sets the color of specular highlights generated by the light.

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