class PointLight

Bases: LightLensNode

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

Inheritance diagram

Inheritance diagram of PointLight

explicit PointLight(std::string const &name)

Do not call the copy constructor directly; instead, use make_copy() or copy_subgraph() to make a copy of a node.

void clear_specular_color(void)

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

static TypeHandle get_class_type(void)
PN_stdfloat get_max_distance(void) const

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

LPoint3 const &get_point(void) const

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.

void set_attenuation(LVecBase3 const &attenuation)

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.

void set_max_distance(PN_stdfloat max_distance)

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.

void set_point(LPoint3 const &point)

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

void set_specular_color(LColor const &color)

Sets the color of specular highlights generated by the light.