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

public abstract Class Light

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.scenario.effect.light.PointLight, com.sun.scenario.effect.light.DistantLight
Imports
com.sun.scenario.effect.Color4f

The abstract base class for all light implementations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Light.Type

The light type.

Field Summary

Modifier and TypeField and Description
private Color4f
private final Light.Type

Constructor Summary

AccessConstructor and Description
pack-priv
Light(Light.Type
the type of the light
type
)

Package-private constructor.

pack-priv
Light(Light.Type
the type of the light
type
,
Color4f
the color of the light
color
)

Package-private constructor.

Method Summary

Modifier and TypeMethod and Description
public Color4f

Returns:

the light color
getColor
()

Returns the light color.

public abstract float[]

Returns:

the normalized position of this light source
getNormalizedLightPosition
()

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

public Light.Type

Returns:

the light type
getType
()

Returns the light Type, either DISTANT, POINT, or SPOT.

public void
setColor(Color4f
the light color
color
)

Sets the light color.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorback to summary
private Color4f color
typeback to summary
private final Light.Type type

Constructor Detail

Lightback to summary
pack-priv Light(Light.Type type)

Package-private constructor.

Parameters
type:Light.Type

the type of the light

Exceptions
IllegalArgumentException:
if color is null
Lightback to summary
pack-priv Light(Light.Type type, Color4f color)

Package-private constructor.

Parameters
type:Light.Type

the type of the light

color:Color4f

the color of the light

Exceptions
IllegalArgumentException:
if color is null

Method Detail

getColorback to summary
public Color4f getColor()

Returns the light color.

Returns:Color4f

the light color

getNormalizedLightPositionback to summary
public abstract float[] getNormalizedLightPosition()

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

Returns:float[]

the normalized position of this light source

getTypeback to summary
public Light.Type getType()

Returns the light Type, either DISTANT, POINT, or SPOT.

Returns:Light.Type

the light type

setColorback to summary
public void setColor(Color4f color)

Sets the light color.

      Min: n/a
      Max: n/a
  Default: Color4f.WHITE
 Identity: n/a
Parameters
color:Color4f

the light color

Exceptions
IllegalArgumentException:
if color is null
com.sun.scenario.effect.light back to summary

public final Enum Light.Type

extends Enum<Light.Type>
Class Inheritance

The light type.

Field Summary

Modifier and TypeField and Description
public static final Light.Type
DISTANT

Light is a DistantLight.

public static final Light.Type
POINT

Light is a PointLight.

public static final Light.Type
SPOT

Light is a SpotLight.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static Light.Type
public static Light.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DISTANTback to summary
public static final Light.Type DISTANT

Light is a DistantLight.

POINTback to summary
public static final Light.Type POINT

Light is a PointLight.

SPOTback to summary
public static final Light.Type SPOT

Light is a SpotLight.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static Light.Type valueOf(String name)
valuesback to summary
public static Light.Type[] values()