Top Description Fields Constructors Methods
com.sun.scenario.effect.light

public Class PointLight

extends Light
Class Inheritance
Known Direct Subclasses
com.sun.scenario.effect.light.SpotLight
Imports
com.sun.scenario.effect.Color4f

Represents a light source at a given position in 3D space.

Field Summary

Modifier and TypeField and Description
private float
x

private float
y

private float
z

Constructor Summary

AccessConstructor and Description
public
PointLight()

Constructs a new PointLight with default position (0,0,0) and color (Color4f.WHITE).

public
PointLight(float
the x coordinate of the light position
x
,
float
the y coordinate of the light position
y
,
float
the z coordinate of the light position
z
,
Color4f
the color of the light
color
)

Constructs a new PointLight with the given position and color.

pack-priv
PointLight(Light.Type
the type of the light (either POINT or SPOT)
type
,
float
the x coordinate of the light position
x
,
float
the y coordinate of the light position
y
,
float
the z coordinate of the light position
z
,
Color4f
the color of the light
color
)

Package-private constructor.

Method Summary

Modifier and TypeMethod and Description
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 float

Returns:

the x coordinate of the light position
getX
()

Returns the x coordinate of the light position.

public float

Returns:

the y coordinate of the light position
getY
()

Returns the y coordinate of the light position.

public float

Returns:

the z coordinate of the light position
getZ
()

Returns the z coordinate of the light position.

public void
setX(float
the x coordinate of the light position
x
)

Sets the x coordinate of the light position.

public void
setY(float
the y coordinate of the light position
y
)

Sets the y coordinate of the light position.

public void
setZ(float
the z coordinate of the light position
z
)

Sets the z coordinate of the light position.

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

Field Detail

xback to summary
private float x
yback to summary
private float y
zback to summary
private float z

Constructor Detail

PointLightback to summary
public PointLight()

Constructs a new PointLight with default position (0,0,0) and color (Color4f.WHITE).

PointLightback to summary
public PointLight(float x, float y, float z, Color4f color)

Constructs a new PointLight with the given position and color.

Parameters
x:float

the x coordinate of the light position

y:float

the y coordinate of the light position

z:float

the z coordinate of the light position

color:Color4f

the color of the light

Exceptions
IllegalArgumentException:
if color is null
PointLightback to summary
pack-priv PointLight(Light.Type type, float x, float y, float z, Color4f color)

Package-private constructor.

Parameters
type:Light.Type

the type of the light (either POINT or SPOT)

x:float

the x coordinate of the light position

y:float

the y coordinate of the light position

z:float

the z coordinate of the light position

color:Color4f

the color of the light

Exceptions
IllegalArgumentException:
if color is null

Method Detail

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
getXback to summary
public float getX()

Returns the x coordinate of the light position.

Returns:float

the x coordinate of the light position

getYback to summary
public float getY()

Returns the y coordinate of the light position.

Returns:float

the y coordinate of the light position

getZback to summary
public float getZ()

Returns the z coordinate of the light position.

Returns:float

the z coordinate of the light position

setXback to summary
public void setX(float x)

Sets the x coordinate of the light position.

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

the x coordinate of the light position

setYback to summary
public void setY(float y)

Sets the y coordinate of the light position.

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

the y coordinate of the light position

setZback to summary
public void setZ(float z)

Sets the z coordinate of the light position.

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

the z coordinate of the light position