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

Inheritance diagram of DirectionalLight

__init__(name: str)
clearSpecularColor()None

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

property directionLVector3
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 getClassType()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.

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.

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

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_colorLColor
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.