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

BackgroundClass Class Reference

Class object for Background nodes. More...

Inheritance diagram for BackgroundClass:

NodeClass List of all members.

Public Methods

 BackgroundClass (Browser &browser)
 Constructor.

virtual ~BackgroundClass () throw ()
 Destructor.

void setFirst (Background &background) throw ()
 Set the first Background node in the world.

bool hasFirst () const throw ()
 Check to see if the first node has been set.

void bind (Background &background, double timestamp) throw (std::bad_alloc)
 Push a Background on the top of the bound node stack.

void unbind (Background &background, double timestamp) throw ()
 Remove a Background from the bound node stack.

virtual void initialize (double timestamp) throw ()
 NodeClass-specific initialization.

virtual void render (Viewer &viewer) throw ()
 NodeClass-specific rendering.

virtual const NodeTypePtr createType (const std::string &id, const NodeInterfaceSet &) throw (UnsupportedInterface, std::bad_alloc)
 Create a NodeType.


Private Attributes

Backgroundfirst
std::vector< NodePtrboundNodes

Detailed Description

Class object for Background nodes.


Constructor & Destructor Documentation

BackgroundClass Browser   browser [explicit]
 

Constructor.

Parameters:
browser the Browser associated with this class object.

~BackgroundClass   throw () [virtual]
 

Destructor.


Member Function Documentation

void bind Background   background,
double    timestamp
throw (std::bad_alloc)
 

Push a Background on the top of the bound node stack.

Parameters:
background the node to bind.
timestamp the current time.
Exceptions:
std::bad_alloc if memory allocation fails.

const NodeTypePtr createType const std::string &    id,
const NodeInterfaceSet   interfaces
throw (UnsupportedInterface, std::bad_alloc) [virtual]
 

Create a NodeType.

Parameters:
id the name for the new NodeType.
interfaces the interfaces for the new NodeType.
Returns:
a NodeTypePtr to a NodeType capable of creating Background nodes.
Exceptions:
UnsupportedInterface if interfaces includes an interface not supported by BackgroundClass.
std::bad_alloc if memory allocation fails.

Implements NodeClass.

bool hasFirst   const throw ()
 

Check to see if the first node has been set.

This method is used by Background::initializeImpl.

Returns:
true if the first node has already been set; false otherwise.

void initialize double    timestamp throw () [virtual]
 

NodeClass-specific initialization.

Parameters:
timestamp the current time.

Reimplemented from NodeClass.

void render Viewer   viewer throw () [virtual]
 

NodeClass-specific rendering.

Render the active Background node.

Parameters:
viewer a Viewer.

Reimplemented from NodeClass.

void setFirst Background   background throw ()
 

Set the first Background node in the world.

The first Background node in the world is used as the initial background. This method is used by Background::initializeImpl.

Parameters:
background a Background node.

void unbind Background   background,
double    timestamp
throw ()
 

Remove a Background from the bound node stack.

Parameters:
background the node to unbind.
timestamp the current time.