j3d.org Code

org.j3d.loaders.discreet
Class LightBlock

java.lang.Object
  extended by org.j3d.loaders.discreet.LightBlock

public class LightBlock
extends java.lang.Object

Representation of a single light and its paramaters needed for rendering.

Lights are described using the 0x4600 series of parameters. Not all of them are mapped here currently. A light is considered to be a directional light at all times, which may be narrowed into a spotlight.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Field Summary
static int AMBIENT_LIGHT
          Treat this as an ambient light
 float aspectRatio
          An aspect ratio setting for the light, allowing for non-circular visuals
 float attenuation
          The linear attentuation parameter of the light
 float bias
          The bias of the spotlight ray
 boolean castsShadows
          Flag indicating that this light will cast shadows
 float[] color
          The 3-component light colour value
 float[] direction
          The location or direction of the light, depending on whether it is a spotlight or directional light.
static int DIRECTIONAL_LIGHT
          Treat this as a directional light
 boolean enabled
          Is this light on or off right now.
 float falloffAngle
          The falloff angle outside the hotspot till it reaches 0
 float hotspotAngle
          The angle of effect for the spotlight
 float innerRange
          An inner range for the directional light
 float multiple
          A multiplier value for the standard light settings
 float outerRange
          An outer range for the directional light
 float rollAngle
          The roll angle of the light.
 boolean seeCone
          Flag indicating if a cone indicating visiblity should be shown
 int shadowMapSize
          If shadowed, the size of the map to create in pixels (square)
 float[] shadowParams
          If shadows are being case, the parameters.
static int SPOT_LIGHT
          Treat this as a spot light light
 float[] target
          If non-null, treat as a spotlight and this is the target location
 int type
          The light type to treat this as.
 
Constructor Summary
LightBlock()
          Create a new light block and set it up for a basic directional light.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIRECTIONAL_LIGHT

public static final int DIRECTIONAL_LIGHT
Treat this as a directional light

See Also:
Constant Field Values

SPOT_LIGHT

public static final int SPOT_LIGHT
Treat this as a spot light light

See Also:
Constant Field Values

AMBIENT_LIGHT

public static final int AMBIENT_LIGHT
Treat this as an ambient light

See Also:
Constant Field Values

type

public int type
The light type to treat this as.


enabled

public boolean enabled
Is this light on or off right now. Default to on.


color

public float[] color
The 3-component light colour value


direction

public float[] direction
The location or direction of the light, depending on whether it is a spotlight or directional light.


target

public float[] target
If non-null, treat as a spotlight and this is the target location


hotspotAngle

public float hotspotAngle
The angle of effect for the spotlight


falloffAngle

public float falloffAngle
The falloff angle outside the hotspot till it reaches 0


rollAngle

public float rollAngle
The roll angle of the light.


aspectRatio

public float aspectRatio
An aspect ratio setting for the light, allowing for non-circular visuals


bias

public float bias
The bias of the spotlight ray


innerRange

public float innerRange
An inner range for the directional light


outerRange

public float outerRange
An outer range for the directional light


multiple

public float multiple
A multiplier value for the standard light settings


attenuation

public float attenuation
The linear attentuation parameter of the light


seeCone

public boolean seeCone
Flag indicating if a cone indicating visiblity should be shown


castsShadows

public boolean castsShadows
Flag indicating that this light will cast shadows


shadowParams

public float[] shadowParams
If shadows are being case, the parameters.
shadowParams[0] is local shadow low bias.
shadowParams[1] is local shadow filter in the range 1 (low) to 10 (high).


shadowMapSize

public int shadowMapSize
If shadowed, the size of the map to create in pixels (square)

Constructor Detail

LightBlock

public LightBlock()
Create a new light block and set it up for a basic directional light.


j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org