Class OGLPolyline2D
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.geom2d.BasePolyline2D
org.web3d.vrml.renderer.ogl.nodes.geom2d.OGLPolyline2D
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLGeometryNodeType
,VRMLNodeType
,OGLGeometryNodeType
,OGLVRMLNode
OpenGL implementation of an Polyline2D
The point set directly maps to Aviatrix3D's LineArray class. When the coordinates change to a different length than the current set, it will notify the geometry listener to fetch the new information.
- Version:
- $Revision: 1.5 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.geom2d.BasePolyline2D
FIELD_LINE_SEGMENTS, numLineSegments, vfLineSegments
Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, STATIC_SCENE_GRAPH, vfMetadata, vrmlMajorVersion, vrmlMinorVersion
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new point set instance that contains no child nodes.OGLPolyline2D
(VRMLNodeType node) Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionorg.j3d.aviatrix3d.Geometry
Returns a OGL Geometry node that represents this piece of geometry.int
Get the number of texture coordinate sets contained by this nodeorg.j3d.aviatrix3d.SceneGraphObject
Get the Java3D scene graph object representation of this node.getTexCoordGenMode
(int setNum) Get the texture coordinate generation mode.void
Notification that the construction phase of this node has finished.Methods inherited from class org.web3d.vrml.renderer.common.nodes.geom2d.BasePolyline2D
addLocalColorsListener, addTexCoordGenModeChanged, getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, getPrimaryType, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, sendRoute, setLineSegments, setTextureCount, 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, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, 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.FrameStateListener
allEventsComplete
Methods inherited from interface org.web3d.vrml.nodes.VRMLGeometryNodeType
addLocalColorsListener, addTexCoordGenModeChanged, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, setTextureCount
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.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLPolyline2D
public OGLPolyline2D()Construct a new point set instance that contains no child nodes. -
OGLPolyline2D
Construct a new instance of this node based on the details from the given node. If the node is not the same type, an exception will be thrown.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- Incorrect Node Type
-
-
Method Details
-
getGeometry
public org.j3d.aviatrix3d.Geometry getGeometry()Description copied from interface:OGLGeometryNodeType
Returns a OGL Geometry node that represents this piece of geometry. If no geometry is available, then return null.- Specified by:
getGeometry
in interfaceOGLGeometryNodeType
- Returns:
- The geometry needed to represent this object
-
getNumSets
public int getNumSets()Get the number of texture coordinate sets contained by this node- Specified by:
getNumSets
in interfaceVRMLGeometryNodeType
- Overrides:
getNumSets
in classBasePolyline2D
- Returns:
- the number of texture coordinate sets
-
getTexCoordGenMode
Get the texture coordinate generation mode. NULL is returned if the texture coordinates are not generated.- Specified by:
getTexCoordGenMode
in interfaceVRMLGeometryNodeType
- Overrides:
getTexCoordGenMode
in classBasePolyline2D
- Parameters:
setNum
- The set which this tex gen mode refers- Returns:
- The mode or NULL
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Get the Java3D scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used.- Specified by:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The OGL representation.
-
setupFinished
public void setupFinished()Notification that the construction phase of this node has finished. If the node would like to do any internal processing, such as setting up geometry, then go for it now.- Specified by:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classAbstractNode
-