JHeightMap
Class JLight

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Group
              extended by javax.media.j3d.BranchGroup
                  extended by JHeightMap.JLight

public class JLight
extends javax.media.j3d.BranchGroup

Class JLight represents lights in the scene. Lights are the ambient, directional, point and spot light.

Author:
Martin Kinkor

Field Summary
static int AMBIENT_LIGHT
           
static int DIRECTIONAL_LIGHT
           
static int POINT_LIGHT
           
static int SPOT_LIGHT
           
 
Fields inherited from class javax.media.j3d.BranchGroup
ALLOW_DETACH
 
Fields inherited from class javax.media.j3d.Group
ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE, ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
JLight()
          Constructor creates the default light (ambient light).
JLight(int statusLight)
          Constructor creates the light.
JLight(int statusLight, javax.vecmath.Color3f color)
          Constructor creates the light.
 
Method Summary
 void addChilder()
          The method puts the generated light in the graph scene.
 javax.media.j3d.Light getLight()
          The method gets light.
 void removeLight()
          The method removes light.
 void setAttenuation(javax.vecmath.Point3f attenuation)
          The method sets attenuation light (point light and spot light).
 void setCapabAttenuation()
          The method sets capability attenuation light.
 void setCapabColor()
          The method sets capability color light.
 void setCapabConcentration()
          The method sets capability concentration light.
 void setCapabDirect()
          The method sets capability direct light.
 void setCapabPosition()
          The method sets capability position light.
 void setCapabSpreadAngle()
          The method sets capability spread angle light.
 void setColor(javax.vecmath.Color3f color)
          The method sets color of light.
 void setConcentration(float concentration)
          The method sets concentration light (spot light).
 void setDirect(javax.vecmath.Vector3f direct)
          The method sets direct light (Direct light and spot light).
 void setEnable(java.lang.Boolean onLight)
          The method sets enable light.
 void setInfluencingBound(javax.media.j3d.Bounds bounds)
          The method sets influencing bound.
 void setPosition(javax.vecmath.Point3f position)
          The method sets position light (point light and spot light).
 void setSpreadAngle(float spreadAngle)
          The method sets spread angle light (Spot light).
 
Methods inherited from class javax.media.j3d.BranchGroup
cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, pickClosest
 
Methods inherited from class javax.media.j3d.Group
addChild, getAllChildren, getAlternateCollisionTarget, getCollisionBounds, getChild, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setCollisionBounds, setChild
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AMBIENT_LIGHT

public static final int AMBIENT_LIGHT
See Also:
Constant Field Values

DIRECTIONAL_LIGHT

public static final int DIRECTIONAL_LIGHT
See Also:
Constant Field Values

SPOT_LIGHT

public static final int SPOT_LIGHT
See Also:
Constant Field Values

POINT_LIGHT

public static final int POINT_LIGHT
See Also:
Constant Field Values
Constructor Detail

JLight

public JLight()
Constructor creates the default light (ambient light).


JLight

public JLight(int statusLight)
Constructor creates the light.

Parameters:
statusLight - The value determined what light is created.

JLight

public JLight(int statusLight,
              javax.vecmath.Color3f color)
Constructor creates the light.

Parameters:
statusLight - The value determined by what light is created
color - Color light.
Method Detail

addChilder

public void addChilder()
The method puts the generated light in the graph scene.


setInfluencingBound

public void setInfluencingBound(javax.media.j3d.Bounds bounds)
The method sets influencing bound.

Parameters:
bounds - Influencing bound

setColor

public void setColor(javax.vecmath.Color3f color)
The method sets color of light.

Parameters:
color - Color light.

setEnable

public void setEnable(java.lang.Boolean onLight)
The method sets enable light.

Parameters:
onLight - Enable light.

setDirect

public void setDirect(javax.vecmath.Vector3f direct)
The method sets direct light (Direct light and spot light).

Parameters:
direct - Direct light

setPosition

public void setPosition(javax.vecmath.Point3f position)
The method sets position light (point light and spot light).

Parameters:
position - Position light.

setAttenuation

public void setAttenuation(javax.vecmath.Point3f attenuation)
The method sets attenuation light (point light and spot light).

Parameters:
attenuation - Attenuation light

setSpreadAngle

public void setSpreadAngle(float spreadAngle)
The method sets spread angle light (Spot light).

Parameters:
spreadAngle - Spread angle light

setConcentration

public void setConcentration(float concentration)
The method sets concentration light (spot light).

Parameters:
concentration - Concentration light.

setCapabColor

public void setCapabColor()
The method sets capability color light.


setCapabDirect

public void setCapabDirect()
The method sets capability direct light.


setCapabPosition

public void setCapabPosition()
The method sets capability position light.


setCapabAttenuation

public void setCapabAttenuation()
The method sets capability attenuation light.


setCapabSpreadAngle

public void setCapabSpreadAngle()
The method sets capability spread angle light.


setCapabConcentration

public void setCapabConcentration()
The method sets capability concentration light.


getLight

public javax.media.j3d.Light getLight()
The method gets light.

Returns:
Light

removeLight

public void removeLight()
The method removes light.