Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLTextureCoordinateNodeType

All Superinterfaces:
FrameStateListener, VRMLGeometricPropertyNodeType, VRMLNode, VRMLNodeType

public interface VRMLTextureCoordinateNodeType
extends VRMLGeometricPropertyNodeType

Specifies a set of 2D texture coordinates. May contain multiple texture coordinate sets.

Version:
$Revision: 1.10 $
Author:
Alan Hudson

Method Summary
 int getNumSets()
          Get the number of texture coordinate sets contained by this node
 int getNumTextureComponents()
          Get the number of components defined for this texture type.
 void getPoint(int setNum, float[] point)
          Accessor method to get current value of field point.
 int getSize(int setNum)
          Get the size of the specified set.
 java.lang.String getTexCoordGenMode(int setNum)
          Get the texture coordinate generation mode.
 int isShared(int index)
          Determine if this index is shared via DEF/USE inside this set
 void setPoint(int setNum, float[] newPoint, int numValid)
          Accessor method to set a new value for field attribute point.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLGeometricPropertyNodeType
addComponentListener, removeComponentListener
 
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

getNumTextureComponents

int getNumTextureComponents()
Get the number of components defined for this texture type. SHould be one of 2, 3 or 4 for 2D, 3D or time-driven textures.

Returns:
one of 2, 3 or 4

getNumSets

int getNumSets()
Get the number of texture coordinate sets contained by this node

Returns:
the number of texture coordinate sets

getSize

int getSize(int setNum)
Get the size of the specified set. The size is the total size of the array, taking into account the number of texture components in use.

Parameters:
setNum - The set to size

setPoint

void setPoint(int setNum,
              float[] newPoint,
              int numValid)
Accessor method to set a new value for field attribute point. Attempts to set nodes > numSets will throw an exception.

Parameters:
setNum - The set which this point belongs.
newPoint - New value for the point field
numValid - The number of valid values to copy from the array
Throws:
java.lang.ArrayIndexOutOfBoundsException

getPoint

void getPoint(int setNum,
              float[] point)
Accessor method to get current value of field point.

Parameters:
setNum - The set which this point belongs.
point - The array to initialize with the point value

isShared

int isShared(int index)
Determine if this index is shared via DEF/USE inside this set

Parameters:
index - The index to check
Returns:
The index if not shared or the original index DEFed

getTexCoordGenMode

java.lang.String getTexCoordGenMode(int setNum)
Get the texture coordinate generation mode. NULL is returned if the texture coordinates are not generated.

Parameters:
setNum - The set which this tex gen mode refers
Returns:
The mode or NULL

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium