All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----dnx.util.DNXObject | +----dnx.lr.Node | +----dnx.lr.SubsidiaryNode | +----dnx.lr.TextureNode | +----dnx.lr.node.MovieTextureNode
MovieTexture { exposedField SFBool loop FALSE exposedField SFFloat speed 1 exposedField SFTime startTime 0 exposedField SFTime stopTime 0 exposedField MFString url [] field SFBool repeatS TRUE field SFBool repeatT TRUE eventOut SFFloat duration_changed eventOut SFBool isActive }
The MovieTexture node defines a time dependent texture map (contained in a movie file) and parameters for controlling the movie and the texture mapping. A MovieTexture can also be used as the source of sound data for a Sound node, but in this special case are not used for rendering.
Texture maps are defined in a 2D coordinate system, (s, t), that ranges from 0.0 to 1.0 in both directions. The bottom edge of the image corresponds to the S-axis of the texture map, and left edge of the image corresponds to the T-axis of the texture map. The lower-left pixel of the image corresponds to s=0, t=0, and the top-right pixel of the image corresponds to s=1, t=1.
The url field that defines the movie data must support MPEG1-Systems (audio and video) or MPEG1-Video (video-only) movie file formats [MPEG]. See "Concepts - URLS and URNs" for details on the url field. It is recommended that implementations support greyscale or alpha transparency rendering if the specific movie format being used supports these features.
See "Concepts - Lighting Model" for details on lighting equations and the interaction between textures, materials, and geometries.
As soon as the movie is loaded, a duration_changed eventOut is sent. This indicates the duration of the movie, in seconds. This eventOut value can be read (for instance, by a Script) to determine the duration of a movie. A value of -1 implies the movie has not yet loaded or the value is unavailable for some reason.
The loop, startTime, and stopTime exposedFields and the isActive eventOut, and their affects on the MovieTexture node, are discussed in detail in the "Concepts - Time Dependent Nodes" section. The "cycle" of a MovieTexture is the length of time in seconds for one playing of the movie at the specified speed.
If a MovieTexture is inactive when the movie is first loaded, then frame 0 is shown in the texture if speed is non-negative, or the last frame of the movie if speed is negative. A MovieTexture will always display frame 0 if speed = 0. For positive values of speed, the frame an active MovieTexture will display at time now corresponds to the frame at movie time (i.e., in the movie's local time system with frame 0 at time 0, at speed = 1):
fmod (now - startTime, duration/speed)
If speed is negative, then the frame to display is the frame at movie time:
duration + fmod(now - startTime, duration/speed).
When a MovieTexture becomes inactive, the frame corresponding to the time at which the MovieTexture became inactive will remain as the texture.
The speed exposedField indicates how fast the movie should be played. A speed of 2 indicates the movie plays twice as fast. Note that the duration_changed output is not affected by the speed exposedField. set_speed events are ignored while the movie is playing. A negative speed implies that the movie will play backwards. However, content creators should note that this may not work for streaming movies or very large movie files.
MovieTextures can be referenced by an Appearance node's texture field (as a movie texture) and by a Sound node's source field (as an audio source only). A legal implementation of the MovieTexture node is not required to play audio if speed is not equal to 1.
public SFBool loopspeed
public SFFloat speedstartTime
public SFTime startTimestopTime
public SFTime stopTimeurl
public MFString urlrepeatS
public SFBool repeatSrepeatT
public SFBool repeatTduration_changed
public SFFloat duration_changedisActive
public SFBool isActive
public MovieTextureNode()
protected void createNodeDefinition(NodeDefinition def)
protected void initFields()
public Texture getTexture(Graphics3DDevice device)
All Packages Class Hierarchy This Package Previous Next Index