Package com.jme3.light
Class AmbientLight
java.lang.Object
com.jme3.light.Light
com.jme3.light.AmbientLight
An ambient light adds a constant color to the scene.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.light.Light
Light.Type
-
Field Summary
Fields inherited from class com.jme3.light.Light
color, enabled, lastDistance, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
computeLastDistance
(Spatial owner) Used internally to compute the last distance value.getType()
Returns the light typeboolean
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.Methods inherited from class com.jme3.light.Light
clone, getColor, getName, isEnabled, isFrustumCheckNeeded, isIntersectsFrustum, read, setColor, setEnabled, setFrustumCheckNeeded, setIntersectsFrustum, setName, write
-
Constructor Details
-
AmbientLight
public AmbientLight() -
AmbientLight
-
-
Method Details
-
intersectsBox
Description copied from class:Light
Determines if the light intersects with the given bounding box.For non-local lights, such as
directional lights
,ambient lights
, orpoint lights
without influence radius, this method should always return true.- Specified by:
intersectsBox
in classLight
- Parameters:
box
- The box to check intersection against.vars
- TempVars in case it is needed.- Returns:
- True if the light intersects the box, false otherwise.
-
intersectsSphere
Description copied from class:Light
Determines if the light intersects with the given bounding sphere.For non-local lights, such as
directional lights
,ambient lights
, orpoint lights
without influence radius, this method should always return true.- Specified by:
intersectsSphere
in classLight
- Parameters:
sphere
- The sphere to check intersection against.vars
- TempVars in case it is needed.- Returns:
- True if the light intersects the sphere, false otherwise.
-
intersectsFrustum
Description copied from class:Light
Determines if the light intersects with the given camera frustum. For non-local lights, such asdirectional lights
,ambient lights
, orpoint lights
without influence radius, this method should always return true.- Specified by:
intersectsFrustum
in classLight
- Parameters:
camera
- The camera frustum to check intersection against.vars
- TempVars in case it is needed.- Returns:
- True if the light intersects the frustum, false otherwise.
-
computeLastDistance
Description copied from class:Light
Used internally to compute the last distance value.- Specified by:
computeLastDistance
in classLight
- Parameters:
owner
- the Spatial whose distance is to be determined
-
getType
Description copied from class:Light
Returns the light type
-