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, vfURLFields 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, vfStopTimeFields inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeDependentNode
vrmlClockFields 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, vrmlMinorVersionFields 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 TypeMethodDescriptionvoidNotification that the rendering of the event model is complete and that rendering is about to begin.org.j3d.aviatrix3d.SceneGraphObjectGet the Java3D scene graph object representation of this node.voidsetTexture(int index, org.j3d.aviatrix3d.Texture tex) Set the Aviatrix3D texture representation back into the node implementation.voidvideoStreamFormat(int width, int height) Called when the format is known.voidvideoStreamFrame(NIOBufferImage image) Called when a frame is available for display.voidCalled once before the first frame is sent.voidCalled 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, videoStreamDurationMethods inherited from class org.web3d.vrml.renderer.common.nodes.BaseTimeControlledNode
copy, getLoop, getStartTime, getStopTime, setLoop, setPauseTime, setResumeTime, setValueMethods 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, updateRefsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.web3d.vrml.lang.VRMLNode
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersionMethods 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:
setTexturein 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:
getSceneGraphObjectin interfaceOGLVRMLNode- Returns:
- The OGL representation.
-
videoStreamFrame
Description copied from class:BaseMovieTextureCalled when a frame is available for display. NOTE - subclasses should override this method.- Specified by:
videoStreamFramein interfaceVideoStreamHandler- Overrides:
videoStreamFramein classBaseMovieTexture- Parameters:
image- - the next image as an RGB format NIOBufferImage
-
videoStreamFormat
public void videoStreamFormat(int width, int height) Description copied from class:BaseMovieTextureCalled when the format is known. NOTE - subclasses should override this method.- Specified by:
videoStreamFormatin interfaceVideoStreamHandler- Overrides:
videoStreamFormatin classBaseMovieTexture- Parameters:
width- - horizontal image size in pixelsheight- - vertical image size in pixels
-
videoStreamStart
public void videoStreamStart()Description copied from class:BaseMovieTextureCalled once before the first frame is sent.- Specified by:
videoStreamStartin interfaceVideoStreamHandler- Overrides:
videoStreamStartin classBaseMovieTexture
-
videoStreamStop
public void videoStreamStop()Description copied from class:BaseMovieTextureCalled after the last frame is sent.- Specified by:
videoStreamStopin interfaceVideoStreamHandler- Overrides:
videoStreamStopin 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:
allEventsCompletein interfaceFrameStateListener- Overrides:
allEventsCompletein classAbstractNode
-