H3D::H3DImageLoaderNode Class Reference
[Abstract nodes.]

H3DImageLoaderNode is a virtual base class for classes that read an image file format such as PNG or JPEG and construct an Image class with the data from the file. More...

#include <H3DImageLoaderNode.h>

Inheritance diagram for H3D::H3DImageLoaderNode:

Inheritance graph
List of all members.

Public Types

typedef H3DImageLoaderNode *(* CreateNodeFunc )()
typedef bool(* SupportsFileFunc )(const string &url)
 Function ptr type for.

Public Member Functions

 H3DImageLoaderNode ()
 Constructor.
virtual ImageloadImage (const string &url)=0
 Pure virtual function to load an Image from a url.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.

Static Public Member Functions

template<class N>
static H3DImageLoaderNodenewImageLoaderNode ()
static H3DImageLoaderNodegetSupportedFileReader (const string &url)
 class that can handle that file type.
static void registerFileReader (const string &name, CreateNodeFunc create, SupportsFileFunc supports)
 Register a file reader that can then be returned by getSupportedFileReader().
static void registerFileReader (const FileReaderRegistration &fr)
 Register a file reader that can then be returned by getSupportedFileReader().

Static Protected Attributes

static list< FileReaderRegistration > * registered_file_readers
static bool initialized = false

Classes

struct  FileReaderRegistration
 Class used to register a class to the registered file readers. More...

Detailed Description

H3DImageLoaderNode is a virtual base class for classes that read an image file format such as PNG or JPEG and construct an Image class with the data from the file.

Each subclass must define the loadImage () function. It is used by e.g. the ImageTexture node.


Member Function Documentation

virtual string H3D::H3DImageLoaderNode::defaultXMLContainerField  )  [inline, virtual]
 

Returns the default xml containerField attribute value.

For this node it is "imageLoader".

Reimplemented from H3D::Node.

H3DImageLoaderNode * H3DImageLoaderNode::getSupportedFileReader const string &  url  )  [static]
 

class that can handle that file type.

If no such class is registered NULL is returns.

virtual Image* H3D::H3DImageLoaderNode::loadImage const string &  url  )  [pure virtual]
 

Pure virtual function to load an Image from a url.

Returns:
An Image * with the image data loaded from the url.

Implemented in H3D::RawImageLoader.

static void H3D::H3DImageLoaderNode::registerFileReader const string &  name,
CreateNodeFunc  create,
SupportsFileFunc  supports
[inline, static]
 

Register a file reader that can then be returned by getSupportedFileReader().

Parameters:
name The name of the class
create A function for creating an instance of that class.
supports A function to determine if the class supports a given file type.


Generated on Thu Aug 24 12:39:17 2006 for H3D API by  doxygen 1.4.5