NAME AnimatedTexture2 - animated texture mapping node INHERITS FROM SoBase > SoFieldContainer > SoNode > AnimatedTexture2 SYNOPSIS #include "AnimatedTexture2.H" typedef void AnimatedTexture2CB(void *userData, AnimatedTexture2 *node) Public Fields from class AnimatedTexture2: SoSFString filename SoSFBool loopMovie SoSFInt32 maxFrameRate Private Fields from class AnimatedTexture2: SoSFBool MultiThread SoSFBool Buffer SoMFString movieNames Methods from class AnimatedTexture2: AnimatedTexutre2(SbBool doMultiThread=FALSE, SbBool doBuffer=FALSE) void setMovies(const SoMFString * const inMo- vies) void setCallback(AnimatedTexture2CB *func, void *userData = NULL) SbBool isPaused() void play() void pause() void rewind() static SoType getClassTypeId() Methods from class SoNode: void setOverride(SbBool state) SbBool isOverride() const virtual SoNode * copy(SbBool copyConnections = FALSE) const virtual SbBool affectsState() const static SoNode * getByName(const SbName &name) static int getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: void setToDefaults() SbBool hasDefaultValues() const SbBool fieldsAreEqual(const SoFieldContainer *fc) const void copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE) SbBool set(const char *fieldDataString) void get(SbString &fieldDataString) virtual int getFields(SoFieldList &resultList) const virtual SoField * getField(const SbName &fieldName) const SbBool getFieldName(const SoField *field, SbName &fieldName) const SbBool enableNotify(SbBool flag) SbBool isNotifyEnabled() const Methods from class SoBase: void ref() void unref() const void unrefNoDelete() const void touch() virtual SoType getTypeId() const SbBool isOfType(SoType type) const virtual void setName(const SbName &name) virtual const SbName & getName() const DESCRIPTION This property node defines a series of texture maps from frames of an animation (currently MPEG and vic, but any ani- mation with a wrapper class inherited from the ANIMbase class will work). The frames are applied as textures to the subsequent shapes as the frames are decoded. FIELDS SoSFString filename Filename of the animation to play SoSFBool loopMovie This defines whether the animation will be looped or not. If multiple animations have been set with setMo- vies() and loopMovie is TRUE, then all the movies are looped. If an animation is open ended, such as network video (nv) or vic video (h.261), it can not be looped and this field is ignored. SoSFInt32 maxFrameRate This setting is only used if MultiThread is TRUE. This field describes the maximum frame rate of the anima- tion. The animation will be delayed but no frames will be skipped (this field describes a general upper bound on frame rate). A value of -1 means use the default frame rate from the animation. A value of 0 means display frames as fast as possible. METHODS AnimatedTexture2(SbBool doMultiThread=FALSE, SbBool doBuffer=FALSE) Creates a animated texture node. The default is not to multi-thread animation decoding and not buffer decoded frames. If doMultiThread is TRUE, then a separate thread will be used to decode the animation and the private field MultiThread will be TRUE. If doBuffer is TRUE then the private field Buffer field will be TRUE. If the loopMovie field is not ignored, frames will be buffered for faster display when an animation is looped. void setMovies(const SoMFString * const inMo- vies) Instead of playing one animation once or looping one movie, all animations listed in inMovies will be played consecutively. If loopMovie is true, then the list of animations will be looped so that after the last anima- tion in the list is played, the first one will be played again. void setCallback(AnimatedTexture2CB *func, void *userData = NULL) Sets end of animation callback. Each time an animation finishes, this callback is called. To turn off the callback, call this function with func equal to NULL. SbBool isPaused() Returns TRUE if the animation is paused, FALSE if the animation is not paused. void play() If the the animation has been paused, this method starts the animation playing again. void pause() Pauses the animtation so that no new frames are displayed until the play() method is called. void rewind() Rewind the movie to the beginning. static SoType getClassTypeId() Returns type identifier for this class. ACTION BEHAVIOR SoGLRenderAction Uses glTexImage2D to send the current texture FILE FORMAT/DEFAULTS AnimatedTexture2 { filename "" loopMovie 1 MultiThread FALSE Buffer FALSE movieNames "" } SEE ALSO SoTexture2, mpeg_play, vic