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.Type
color, 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, write
public 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 Light
box
- 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 Light
sphere
- The sphere to check intersection against.vars
- TempVars in case it is needed.public boolean intersectsFrustum(Camera camera, TempVars vars)
Light
directional lights
,
ambient lights
, or point lights
without influence radius, this method should always return true.intersectsFrustum
in class Light
camera
- The camera frustum to check intersection against.vars
- TempVars in case it is needed.public void computeLastDistance(Spatial owner)
Light
computeLastDistance
in class Light
owner
- the Spatial whose distance is to be determinedpublic Light.Type getType()
Light
getType
in class Light
Light.Type