PointLight

from panda3d.core import PointLight
class PointLight

Bases: LightLensNode

A light originating from a single point in space, and shining in all directions.

Inheritance diagram

Inheritance diagram of PointLight

__init__(name: str)
property attenuationLVecBase3
Getter

Returns the terms of the attenuation equation for the light. These are, in order, the constant, linear, and quadratic terms based on the distance from the point to the vertex.

Setter

Sets the terms of the attenuation equation for the light. These are, in order, the constant, linear, and quadratic terms based on the distance from the point to the vertex.

clearSpecularColor()None

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

static getClassType()TypeHandle
getMaxDistance()float

Returns the maximum distance at which the light has any effect, as previously specified by setMaxDistance().

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, and is usually 0.

property max_distancefloat
Getter

Returns the maximum distance at which the light has any effect, as previously specified by setMaxDistance().

Setter

Sets the radius of the light’s sphere of influence. Beyond this distance, the light may be attenuated to zero, if this is supported by the shader.

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, and is usually 0.

Setter

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

setAttenuation(attenuation: LVecBase3)None

Sets the terms of the attenuation equation for the light. These are, in order, the constant, linear, and quadratic terms based on the distance from the point to the vertex.

setMaxDistance(max_distance: float)None

Sets the radius of the light’s sphere of influence. Beyond this distance, the light may be attenuated to zero, if this is supported by the shader.

setPoint(point: LPoint3)None

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

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.