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

openvrml::vrml97_node::image_texture_node Class Reference

Represents ImageTexture node instances. More...

Inheritance diagram for openvrml::vrml97_node::image_texture_node:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

virtual ~image_texture_node () throw ()
 Destroy.

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 image width in pixels.

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

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

virtual const unsigned char * pixels () const throw ()
 The image pixel data.


Private Member Functions

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


Private Attributes

mfstring url
 url exposedField.

imgimage
 Image data.

viewer::texture_object_t texObject
 Handler for the renderer.


Friends

class image_texture_class
 Class object for ImageTexture nodes.


Detailed Description

Represents ImageTexture node instances.


Constructor & Destructor Documentation

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

Construct.

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

Member Function Documentation

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

The number of components.

Returns:
the number of components.

Implements openvrml::texture_node.

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

The number of frames.

Returns:
0.

Implements openvrml::texture_node.

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

The image height in pixels.

Returns:
the image height in pixels.

Implements openvrml::texture_node.

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

The image pixel data.

Returns:
the image pixel data.

Implements openvrml::texture_node.

void openvrml::vrml97_node::image_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::image_texture_node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render the node.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.

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

The image width in pixels.

Returns:
the image width in pixels.

Implements openvrml::texture_node.