|
Xj3D 2.0 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.BaseComponentGeometryNode
org.web3d.vrml.renderer.common.nodes.BaseIndexedGeometryNode
public abstract class BaseIndexedGeometryNode
An abstract implementation of any node that uses component nodes to provide coordinate, normal and texture information.
This includes normal and texture indexes. These may not be needed by some implementations like IndexedLineSet. Just don't define the fields in the static setup.
| Field Summary | |
|---|---|
protected static java.lang.String |
COLOR_NODE_MSG
Message for when the node in setValue() is not a Color |
protected static java.lang.String |
COLOR_PROTO_MSG
Message for when the proto is not a Color |
protected static java.lang.String |
COORD_NODE_MSG
Message for when the node in setValue() is not a Coord |
protected static java.lang.String |
COORD_PROTO_MSG
Message for when the proto is not a Coord |
protected static int |
FIELD_COLORINDEX
Index of the colorIndex MFInt32 field |
protected static int |
FIELD_COORDINDEX
Index of the coordIndex SFInt32 field |
protected static int |
FIELD_NORMALINDEX
Index of the normalIndex SFInt32 field |
protected static int |
FIELD_SET_COLORINDEX
Index of the set_colorIndex MFInt32 eventIn |
protected static int |
FIELD_SET_COORDINDEX
Index of the set_coordIndex SFInt32 eventIn |
protected static int |
FIELD_SET_NORMALINDEX
Index of the set_normalIndex SFInt32 eventIn |
protected static int |
FIELD_SET_TEXCOORDINDEX
Index of the set_texCoordIndex SFInt32 field |
protected static int |
FIELD_TEXCOORDINDEX
Index of the texCoordIndex SFInt32 field |
protected static int |
LAST_INDEXEDGEOMETRY_INDEX
The last field index used by this class |
protected static java.lang.String |
NORMAL_NODE_MSG
Message for when the node in setValue() is not a Normal |
protected static java.lang.String |
NORMAL_PROTO_MSG
Message for when the proto is not a Normal |
protected int |
numColorIndex
Number of valid values in vfColorIndex |
protected int |
numCoordIndex
Number of valid values in vfColorIndex |
protected int |
numNormalIndex
Number of valid values in vfColorIndex |
protected int |
numTexCoordIndex
Number of valid values in vfColorIndex |
protected static java.lang.String |
TEXCOORD_NODE_MSG
Message for when the node in setValue() is not a TexCoord |
protected static java.lang.String |
TEXCOORD_PROTO_MSG
Message for when the proto is not a TexCoord |
protected int[] |
vfColorIndex
field MFInt32 colorIndex |
protected int[] |
vfCoordIndex
field MFInt32 coordIndex |
protected int[] |
vfNormalIndex
field MFInt32 normalIndex |
protected int[] |
vfTexCoordIndex
field MFInt32 texCoordIndex |
| Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
|---|
errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, INIT_ONLY_WRITE_MSG, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, METADATA_NODE_MSG, METADATA_PROTO_MSG, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, vfMetadata, vrmlMajorVersion, vrmlMinorVersion |
| Constructor Summary | |
|---|---|
protected |
BaseIndexedGeometryNode(java.lang.String name)
Construct a default instance of this class with the bind flag set to false and no time information set (effective value of zero). |
| Method Summary | |
|---|---|
protected void |
copy(VRMLComponentGeometryNodeType node)
Set the fields of the binadble node that has the fields set based on the fields of the passed in node. |
VRMLFieldData |
getFieldValue(int index)
Get the value of a field. |
void |
sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Send a routed value from this node to the given destination node. |
protected void |
setColorIndex(int[] value,
int numValid)
Set the colorIndex field. |
protected void |
setCoordIndex(int[] value,
int numValid)
Set the coordIndex field. |
protected void |
setNormalIndex(int[] value,
int numValid)
Set the normalIndex field. |
protected void |
setTexCoordIndex(int[] value,
int numValid)
Set the texCoordIndex field. |
void |
setValue(int index,
int[] value,
int numValid)
Set the value of the field at the given index as an array of integers. |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseComponentGeometryNode |
|---|
addLocalColorsListener, addTexCoordGenModeChanged, fireLocalColorsChanged, getComponents, getNumSets, getPrimaryType, getTexCoordGenMode, hasColorPerVertex, hasLocalColorAlpha, hasLocalColors, hasNormalPerVertex, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, requiresUnlitColor, setColorNode, setComponent, setComponents, setCoordinateNode, setFogCoordinateNode, setNormalNode, setTexCoordNode, setUnlitColor, setupFinished, setValue, setValue |
| Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode |
|---|
addNodeListener, allEventsComplete, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, updateRefCount, updateRefs |
| 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, clearRemovedLayerIds, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setFrameStateManager, setMetadataObject, 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 |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeComponentListener |
|---|
fieldChanged |
| Field Detail |
|---|
protected static final int FIELD_COLORINDEX
protected static final int FIELD_SET_COLORINDEX
protected static final int FIELD_COORDINDEX
protected static final int FIELD_SET_COORDINDEX
protected static final int FIELD_TEXCOORDINDEX
protected static final int FIELD_SET_TEXCOORDINDEX
protected static final int FIELD_NORMALINDEX
protected static final int FIELD_SET_NORMALINDEX
protected static final int LAST_INDEXEDGEOMETRY_INDEX
protected static final java.lang.String COORD_PROTO_MSG
protected static final java.lang.String COORD_NODE_MSG
protected static final java.lang.String COLOR_PROTO_MSG
protected static final java.lang.String COLOR_NODE_MSG
protected static final java.lang.String NORMAL_PROTO_MSG
protected static final java.lang.String NORMAL_NODE_MSG
protected static final java.lang.String TEXCOORD_PROTO_MSG
protected static final java.lang.String TEXCOORD_NODE_MSG
protected int[] vfColorIndex
protected int numColorIndex
protected int[] vfCoordIndex
protected int numCoordIndex
protected int[] vfNormalIndex
protected int numNormalIndex
protected int[] vfTexCoordIndex
protected int numTexCoordIndex
| Constructor Detail |
|---|
protected BaseIndexedGeometryNode(java.lang.String name)
name - The name of the type of node| Method Detail |
|---|
protected void copy(VRMLComponentGeometryNodeType node)
copy in class BaseComponentGeometryNodenode - The bindable node to copy info from
public VRMLFieldData getFieldValue(int index)
throws InvalidFieldException
getFieldValue in interface VRMLNodeTypegetFieldValue in class BaseComponentGeometryNodeindex - 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 BaseComponentGeometryNodetime - 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,
int[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
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 index does not match a known field
InvalidFieldValueException - The value provided is out of range
for the field type.
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
protected void setCoordIndex(int[] value,
int numValid)
value - The list of index values to usenumValid - The number of valid indices in the array
protected void setNormalIndex(int[] value,
int numValid)
value - The list of index values to usenumValid - The number of valid indices in the array
protected void setColorIndex(int[] value,
int numValid)
value - The list of index values to usenumValid - The number of valid indices in the array
protected void setTexCoordIndex(int[] value,
int numValid)
value - The list of index values to usenumValid - The number of valid indices in the array
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||