Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields

osgVideo::VideoFeed Class Reference

Callback Class that takes video from a camera a uses as background.


Public Member Functions

 VideoFeed (osgVideo::VideoSource *)
 Constructor that sets which VideoSource to use.

virtual void operator() (osgProducer::OsgSceneHandler &, Producer::Camera &)
 texture maps the video feed onto the background.

void setSceneView (osgUtil::SceneView *sceneView)
 store a reference to the SceneView.

void setVideoSource (osgVideo::VideoSource *videoSource)
 sets which VideoSource to use.

osgVideo::VideoSourcegetVideoSource (void)
 return the VideoSource in use.


Protected Member Functions

bool createTexture ()
 allocates memory for the texture.

bool updateTexture ()
 gets a new frame and updates the texture.


Constructor & Destructor Documentation

VideoFeed::VideoFeed osgVideo::VideoSource videoSource  ) 
 

Callback class to update the background texture with the frame from a video camera.

Parameters:
videoSource the VideoSource to use.


Member Function Documentation

bool VideoFeed::createTexture  )  [protected]
 

Loads a file and uses it as a texture for the background This texture will be updated by the camera new version creates a texture and allocates memory for it.

Returns:
true if successful, false otherwise.

void VideoFeed::operator() osgProducer::OsgSceneHandler &  sh,
Producer::Camera &  camera
[virtual]
 

Texture maps the camera input onto a polygon on the background calls updateTexture to obtain a new camera frame.

Parameters:
sh the sceneHandler
camera a Producer::Camera.

bool VideoFeed::updateTexture  )  [protected]
 

Obtain a new reading from the camera. Called by updateBackground.

Returns:
true if successful, false otherwise.


The documentation for this class was generated from the following files:
Generated on Wed Nov 17 12:22:38 2004 for osgAR by doxygen 1.3.7