APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.scenario.effect.light

public Class DistantLight

extends Light
Class Inheritance
Imports
com.sun.scenario.effect.Color4f

Represents a distant light source.

Field Summary

Modifier and TypeField and Description
private float
private float

Constructor Summary

AccessConstructor and Description
public
DistantLight()

Constructs a new DistantLight with default azimuth (0.0), elevation (0.0), and color (Color4f.WHITE).

public
DistantLight(float
the azimuth of the light, in degrees
azimuth
,
float
the elevation of the light, in degrees
elevation
,
Color4f
the color of the light
color
)

Constructs a new DistantLight with the given azimuth, elevation, and color.

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the azimuth of the light, in degrees
getAzimuth
()

Returns the azimuth of the light.

public float

Returns:

the elevation of the light, in degrees
getElevation
()

Returns the elevation of the light.

public float[]
getNormalizedLightPosition()

Implements abstract com.sun.scenario.effect.light.Light.getNormalizedLightPosition.

Returns a float array containing the normalized (x,y,z) position of this light source.

public void
setAzimuth(float
the azimuth of the light, in degrees
azimuth
)

Sets the azimuth of the light.

public void
setElevation(float
the elevation of the light, in degrees
elevation
)

Sets the elevation of the light.

Inherited from com.sun.scenario.effect.light.Light:
getColorgetTypesetColor

Field Detail

azimuthback to summary
private float azimuth
elevationback to summary
private float elevation

Constructor Detail

DistantLightback to summary
public DistantLight()

Constructs a new DistantLight with default azimuth (0.0), elevation (0.0), and color (Color4f.WHITE).

DistantLightback to summary
public DistantLight(float azimuth, float elevation, Color4f color)

Constructs a new DistantLight with the given azimuth, elevation, and color.

Parameters
azimuth:float

the azimuth of the light, in degrees

elevation:float

the elevation of the light, in degrees

color:Color4f

the color of the light

Exceptions
IllegalArgumentException:
if color is null

Method Detail

getAzimuthback to summary
public float getAzimuth()

Returns the azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.

Returns:float

the azimuth of the light, in degrees

getElevationback to summary
public float getElevation()

Returns the elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.

Returns:float

the elevation of the light, in degrees

getNormalizedLightPositionback to summary
public float[] getNormalizedLightPosition()

Implements abstract com.sun.scenario.effect.light.Light.getNormalizedLightPosition.

Doc from com.sun.scenario.effect.light.Light.getNormalizedLightPosition.

Returns a float array containing the normalized (x,y,z) position of this light source.

Annotations
@Override
setAzimuthback to summary
public void setAzimuth(float azimuth)

Sets the azimuth of the light. The azimuth is the direction angle for the light source on the XY plane, in degrees.

      Min: n/a
      Max: n/a
  Default: 0.0
 Identity: n/a
Parameters
azimuth:float

the azimuth of the light, in degrees

setElevationback to summary
public void setElevation(float elevation)

Sets the elevation of the light. The elevation is the direction angle for the light source on the YZ plane, in degrees.

      Min: n/a
      Max: n/a
  Default: 0.0
 Identity: n/a
Parameters
elevation:float

the elevation of the light, in degrees