panda3d.core.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) → None
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

clearSpecularColor() → None

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

static getClassType() → TypeHandle
Return type

TypeHandle

getMaxDistance() → float

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

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

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

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