262 Chapter 4 Scene Graphs
the lights affect. The lighting models supported by standard graphics APIs are a sim-
ple approximation to true lighting but are designed so that the lighting calculations
can be performed quickly. More realistic lighting is found in systems that are almost
never real time. The physical model aspects of lights and materials were discussed in
detail in Section 2.6.2. The discussion in this section is about the design choices for
representing lights.
The types of lights and their attributes are sufficiently numerous that many en-
gines provide multiple classes. Usually an engine will provide an abstract base class
for lights, and then derived classes such as an ambient light class, a directional light
class, a point light class, ...