Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLCoordinateNodeType

All Superinterfaces:
FrameStateListener, VRMLGeometricPropertyNodeType, VRMLNode, VRMLNodeType

public interface VRMLCoordinateNodeType
extends VRMLGeometricPropertyNodeType

Nodes which have coordinate information

Version:
$Revision: 1.7 $
Author:
Alan Hudson

Method Summary
 int getNumPoints()
          Get the number of items in the point array now.
 void getPoint(float[] points)
          Get current value of field point.
 float[] getPointRef()
          Get the internal reference to the raw or converted point array.
 void setPoint(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

setPoint

void setPoint(float[] newPoint,
              int numValid)
Accessor method to set a new value for field attribute point. point is an array of Vec3f doubles

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

getNumPoints

int getNumPoints()
Get the number of items in the point array now. The number returned is the total number of values in the flat array. This will allow the caller to construct the correct size array for the getPoint() call.

Returns:
The number of values in the array

getPoint

void getPoint(float[] points)
Get current value of field point. Point is an array of Vec3f float triples. Don't call if there are no points in the array.

Parameters:
points - The array to copy the values into

getPointRef

float[] getPointRef()
Get the internal reference to the raw or converted point array. Some of the concrete node types end up needing to convert the point values from double precision to single precision or needing to make geo-spatial projections. This is a reference to the post-processed data that may be directly used for rendering. In the case of CoordinateDouble, then the array may be a set of down-cast values to floats.

Note that the array may well be longer than the actual number of valid coordinates. Use getNumPoints() to determine the number of valid entries.

Returns:
An array of float[] values for rendering process

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium