Light

from panda3d.core import Light
class Light

Bases: DTOOL_SUPER_BASE

The abstract interface to all kinds of lights. The actual light objects also inherit from PandaNode, and can therefore be added to the scene graph at some arbitrary point to define the coordinate system of effect.

Inheritance diagram

Inheritance diagram of Light

__init__(*args, **kwargs)
asNode()

C++ Interface: as_node(const Light self)

as_node()

C++ Interface: as_node(const Light self)

color
color_temperature
getAttenuation()

C++ Interface: get_attenuation(Light self)

/**
  • 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.

*/

getClassPriority()

C++ Interface: get_class_priority(Light self)

getClassType()

C++ Interface: get_class_type()

getColor()

C++ Interface: get_color(Light self)

/**
  • Returns the basic color of the light.

*/

getColorTemperature()

C++ Interface: get_color_temperature(Light self)

/**
  • Returns the basic color temperature of the light, assuming

  • has_color_temperature() returns true.

  • @since 1.10.0

*/

getExponent()

C++ Interface: get_exponent(Light self)

/**
  • For spotlights, returns the exponent that controls the amount of light

  • falloff from the center of the spotlight. For other kinds of lights,

  • returns 0.

*/

getPriority()

C++ Interface: get_priority(Light self)

/**
  • Returns the priority associated with this light. See set_priority().

*/

getSpecularColor()

C++ Interface: get_specular_color(Light self)

/**
  • Returns the color of specular highlights generated by the light. This

  • value is meaningless for ambient lights.

*/

get_attenuation()

C++ Interface: get_attenuation(Light self)

/**
  • 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.

*/

get_class_priority()

C++ Interface: get_class_priority(Light self)

get_class_type()

C++ Interface: get_class_type()

get_color()

C++ Interface: get_color(Light self)

/**
  • Returns the basic color of the light.

*/

get_color_temperature()

C++ Interface: get_color_temperature(Light self)

/**
  • Returns the basic color temperature of the light, assuming

  • has_color_temperature() returns true.

  • @since 1.10.0

*/

get_exponent()

C++ Interface: get_exponent(Light self)

/**
  • For spotlights, returns the exponent that controls the amount of light

  • falloff from the center of the spotlight. For other kinds of lights,

  • returns 0.

*/

get_priority()

C++ Interface: get_priority(Light self)

/**
  • Returns the priority associated with this light. See set_priority().

*/

get_specular_color()

C++ Interface: get_specular_color(Light self)

/**
  • Returns the color of specular highlights generated by the light. This

  • value is meaningless for ambient lights.

*/

hasColorTemperature()

C++ Interface: has_color_temperature(Light self)

/**
  • Returns true if the color was specified as a temperature in kelvins, and

  • get_color_temperature is defined.

  • @since 1.10.0

*/

has_color_temperature()

C++ Interface: has_color_temperature(Light self)

/**
  • Returns true if the color was specified as a temperature in kelvins, and

  • get_color_temperature is defined.

  • @since 1.10.0

*/

isAmbientLight()

C++ Interface: is_ambient_light(Light self)

/**
  • Returns true if this is an AmbientLight, false if it is some other kind of

  • light.

*/

is_ambient_light()

C++ Interface: is_ambient_light(Light self)

/**
  • Returns true if this is an AmbientLight, false if it is some other kind of

  • light.

*/

priority
setColor()

C++ Interface: set_color(const Light self, const LVecBase4f color)

/**
  • Sets the basic color of the light.

*/

setColorTemperature()

C++ Interface: set_color_temperature(const Light self, float temperature)

/**
  • Sets the color temperature of the light in kelvins. This will recalculate

  • the light’s color.

  • The default value is 6500 K, corresponding to a perfectly white light

  • assuming a D65 white point.

  • @since 1.10.0

*/

setPriority()

C++ Interface: set_priority(const Light self, int priority)

/**
  • Changes the relative importance of this light relative to the other lights

  • that are applied simultaneously.

  • The priority number is used to decide which of the requested lights are to

  • be selected for rendering when more lights are requested than the hardware

  • will support. The highest-priority n lights are selected for rendering.

  • This is similar to TextureStage::set_priority().

*/

set_color()

C++ Interface: set_color(const Light self, const LVecBase4f color)

/**
  • Sets the basic color of the light.

*/

set_color_temperature()

C++ Interface: set_color_temperature(const Light self, float temperature)

/**
  • Sets the color temperature of the light in kelvins. This will recalculate

  • the light’s color.

  • The default value is 6500 K, corresponding to a perfectly white light

  • assuming a D65 white point.

  • @since 1.10.0

*/

set_priority()

C++ Interface: set_priority(const Light self, int priority)

/**
  • Changes the relative importance of this light relative to the other lights

  • that are applied simultaneously.

  • The priority number is used to decide which of the requested lights are to

  • be selected for rendering when more lights are requested than the hardware

  • will support. The highest-priority n lights are selected for rendering.

  • This is similar to TextureStage::set_priority().

*/