SPIN Framework
Public Member Functions

spin::VideoTexture Class Reference

A video texture node that allows dynamic textures to be applied. More...

#include <VideoTexture.h>

Inheritance diagram for spin::VideoTexture:
spin::Shader spin::ReferencedStateSet

List of all members.

Public Member Functions

 VideoTexture (SceneManager *sceneManager, const char *initID)
virtual void debug ()
void setPath (const char *newPath)
const char * getPath () const
void setLoop (int i)
int getLoop () const
void setIndex (float f)
float getIndex () const
void setFrameRate (float f)
float getFrameRate () const
void setPlay (int i)
int getPlay () const
void rewind ()
void flipHorizontal ()
void flipVertical ()
bool isValid ()
virtual std::vector< lo_message > getState () const

Detailed Description

A video texture node that allows dynamic textures to be applied.

This uses osg::ImageStream, so it can load several different movie formats, including live feeds on the Mac via devices.live.


Member Function Documentation

void spin::VideoTexture::debug ( ) [virtual]

Print debug information to console.

Reimplemented from spin::Shader.

void spin::VideoTexture::flipHorizontal ( )

Flips the video horizontally.

void spin::VideoTexture::flipVertical ( )

Flips the video vertically.

float spin::VideoTexture::getFrameRate ( ) const [inline]

Returns an integer indicating the set framerate of the video sequence.

float spin::VideoTexture::getIndex ( ) const [inline]

Returns an index in the range 0,1 indicating a part of the video set to be rapidly accessed with the setIndex function.

int spin::VideoTexture::getLoop ( ) const [inline]

Returns a boolean indicating whether the video is set to loop or not.

const char* spin::VideoTexture::getPath ( ) const [inline]

Returns a string indicating the path from which the video data is drawn. This is an abstract class and should be re-implemented in a derived class

int spin::VideoTexture::getPlay ( ) const [inline]

Returns a boolean indicating whether the video is set to play or not.

std::vector< lo_message > spin::VideoTexture::getState ( ) const [virtual]

Just like a ReferencedNode, each subclass of ReferencedStateSet must override the getState() method to pass it's current state.

Reimplemented from spin::Shader.

bool spin::VideoTexture::isValid ( ) [inline]

Returns whether there is a currently valid video

void spin::VideoTexture::rewind ( )

Seek to beginning of video (equivalent to setIndex(0);

void spin::VideoTexture::setFrameRate ( float  f)

Only for image sequences; tells OSG how fast to play the sequence

void spin::VideoTexture::setIndex ( float  f)

Normalized seek to a part of the video. ie, index in range [0,1]

void spin::VideoTexture::setLoop ( int  i)

Enable (1) or disable (0) looping of the video

void spin::VideoTexture::setPath ( const char *  newPath)

Creates a video from a path on disk. This can either be a single movie file (ie, a format that OSG knows how to read), or a folder name that contains a sequence of images to stitch into a video.

void spin::VideoTexture::setPlay ( int  i)

Play (1) or Pause (0) the video


The documentation for this class was generated from the following files: