Main Page   Modules   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

openvrml::vrml97_node::movie_texture_node Class Reference

MovieTexture node instances. More...

Inheritance diagram for openvrml::vrml97_node::movie_texture_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::movie_texture_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 movie_texture_node (const node_type &type, const scope_ptr &scope)
 Construct.

virtual ~movie_texture_node () throw ()
 Destroy.

virtual movie_texture_node * to_movie_texture () const
 Cast to a movie_texture_node.

void update (double time)
 Update the node for the current timestamp.

virtual void render (openvrml::viewer &viewer, rendering_context context)
 Render the node.

virtual size_t components () const throw ()
 The number of components.

virtual size_t width () const throw ()
 The width in pixels.

virtual size_t height () const throw ()
 The height in pixels.

virtual size_t frames () const throw ()
 The number of frames.

virtual const unsigned char * pixels () const throw ()
 Pixel data for the current frame.


Private Member Functions

virtual void do_initialize (double timestamp) throw (std::bad_alloc)
 Initialize.

virtual void do_shutdown (double timestamp) throw ()
 Shut down.

void process_set_loop (const field_value &value, double timestamp) throw (std::bad_cast)
 set_loop eventIn handler.

void process_set_speed (const field_value &value, double timestamp) throw (std::bad_cast)
 set_speed eventIn handler.

void process_set_startTime (const field_value &value, double timestamp) throw (std::bad_cast)
 set_startTime eventIn handler.

void process_set_stopTime (const field_value &value, double timestamp) throw (std::bad_cast)
 set_stopTime eventIn handler.

void process_set_url (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_url eventIn handler.


Private Attributes

sfbool loop
 loop exposedField.

sffloat speed
 speed exposedField.

sftime startTime
 startTime exposedField.

sftime stopTime
 stopTime exposedField.

mfstring url
 url exposedField.

sftime duration
 duration_changed eventOut.

sfbool active
 isActive eventOut.

imgimage
 Image data.

int frame
 Index of the currently shown frame.

int lastFrame
 Index of the previously shown frame.

double lastFrameTime
 Timestamp corresponding to the showing of the previous frame.

viewer::texture_object_t texObject
 Handle for the renderer.


Friends

class movie_texture_class
 Class object for MovieTexture nodes.


Detailed Description

MovieTexture node instances.


Constructor & Destructor Documentation

openvrml::vrml97_node::movie_texture_node::movie_texture_node const node_type type,
const scope_ptr scope
 

Construct.

Parameters:
type the node_type associated with the node instance.
scope the scope to which the node belongs.

openvrml::vrml97_node::movie_texture_node::~movie_texture_node  )  throw () [virtual]
 

Destroy.


Member Function Documentation

size_t openvrml::vrml97_node::movie_texture_node::components  )  const throw () [virtual]
 

The number of components.

Returns:
the number of components.

Implements openvrml::texture_node.

void openvrml::vrml97_node::movie_texture_node::do_initialize double  timestamp  )  throw (std::bad_alloc) [private, virtual]
 

Initialize.

Parameters:
timestamp the current time.
Exceptions:
std::bad_alloc if memory allocation fails.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::movie_texture_node::do_shutdown double  timestamp  )  throw () [private, virtual]
 

Shut down.

Parameters:
timestamp the current time.

Reimplemented from openvrml::node.

size_t openvrml::vrml97_node::movie_texture_node::frames  )  const throw () [virtual]
 

The number of frames.

Returns:
the number of frames.

Implements openvrml::texture_node.

size_t openvrml::vrml97_node::movie_texture_node::height  )  const throw () [virtual]
 

The height in pixels.

Returns:
the height in pixels.

Implements openvrml::texture_node.

const unsigned char * openvrml::vrml97_node::movie_texture_node::pixels  )  const throw () [virtual]
 

Pixel data for the current frame.

Returns:
pixel data for the current frame.

Implements openvrml::texture_node.

void openvrml::vrml97_node::movie_texture_node::process_set_loop const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_loop eventIn handler.

Parameters:
value an sfbool value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sfbool.

void openvrml::vrml97_node::movie_texture_node::process_set_speed const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_speed eventIn handler.

Parameters:
value an sffloat value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sffloat.

void openvrml::vrml97_node::movie_texture_node::process_set_startTime const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_startTime eventIn handler.

Parameters:
value an sftime value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sftime.

void openvrml::vrml97_node::movie_texture_node::process_set_stopTime const field_value value,
double  timestamp
throw (std::bad_cast) [private]
 

set_stopTime eventIn handler.

Parameters:
value an sftime value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sftime.

void openvrml::vrml97_node::movie_texture_node::process_set_url const field_value value,
double  timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_url eventIn handler.

Parameters:
value an mfstring value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an mfstring.
std::bad_alloc if memory allocation fails.

void openvrml::vrml97_node::movie_texture_node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render the node.

Render a frame if there is one available.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.

movie_texture_node * openvrml::vrml97_node::movie_texture_node::to_movie_texture  )  const [virtual]
 

Cast to a movie_texture_node.

Returns:
a pointer to the movie_texture_node.

Reimplemented from openvrml::node.

void openvrml::vrml97_node::movie_texture_node::update double  time  ) 
 

Update the node for the current timestamp.

Parameters:
time the current time.

size_t openvrml::vrml97_node::movie_texture_node::width  )  const throw () [virtual]
 

The width in pixels.

Returns:
the width in pixels.

Implements openvrml::texture_node.


Friends And Related Function Documentation

openvrml::vrml97_node::movie_texture_node::movie_texture_class [friend]
 

Class object for MovieTexture nodes.


Member Data Documentation

sfbool openvrml::vrml97_node::movie_texture_node::active [private]
 

isActive eventOut.

sftime openvrml::vrml97_node::movie_texture_node::duration [private]
 

duration_changed eventOut.

int openvrml::vrml97_node::movie_texture_node::frame [private]
 

Index of the currently shown frame.

img * openvrml::vrml97_node::movie_texture_node::image [private]
 

Image data.

int openvrml::vrml97_node::movie_texture_node::lastFrame [private]
 

Index of the previously shown frame.

double openvrml::vrml97_node::movie_texture_node::lastFrameTime [private]
 

Timestamp corresponding to the showing of the previous frame.

sfbool openvrml::vrml97_node::movie_texture_node::loop [private]
 

loop exposedField.

sffloat openvrml::vrml97_node::movie_texture_node::speed [private]
 

speed exposedField.

sftime openvrml::vrml97_node::movie_texture_node::startTime [private]
 

startTime exposedField.

sftime openvrml::vrml97_node::movie_texture_node::stopTime [private]
 

stopTime exposedField.

viewer::texture_object_t openvrml::vrml97_node::movie_texture_node::texObject [private]
 

Handle for the renderer.

mfstring openvrml::vrml97_node::movie_texture_node::url [private]
 

url exposedField.