Class AmbientLight
java.lang.Object
de.gurkenlabs.litiengine.graphics.ColorLayer
de.gurkenlabs.litiengine.graphics.AmbientLight
- All Implemented Interfaces:
IRenderable
This class represents the ambient light in an environment. It extends the ColorLayer class and provides methods to render light sources and
shadows.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAmbientLight(Environment environment, Color ambientColor) Constructor for the AmbientLight class. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclearSection(Graphics2D g, Rectangle2D section) Clears a section of the environment.protected voidrenderSection(Graphics2D g, Rectangle2D section) Renders a section of the environment with the ambient light and light sources.Methods inherited from class de.gurkenlabs.litiengine.graphics.ColorLayer
getColor, getEnvironment, render, setAlpha, setColor, updateSection
-
Field Details
-
DEFAULT_COLOR
The default color for the ambient light.
-
-
Constructor Details
-
AmbientLight
Constructor for the AmbientLight class.- Parameters:
environment- The environment to which this instance is assigned.ambientColor- The color of this instance.
-
-
Method Details
-
renderSection
Renders a section of the environment with the ambient light and light sources.- Specified by:
renderSectionin classColorLayer- Parameters:
g- The Graphics2D object to render on.section- The section of the environment to render.
-
clearSection
Clears a section of the environment.- Specified by:
clearSectionin classColorLayer- Parameters:
g- The Graphics2D object to clear on.section- The section of the environment to clear.
-