Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# openvrml::vrml97_node::background_class Class Reference

Inheritance diagram for openvrml::vrml97_node::background_class:

[legend]
List of all members.

## Detailed Description

Class object for Background nodes.

## Public Member Functions

| background_class (openvrml::browser &browser)
| Construct.
virtual | ~background_class () throw ()
| Destroy.
void | set_first (background_node &background) throw ()
| Set the first Background node in the world.
bool | has_first () const throw ()
| Check to see if the first node has been set.
void | bind (background_node &background, double timestamp) throw (std::bad_alloc)
| Push a background_node on the top of the bound node stack.
void | unbind (background_node &background, double timestamp) throw ()
| Remove a background_node from the bound node stack.

## Private Types

typedef std::vector< background_node * > | bound_nodes_t
| A bound Background node stack.

## Private Member Functions

virtual void | do_initialize (viewpoint_node *initialViewpoint, double timestamp) throw ()
virtual void | do_render (viewer &v) const throw ()
| node_class-specific rendering.
virtual const node_type_ptr | do_create_type (const std::string &id, const node_interface_set &interfaces) const throw (unsupported_interface, std::bad_alloc)
| Create a node_type.

## Private Attributes

background_node * | first
| The first Background node in the initial scene graph.
bound_nodes_t | bound_nodes
| The bound Background node stack.

## Member Typedef Documentation

openvrml::vrml97_node::background_class::bound_nodes_t `[private]`

| A bound Background node stack.

## Constructor & Destructor Documentation

openvrml::vrml97_node::background_class::background_class | ( | openvrml::browser & | browser | ) | `[explicit]`

Construct.

Parameters:

  | browser | the browser associated with this class object.

openvrml::vrml97_node::background_class::~background_class | ( |  | ) | throw ()`[virtual]`

| Destroy.

## Member Function Documentation

void openvrml::vrml97_node::background_class::set_first | ( | background_node & | 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::do_initialize.

Parameters:

  | background | a Background node.

bool openvrml::vrml97_node::background_class::has_first | ( |  | ) | const throw ()

Check to see if the first node has been set.

This method is used by background_node::do_initialize.

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

void openvrml::vrml97_node::background_class::bind | ( | background_node & | background,
|  | double | timestamp
| ) | throw (std::bad_alloc)

Push a background_node 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.

void openvrml::vrml97_node::background_class::unbind | ( | background_node & | background,
|  | double | timestamp
| ) | throw ()

Remove a background_node from the bound node stack.

Parameters:

  | background | the node to unbind.
  | timestamp | the current time.

void openvrml::vrml97_node::background_class::do_render | ( | viewer & | v | ) | const throw ()`[private, virtual]`

node_class-specific rendering.

Render the active Background node.

Parameters:

  | v | viewer.

Reimplemented from openvrml::node_class.

const node_type_ptr openvrml::vrml97_node::background_class::do_create_type | ( | const std::string & | id,
|  | const node_interface_set & | interfaces
| ) | const throw (unsupported_interface, std::bad_alloc)`[private, virtual]`

Create a node_type.

Parameters:

  | id | the name for the new node_type.
  | interfaces | the interfaces for the new node_type.

Returns:
  a node_type_ptr to a node_type capable of creating Background nodes.

Exceptions:

  | unsupported_interface | if `interfaces` includes an interface not supported by background_class.
  | std::bad_alloc | if memory allocation fails.

Implements openvrml::node_class.

## Member Data Documentation

background_node * openvrml::vrml97_node::background_class::first `[private]`

| The first Background node in the initial scene graph.

background_class::bound_nodes_t openvrml::vrml97_node::background_class::bound_nodes `[private]`

| The bound Background node stack.