Class OGLText
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.text.BaseText
org.web3d.vrml.renderer.ogl.nodes.text.OGLText
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLGeometryNodeType
,VRMLNodeType
,VRMLTextNodeType
,OGLGeometryNodeType
,OGLVRMLNode
public class OGLText
extends BaseText
implements OGLGeometryNodeType, org.j3d.aviatrix3d.NodeUpdateListener
NoRender implementation of a Text
- Version:
- $Revision: 1.8 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.text.BaseText
FIELD_FONTSTYLE, FIELD_LENGTH, FIELD_MAXEXTENT, FIELD_SOLID, FIELD_STRING, imgHeight, imgWidth, LAST_TEXT_INDEX, linePixelHeight, linePixelSpacing, NUM_FIELDS, numLength, numString, pFontStyle, stringTextLayoutArray, texturedImage, usedPixelHeight, usedPixelWidth, vfFontStyle, vfLength, vfMaxExtent, vfSolid, vfString
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
ConstructorsConstructorDescriptionOGLText()
Construct a new default instance of this class.OGLText
(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 nodeint
Get the number of texture coordinate sets contained by this nodeorg.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.getTexCoordGenMode
(int setNum) Get the texture coordinate generation mode.void
Convenience method to set the text information.void
Notification that the construction phase of this node has finished.void
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.void
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.Methods inherited from class org.web3d.vrml.renderer.common.nodes.text.BaseText
addLocalColorsListener, addTexCoordGenModeChanged, getFieldDeclaration, getFieldIndex, getFieldValue, getFontStyle, getNodeFieldIndices, getNumFields, getPrimaryType, getText, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, sendRoute, setFontStyle, setTextureCount, setValue, setValue, setValue, setValue, setValue, setValue, textUpdated
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, 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
-
OGLText
public OGLText()Construct a new default instance of this class. -
OGLText
Construct a new instance of this node based on the details from the given node. If the node is not a light node, an exception will be thrown.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- Incorrect Node Type
-
-
Method Details
-
updateNodeBoundsChanges
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.- Specified by:
updateNodeBoundsChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
updateNodeDataChanges
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.- Specified by:
updateNodeDataChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Get the OpenGL scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used. Default implementation returns null.- Specified by:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The OpenGL representation.
-
getGeometry
public org.j3d.aviatrix3d.Geometry getGeometry()Returns a OGL Geometry node- Specified by:
getGeometry
in interfaceOGLGeometryNodeType
- Returns:
- A Geometry node
-
getNumSets
public int getNumSets()Get the number of texture coordinate sets contained by this node- Specified by:
getNumSets
in interfaceVRMLGeometryNodeType
- Overrides:
getNumSets
in classBaseText
- 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 classBaseText
- Parameters:
setNum
- The set which this tex gen mode refers- Returns:
- The mode or NULL
-
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 classBaseText
-
setText
Convenience method to set the text information. May be overridden by the derived class, but should call this method first to ensure the field values are properly set.- Specified by:
setText
in interfaceVRMLTextNodeType
- Overrides:
setText
in classBaseText
- Parameters:
str
- The string(s) to set
-