# panda3d.core.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

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

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.

getMaxDistance() → float

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

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.

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.

Return type

LPoint3

setPoint(point: LPoint3) → None

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

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

Return type

LVecBase3

property max_distance
Getter

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

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.

Return type

float

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

Setter

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

Return type

LPoint3