DirectionalLight¶

class DirectionalLight

Bases: LightLensNode

A light shining from infinitely far away in a particular direction, like sunlight.

Inheritance diagram

explicit DirectionalLight(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)
LVector3 const &get_direction(void) const

Returns the direction in which the light is aimed. This is local to the coordinate space in which the light is assigned.

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.

This actually has no bearing on the visual effect of the light, since the light is rendered as if it were infinitely far away. This is only used to create a visible representation of the light.

void set_direction(LVector3 const &direction)

Sets the direction in which the light is aimed.

void set_point(LPoint3 const &point)

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

void set_specular_color(LColor const &color)

Sets the color of specular highlights generated by the light.