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

openvrml::texture_node Class Reference

Abstract base class for texture nodes. More...

Inheritance diagram for openvrml::texture_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::texture_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~texture_node ()=0 throw ()
 Destroy.

virtual const texture_node * to_texture () const throw ()
 Cast to a texture_node.

virtual texture_node * to_texture () throw ()
 Cast to a texture_node.

virtual size_t components () const=0 throw ()
 Get the number of components for the image.

virtual size_t width () const=0 throw ()
 Get width of the image in pixels.

virtual size_t height () const=0 throw ()
 Get height of the image in pixels.

virtual size_t frames () const=0 throw ()
 Get the number of frames for a time-dependent texture.

virtual const unsigned char * pixels () const=0 throw ()
 Get the pixels.

virtual bool repeat_s () const=0 throw ()
 Get the flag indicating whether the texture should repeat in the S direction.

virtual bool repeat_t () const=0 throw ()
 Get the flag indicating whether the texture should repeat in the T direction.


Protected Member Functions

 texture_node (const node_type &type, const scope_ptr &scope) throw ()
 Construct.


Detailed Description

Abstract base class for texture nodes.

Todo:
Clean this up. It would be better just to have an accessor for an SFImage along with the repeatS and repeatT accessors.


Constructor & Destructor Documentation

openvrml::texture_node::~texture_node  )  throw () [pure virtual]
 

Destroy.

openvrml::texture_node::texture_node const node_type type,
const scope_ptr scope
throw () [protected]
 

Construct.

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

Member Function Documentation

size_t openvrml::texture_node::components  )  const throw () [pure virtual]
 

Get the number of components for the image.

Returns:
the number of components for the image.

Implemented in openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::movie_texture_node, and openvrml::vrml97_node::pixel_texture_node.

size_t openvrml::texture_node::frames  )  const throw () [pure virtual]
 

Get the number of frames for a time-dependent texture.

Returns:
the number of frames.

Todo:
This needs to go away. Time-dependent textures might not be frame-based. For instance, consider an SVG animation.

Implemented in openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::movie_texture_node, and openvrml::vrml97_node::pixel_texture_node.

size_t openvrml::texture_node::height  )  const throw () [pure virtual]
 

Get height of the image in pixels.

Returns:
the height of the image in pixels.

Implemented in openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::movie_texture_node, and openvrml::vrml97_node::pixel_texture_node.

const unsigned char * openvrml::texture_node::pixels  )  const throw () [pure virtual]
 

Get the pixels.

Returns:
the pixels.

Implemented in openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::movie_texture_node, and openvrml::vrml97_node::pixel_texture_node.

bool openvrml::texture_node::repeat_s  )  const throw () [pure virtual]
 

Get the flag indicating whether the texture should repeat in the S direction.

Returns:
true if the image should repeat in the S direction, false otherwise.

Implemented in openvrml::vrml97_node::abstract_texture_node.

bool openvrml::texture_node::repeat_t  )  const throw () [pure virtual]
 

Get the flag indicating whether the texture should repeat in the T direction.

Returns:
true if the image should repeat in the T direction, false otherwise.

Implemented in openvrml::vrml97_node::abstract_texture_node.

texture_node * openvrml::texture_node::to_texture  )  throw () [virtual]
 

Cast to a texture_node.

Returns:
a pointer to this texture_node.

Reimplemented from openvrml::node.

const texture_node * openvrml::texture_node::to_texture  )  const throw () [virtual]
 

Cast to a texture_node.

Returns:
a pointer to this texture_node.

Reimplemented from openvrml::node.

size_t openvrml::texture_node::width  )  const throw () [pure virtual]
 

Get width of the image in pixels.

Returns:
the width of the image in pixels.

Implemented in openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::movie_texture_node, and openvrml::vrml97_node::pixel_texture_node.