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)
clearSpecularColor()

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

setDirection(direction: LVector3)

Sets the direction in which the light is aimed.

setPoint(point: LPoint3)

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

setSpecularColor(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 getColor().

Setter

Sets the color of specular highlights generated by the light.