PointLight

from panda3d.core import PointLight
class PointLight

Bases:

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

Returns/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()

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

Setter

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

setAttenuation(attenuation: LVecBase3)

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)

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)

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

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.