Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLLightNodeType

All Superinterfaces:
FrameStateListener, VRMLChildNodeType, VRMLNode, VRMLNodeType, VRMLWorldRootChildNodeType
All Known Subinterfaces:
OGLLightNodeType
All Known Implementing Classes:
BaseLightNode

public interface VRMLLightNodeType
extends VRMLChildNodeType

An abstract representation of any form of light node.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Method Summary
 float getAmbientIntensity()
          Get the current value of field ambientIntensity.
 float[] getColor()
          Get the current value of field color.
 boolean getGlobal()
          Accessor method to get current value of field global.
 float getIntensity()
          Get the current value of field Intensity.
 boolean getOn()
          Get the current value of field On.
 void setAmbientIntensity(float newAmbientIntensity)
          Set the new value of the ambientIntensity field.
 void setColor(float[] newColor)
          Set the new value of the color field.
 void setGlobal(boolean global)
          Set the current value of the global field.
 void setIntensity(float newIntensity)
          Get the current value of field Intensity
 void setOn(boolean newOn)
          Set the value of field On.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
 
Methods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion
 
Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
 

Method Detail

getAmbientIntensity

float getAmbientIntensity()
Get the current value of field ambientIntensity. Default value is 0.

Returns:
The current value of ambientIntensity

getColor

float[] getColor()
Get the current value of field color. Default value is 1 1 1

Returns:
The current value of color

getIntensity

float getIntensity()
Get the current value of field Intensity. Default value is 1.

Returns:
the current value of Intensity

getOn

boolean getOn()
Get the current value of field On. Default value is true.

Returns:
the current value of On

getGlobal

boolean getGlobal()
Accessor method to get current value of field global. Default value is false if the node is from 3.1 onwards. The field does not exist in the 3.0 or 2.0 specifications, so we return the default for the particular light type and its spec-defined behaviour.

Returns:
the current value of the global field

setAmbientIntensity

void setAmbientIntensity(float newAmbientIntensity)
                         throws InvalidFieldValueException
Set the new value of the ambientIntensity field.

Parameters:
newAmbientIntensity - A value between 0 and 1
Throws:
InvalidFieldValueException - The value was out of the valid range

setColor

void setColor(float[] newColor)
              throws InvalidFieldValueException
Set the new value of the color field.

Parameters:
newColor - The new value. Each component must be between 0 and 1
Throws:
InvalidFieldValueException - The value was out of the valid range

setIntensity

void setIntensity(float newIntensity)
                  throws InvalidFieldValueException
Get the current value of field Intensity

Parameters:
newIntensity - A value between 0 and 1
Throws:
InvalidFieldValueException - The value was out of the valid range

setOn

void setOn(boolean newOn)
Set the value of field On.

Parameters:
newOn - true will turn the light on, false to turn it off

setGlobal

void setGlobal(boolean global)
               throws InvalidFieldException
Set the current value of the global field.

Parameters:
global - true if this should have global effect, false for scoped
Throws:
InvalidFieldException - Called on a node that belongs to VRML or X3D 3.0.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium