Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLComponentGeometryNodeType

All Superinterfaces:
FrameStateListener, VRMLGeometryNodeType, VRMLNode, VRMLNodeType
All Known Implementing Classes:
BaseComponentGeometryNode, BaseIndexedGeometryNode, BaseIndexedTriangleGeometryNode, BaseTriangleGeometryNode

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.9 $
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.
 boolean requiresUnlitColor()
          Check to see if this geometry implementation type requires unlit color values to be set.
 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.
 void setUnlitColor(float[] color)
          Set the local colour override for this geometry.
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLGeometryNodeType
addLocalColorsListener, addTexCoordGenModeChanged, getNumSets, getTexCoordGenMode, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged
 
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

getComponents

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

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

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

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

Returns:
true The colors are per vertex

hasNormalPerVertex

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

Returns:
true The normals are per vertex

requiresUnlitColor

boolean requiresUnlitColor()
Check to see if this geometry implementation type requires unlit color values to be set. For the most part this will always return false, but some will need it (points and lines). This value should be constant for the geometry regardless of whether a Color component has been provided or not. It is up to the implementation to decide when to pass these values on to the underlying rendering structures or not.

Returns:
true if we need unlit colour information

setUnlitColor

void setUnlitColor(float[] color)
Set the local colour override for this geometry. Typically used to set the emissiveColor from the Material node into the geometry for the line and point-type geometries which are unlit in the X3D/VRML model.

Parameters:
color - The colour value to use

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium