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

TextureNode Class Reference

Abstract base class for texture nodes. More...

Inheritance diagram for TextureNode:

Node AbstractTexture ImageTexture MovieTexture PixelTexture List of all members.

Public Methods

virtual ~TextureNode ()=0 throw ()
 Destructor.

virtual const TextureNode * toTexture () const throw ()
 Cast to a TextureNode.

virtual TextureNode * toTexture () throw ()
 Cast to a TextureNode.

virtual size_t nComponents () 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 nFrames () 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 const SFBoolgetRepeatS () const=0 throw ()
 Get the flag indicating whether the texture should repeat in the S direction.

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


Protected Methods

 TextureNode (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.


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

~TextureNode   throw () [pure virtual]
 

Destructor.

TextureNode const NodeType   nodeType,
const ScopePtr   scope
[protected]
 

Constructor.

Parameters:
nodeType the NodeType associated with the node.
scope the Scope the node belongs to.

Member Function Documentation

const SFBool & getRepeatS   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 AbstractTexture.

const SFBool & getRepeatT   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 AbstractTexture.

size_t height   const throw () [pure virtual]
 

Get height of the image in pixels.

Returns:
the height of the image in pixels.

size_t nComponents   const throw () [pure virtual]
 

Get the number of components for the image.

Returns:
the number of components for the image.

size_t nFrames   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.

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

Get the pixels.

Returns:
the pixels.

TextureNode * toTexture   throw () [virtual]
 

Cast to a TextureNode.

Returns:
a pointer to this TextureNode.

Reimplemented from Node.

const TextureNode * toTexture   const throw () [virtual]
 

Cast to a TextureNode.

Returns:
a pointer to this TextureNode.

Reimplemented from Node.

size_t width   const throw () [pure virtual]
 

Get width of the image in pixels.

Returns:
the width of the image in pixels.