Class OGLCone
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.geom3d.BaseCone
org.web3d.vrml.renderer.ogl.nodes.geom3d.OGLCone
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLGeometryNodeType
,VRMLNodeType
,OGLGeometryNodeType
,OGLVRMLNode
public class OGLCone
extends BaseCone
implements OGLGeometryNodeType, org.j3d.aviatrix3d.NodeUpdateListener
OGL implementation of a Cone.
A box is a fixed size object in VRML. Once set at startup, the size cannot be changed. All dynamic requests to modify the size of this implementation will generate an exception.
- Version:
- $Revision: 1.12 $
- Author:
- Alan Hudson, Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.geom3d.BaseCone
FIELD_BOTTOM, FIELD_BOTTOM_RADIUS, FIELD_HEIGHT, FIELD_SIDE, FIELD_SOLID, LAST_CONE_INDEX, NUM_FIELDS, vfBottom, vfBottomRadius, vfHeight, vfSide, vfSolid
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
ConstructorsConstructorDescriptionOGLCone()
Construct new default box object.OGLCone
(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.org.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.void
setTextureCount
(int count) Set the number of textures that were found on the accompanying Appearance node.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.geom3d.BaseCone
addLocalColorsListener, addTexCoordGenModeChanged, getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, getNumSets, getPrimaryType, getTexCoordGenMode, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged, setValue, 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, sendRoute, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, 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, getNumSets, getTexCoordGenMode, hasLocalColorAlpha, hasLocalColors, isCCW, isLightingEnabled, isSolid, removeLocalColorsListener, removeTexCoordGenModeChanged
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
-
OGLCone
public OGLCone()Construct new default box object. -
OGLCone
Construct a new instance of this node based on the details from the given node. If the node is not a Cone node, an exception will be thrown.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- The node is not a Group node
-
-
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
-
setTextureCount
public void setTextureCount(int count) Set the number of textures that were found on the accompanying Appearance node. Used to set the number of texture coordinates that need to be passed in to the renderer when no explicit texture coordinates were given.- Specified by:
setTextureCount
in interfaceVRMLGeometryNodeType
- Overrides:
setTextureCount
in classBaseCone
- Parameters:
count
- The number of texture coordinate sets to add
-
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.
-
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
-
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.
-