Class OGLMovieTexture
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.BaseTimeDependentNode
org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
org.web3d.vrml.renderer.common.nodes.texture.BaseMovieTexture
org.web3d.vrml.renderer.ogl.nodes.texture.OGLMovieTexture
- All Implemented Interfaces:
VRMLNode
,FrameStateListener
,VRMLAppearanceChildNodeType
,VRMLChildNodeType
,VRMLExternalNodeType
,VRMLNodeType
,VRMLSingleExternalNodeType
,VRMLTexture2DNodeType
,VRMLTextureNodeType
,VRMLTimeControlledNodeType
,VRMLTimeDependentNodeType
,VRMLTimeListener
,VRMLWorldRootChildNodeType
,VideoStreamHandler
,OGLTextureNodeType
,OGLVRMLNode
OGL implementation of a MovieTexture node.
The most optimal way for this to work would be creating ByteTextureComponent2D and using updateSubImage updates. For now this will just use the current mechanisms for texture updates(fireTextureImageChanged) and recreate the texture.
- Version:
- $Revision: 1.3 $
- Author:
- Alan Hudson
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseMovieTexture
FIELD_DESCRIPTION, FIELD_TEXTURE_PROPERTIES, fieldDecl, fieldMap, pTextureProperties, TEXPROPS_VERSION_MSG, TEXTURE_PROPS_NODE_MSG, TEXTURE_PROPS_PROTO_MSG, textureListeners, vfDescription, vfDuration, vfIsActive, vfRepeatS, vfRepeatT, vfSpeed, vfTextureProperties, vfURL
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
FIELD_ELAPSED_TIME, FIELD_LOOP, FIELD_PAUSE_TIME, FIELD_RESUME_TIME, FIELD_START_TIME, FIELD_STOP_TIME, LAST_TIME_INDEX, vfElapsedTime, vfLoop, vfPauseTime, vfResumeTime, vfStartTime, vfStopTime
Fields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeDependentNode
vrmlClock
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
Fields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorsOGLMovieTexture
(VRMLNodeType node) Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification that the rendering of the event model is complete and that rendering is about to begin.org.j3d.aviatrix3d.SceneGraphObject
Get the Java3D scene graph object representation of this node.void
setTexture
(int index, org.j3d.aviatrix3d.Texture tex) Set the Aviatrix3D texture representation back into the node implementation.void
videoStreamFormat
(int width, int height) Called when the format is known.void
videoStreamFrame
(NIOBufferImage image) Called when a frame is available for display.void
Called once before the first frame is sent.void
Called after the last frame is sent.Methods inherited from class org.web3d.vrml.renderer.common.nodes.texture.BaseMovieTexture
addContentStateListener, addTextureListener, addUrlListener, checkValidContentType, copy, fireContentStateChanged, fireTextureImageChanged, fireUrlChanged, getCacheString, getDescription, getDuration, getFieldDeclaration, getFieldIndex, getFieldValue, getImage, getIsActive, getLoadState, getNodeFieldIndices, getNumFields, getPrimaryType, getRepeatS, getRepeatT, getSecondaryType, getSpeed, getTextureProperties, getTextureType, getUrl, getWorldUrl, removeContentStateListener, removeTextureListener, removeUrlListener, sendRoute, setContent, setDescription, setDuration, setIsActive, setLoadedURI, setLoadState, setSpeed, setStartTime, setStopTime, setTextureProperties, setupFinished, setUrl, setValue, setValue, setValue, setValue, setVRMLClock, setWorldUrl, timeClick, videoStreamDuration
Methods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
copy, getLoop, getStartTime, getStopTime, setLoop, setPauseTime, setResumeTime, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, 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.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, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLMovieTexture
public OGLMovieTexture()Constructors -
OGLMovieTexture
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
-
setTexture
public void setTexture(int index, org.j3d.aviatrix3d.Texture tex) Set the Aviatrix3D texture representation back into the node implementation.- Specified by:
setTexture
in interfaceOGLTextureNodeType
- Parameters:
index
- The index of the texture (for multitexture)tex
- The texture object to set
-
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.
-
videoStreamFrame
Description copied from class:BaseMovieTexture
Called when a frame is available for display. NOTE - subclasses should override this method.- Specified by:
videoStreamFrame
in interfaceVideoStreamHandler
- Overrides:
videoStreamFrame
in classBaseMovieTexture
- Parameters:
image
- - the next image as an RGB format NIOBufferImage
-
videoStreamFormat
public void videoStreamFormat(int width, int height) Description copied from class:BaseMovieTexture
Called when the format is known. NOTE - subclasses should override this method.- Specified by:
videoStreamFormat
in interfaceVideoStreamHandler
- Overrides:
videoStreamFormat
in classBaseMovieTexture
- Parameters:
width
- - horizontal image size in pixelsheight
- - vertical image size in pixels
-
videoStreamStart
public void videoStreamStart()Description copied from class:BaseMovieTexture
Called once before the first frame is sent.- Specified by:
videoStreamStart
in interfaceVideoStreamHandler
- Overrides:
videoStreamStart
in classBaseMovieTexture
-
videoStreamStop
public void videoStreamStop()Description copied from class:BaseMovieTexture
Called after the last frame is sent.- Specified by:
videoStreamStop
in interfaceVideoStreamHandler
- Overrides:
videoStreamStop
in classBaseMovieTexture
-
allEventsComplete
public void allEventsComplete()Notification that the rendering of the event model is complete and that rendering is about to begin. If the node needs to update itself for this frame, it should do so now before the render pass takes place.- Specified by:
allEventsComplete
in interfaceFrameStateListener
- Overrides:
allEventsComplete
in classAbstractNode
-