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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeLastDistance(Spatial owner) Used internally to compute the last distance value.getType()Returns the light typebooleanintersectsBox(BoundingBox box, TempVars vars) Determines if the light intersects with the given bounding box.booleanintersectsFrustum(Camera camera, TempVars vars) Determines if the light intersects with the given camera frustum.booleanintersectsSphere(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:LightDetermines if the light intersects with the given bounding box.For non-local lights, such as
directional lights,ambient lights, orpoint lightswithout influence radius, this method should always return true.- Specified by:
intersectsBoxin 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:LightDetermines if the light intersects with the given bounding sphere.For non-local lights, such as
directional lights,ambient lights, orpoint lightswithout influence radius, this method should always return true.- Specified by:
intersectsSpherein 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:LightDetermines if the light intersects with the given camera frustum. For non-local lights, such asdirectional lights,ambient lights, orpoint lightswithout influence radius, this method should always return true.- Specified by:
intersectsFrustumin 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:LightUsed internally to compute the last distance value.- Specified by:
computeLastDistancein classLight- Parameters:
owner- the Spatial whose distance is to be determined
-
getType
Description copied from class:LightReturns the light type
-