Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# Light Class Reference

The abstract interface to all kinds of lights. More...

Inheritance diagram for Light:

List of all members.

## Public Member Functions
PandaNode | asNode ()
int | getClassPriority ()
VBase4 const | getColor ()
| Returns the basic color of the light.
int | getPriority ()
| Returns the priority associated with this light.
bool | isAmbientLight ()
| Returns true if this is an AmbientLight, false if it is some other kind of light.
| setColor (VBase4 const color)
| Sets the basic color of the light.
| setPriority (int priority)
| Changes the relative importance of this light relative to the other lights that are applied simultaneously.
## Static Public Member Functions
static TypeHandle | getClassType ()

## Detailed Description

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.

## Member Function Documentation

PandaNode asNode | ( |  | ) |

int getClassPriority | ( |  | ) |

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from ReferenceCount.

Reimplemented in LightNode, AmbientLight, LightLensNode, DirectionalLight, PointLight, and Spotlight.

VBase4 const getColor | ( |  | ) |

Returns the basic color of the light.

int getPriority | ( |  | ) |

Returns the priority associated with this light.

See set_priority().

bool isAmbientLight | ( |  | ) |

Returns true if this is an AmbientLight, false if it is some other kind of light.

setColor | ( | VBase4 const | color | ) |

Sets the basic color of the light.

setPriority | ( | 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().

All Classes Namespaces Functions Variables Enumerations Enumerator Properties