|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseLightNode
Abstract common implementation of a light.
| Field Summary | |
protected static int |
FIELD_AMBIENT_INTENSITY
ambientIntensity field fndex |
protected static int |
FIELD_COLOR
color field index |
protected static int |
FIELD_INTENSITY
intensity field index |
protected static int |
FIELD_ON
on field index |
protected static int |
LAST_LIGHT_INDEX
Value of the last index in use |
protected float |
vfAmbientIntensity
exposedField SFFloat ambientIntensity 0 |
protected float[] |
vfColor
exposedField SFColor color 1 1 1 |
protected float |
vfIntensity
exposedField SFFloat intensity 1 |
protected boolean |
vfOn
exposedField SFBool on TRUE |
| Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
BAD_NODE_MSG, errorReporter, FIELD_METADATA, fieldData, hasChanged, INIT_ONLY_WRITE_MSG, inSetup, isDEF, isStatic, LAST_NODE_INDEX, METADATA_NODE_MSG, METADATA_PROTO_MSG, nodeName, pMetadata, refCount, stateManager, vfMetadata, vrmlMajorVersion, vrmlMinorVersion |
| Constructor Summary | |
protected |
BaseLightNode(java.lang.String name)
Construct a new default instance of this class. |
| Method Summary | |
protected void |
copy(VRMLLightNodeType node)
Set the fields of the light node that has the fields set based on the fields of the passed in node. |
float |
getAmbientIntensity()
Accessor method to get current value of field ambientIntensity, default value is 0 |
float[] |
getColor()
Accessor method to get current value of field color, default value is 1 1 1 |
VRMLFieldData |
getFieldValue(int index)
Get the value of a field. |
float |
getIntensity()
Accessor method to get current value of field Intensity, default value is 1 |
boolean |
getOn()
Accessor method to get current value of field On. |
int |
getPrimaryType()
Get the primary type of this node. |
void |
sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Send a routed value from this node to the given destination node. |
void |
setAmbientIntensity(float newAmbientIntensity)
Accessor method to get current value of field ambientIntensity |
void |
setColor(float[] newColor)
Accessor method to get current value of field color |
void |
setIntensity(float newIntensity)
Accessor method to get current value of field Intensity |
void |
setOn(boolean newOn)
Accessor method to get current value of field On |
void |
setValue(int index,
boolean value)
Set the value of the field at the given index as an boolean. |
void |
setValue(int index,
float value)
Set the value of the field at the given index as a float. |
void |
setValue(int index,
float[] value,
int numValid)
Set the value of the field at the given index as an array of floats. |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, fireFieldChanged, getMetadataObject, getNodeFieldIndices, getRefCount, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setupFinished, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, updateRefCount |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType |
addNodeListener, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, setupFinished, 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, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion |
| Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener |
allEventsComplete |
| Field Detail |
protected static final int FIELD_AMBIENT_INTENSITY
protected static final int FIELD_COLOR
protected static final int FIELD_INTENSITY
protected static final int FIELD_ON
protected static final int LAST_LIGHT_INDEX
protected float vfAmbientIntensity
protected float[] vfColor
protected float vfIntensity
protected boolean vfOn
| Constructor Detail |
protected BaseLightNode(java.lang.String name)
name - The name of the type of node| Method Detail |
protected void copy(VRMLLightNodeType node)
node - The light node to copy info frompublic float getAmbientIntensity()
getAmbientIntensity in interface VRMLLightNodeTypepublic float[] getColor()
getColor in interface VRMLLightNodeTypepublic float getIntensity()
getIntensity in interface VRMLLightNodeTypepublic boolean getOn()
getOn in interface VRMLLightNodeType
public void setAmbientIntensity(float newAmbientIntensity)
throws InvalidFieldValueException
setAmbientIntensity in interface VRMLLightNodeTypenewAmbientIntensity - The new value
InvalidFieldValueException
public void setColor(float[] newColor)
throws InvalidFieldValueException
setColor in interface VRMLLightNodeTypenewColor - The new value
InvalidFieldValueException
public void setIntensity(float newIntensity)
throws InvalidFieldValueException
setIntensity in interface VRMLLightNodeTypenewIntensity - The new value
InvalidFieldValueExceptionpublic void setOn(boolean newOn)
setOn in interface VRMLLightNodeTypenewOn - The new valuepublic int getPrimaryType()
getPrimaryType in interface VRMLNode
public VRMLFieldData getFieldValue(int index)
throws InvalidFieldException
getFieldValue in interface VRMLNodeTypegetFieldValue in class AbstractNodeindex - The index of the field to change.
InvalidFieldException - The field index is not known
public void sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
sendRoute in interface VRMLNodeTypesendRoute in class AbstractNodetime - The time that this route occurred (not necessarily epoch
time. Should be treated as a relative value only)srcIndex - The index of the field in this node that the value
should be sent fromdestNode - The node reference that we will be sending the value todestIndex - The index of the field in the destination node that
the value should be sent to.
public void setValue(int index,
boolean value)
throws InvalidFieldException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
public void setValue(int index,
float value)
throws InvalidFieldException,
InvalidFieldValueException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is out of range
for the field type.
public void setValue(int index,
float[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException
setValue in interface VRMLNodeTypesetValue in class AbstractNodeindex - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is out of range
for the field type.
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||