public class AmbientLight extends Light
Ambient lights are unaffected by the surface normal, and are constant regardless of the model's location. The material's ambient color is multiplied by the ambient light color to get the final ambient color of an object.
Light.Typecolor, enabled, lastDistance, name| Constructor and Description |
|---|
AmbientLight() |
AmbientLight(ColorRGBA color) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeLastDistance(Spatial owner)
Used internally to compute the last distance value.
|
Light.Type |
getType()
Returns the light type
|
boolean |
intersectsBox(BoundingBox box,
TempVars vars)
Determines if the light intersects with the given bounding box.
|
boolean |
intersectsFrustum(Camera camera,
TempVars vars)
Determines if the light intersects with the given camera frustum.
|
boolean |
intersectsSphere(BoundingSphere sphere,
TempVars vars)
Determines if the light intersects with the given bounding sphere.
|
clone, getColor, getName, isEnabled, isFrustumCheckNeeded, isIntersectsFrustum, read, setColor, setEnabled, setFrustumCheckNeeded, setIntersectsFrustum, setName, writepublic AmbientLight()
public AmbientLight(ColorRGBA color)
public boolean intersectsBox(BoundingBox box, TempVars vars)
Light
For non-local lights, such as directional lights,
ambient lights, or point lights
without influence radius, this method should always return true.
intersectsBox in class Lightbox - The box to check intersection against.vars - TempVars in case it is needed.public boolean intersectsSphere(BoundingSphere sphere, TempVars vars)
Light
For non-local lights, such as directional lights,
ambient lights, or point lights
without influence radius, this method should always return true.
intersectsSphere in class Lightsphere - The sphere to check intersection against.vars - TempVars in case it is needed.public boolean intersectsFrustum(Camera camera, TempVars vars)
Lightdirectional lights,
ambient lights, or point lights
without influence radius, this method should always return true.intersectsFrustum in class Lightcamera - The camera frustum to check intersection against.vars - TempVars in case it is needed.public void computeLastDistance(Spatial owner)
LightcomputeLastDistance in class Lightowner - the Spatial whose distance is to be determinedpublic Light.Type getType()
LightgetType in class LightLight.Type