Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLComponentGeometryNodeType

All Superinterfaces:
FrameStateListener, VRMLGeometryNodeType, VRMLNode, VRMLNodeType
All Known Implementing Classes:
BaseComponentGeometryNode, J3DIndexedGeometry

public interface VRMLComponentGeometryNodeType
extends VRMLGeometryNodeType

An interface for accessing the geometry data of an IndexedGeometry class.

These objects might be coord, color, normal, texCoord. All will descend from VRMLGeometricPropertyType or VRMLProtoInstance. There is no direct provision through this interface to clear an individual component node. That must be done directly through the lower level setValue() methods.

Version:
$Revision: 1.8 $
Author:
Alan Hudson, Justin Couch

Method Summary
 VRMLNodeType[] getComponents()
          Get the components that compose a geometry object.
 boolean hasColorPerVertex()
          Check to see if the colors are per vertex or per face.
 boolean hasNormalPerVertex()
          Check to see if the normals are per vertex or per face.
 void setComponent(VRMLNodeType comp)
          Set a component that composes part of a geometry object.
 void setComponents(VRMLNodeType[] comps)
          Set the components the compose a geometry object.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLGeometryNodeType
addLocalColorsListener, addTexCoordGenModeChanged, getNumSets, getTexCoordGenMode, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType
addNodeListener, getFieldValue, getMetadataObject, getRefCount, 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

getComponents

public VRMLNodeType[] getComponents()
Get the components that compose a geometry object.

This method will return either VRMLGeometricPropertyNodeType or VRMLProtoInstance. With a proto you can use getImplementationNode to get a node conforming to the VRMLGeometricPropertyNodeType interface.

If there are no components then a zero length array will be returned.

Returns:
VRMLNodeType[] The components

setComponents

public void setComponents(VRMLNodeType[] comps)
                   throws InvalidFieldValueException
Set the components the compose a geometry object. To clear all the components, pass a null parameter.

Parameters:
comps - An array of geometric properties
Throws:
InvalidFieldValueException - The node is not a known or supported field for this node

setComponent

public void setComponent(VRMLNodeType comp)
                  throws InvalidFieldValueException
Set a component that composes part of a geometry object.

Parameters:
comp - A geometric property
Throws:
InvalidFieldValueException - The node is not a known or supported field for this node

hasColorPerVertex

public boolean hasColorPerVertex()
Check to see if the colors are per vertex or per face.

Returns:
true The colors are per vertex

hasNormalPerVertex

public boolean hasNormalPerVertex()
Check to see if the normals are per vertex or per face.

Returns:
true The normals are per vertex

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium