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

- Main Page
- Namespaces
- Classes
- Files
- Related Pages
- Examples

- Class List
- Class Hierarchy
- Class Members

# openvrml::light_node Class Reference

`#include <openvrml/node.h>`

Inheritance diagram for openvrml::light_node:

[legend]

List of all members.

## Detailed Description

Abstract base class for light nodes.

## Public Member Functions

virtual | ~light_node ()=0 throw ()
| Destroy.
float | ambient_intensity () const throw ()
| Ambient intensity.
float | intensity () const throw ()
| Intensity.
bool | on () const throw ()
| “On” state.
const openvrml::color & | color () const throw ()
| Color.

## Protected Member Functions

| light_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope) throw ()
| Construct.

## Private Member Functions

virtual light_node * | to_light () throw ()
| Cast to a `light_node`.
virtual float | do_ambient_intensity () const =0 throw ()
| `ambient_intensity` implementation.
virtual float | do_intensity () const =0 throw ()
| `intensity` implementation.
virtual bool | do_on () const =0 throw ()
| `on` implementation.
virtual const openvrml::color & | do_color () const =0 throw ()
| `color` implementation.

## Constructor & Destructor Documentation

openvrml::light_node::~light_node | ( |  | ) | throw ()`[pure virtual]`

Destroy.

openvrml::light_node::light_node | ( | const node_type & | type,
|  | const boost::shared_ptr< openvrml::scope > & | scope |
| ) |  |  | throw ()`[protected]`

Construct.

Parameters:

  `[in]` | type | the `node_type` associated with the node.
  `[in]` | scope | the `scope` the node belongs to.

## Member Function Documentation

float openvrml::light_node::ambient_intensity | ( |  | ) | const throw ()

Ambient intensity.

Delegates to `do_ambient_intensity`.

Returns:
  the ambient intensity.

float openvrml::light_node::intensity | ( |  | ) | const throw ()

Intensity.

Delegates to `do_intensity`.

Returns:
  the intensity.

bool openvrml::light_node::on | ( |  | ) | const throw ()

“On” state.

Delegates to `do_on`.

Returns:
  `true` if the light is on; `false` otherwise.

const openvrml::color & openvrml::light_node::color | ( |  | ) | const throw ()

Color.

Delegates to `do_color`.

Returns:
  the color.

openvrml::light_node * openvrml::light_node::to_light | ( |  | ) | throw ()`[private, virtual]`

Cast to a `light_node`.

Returns:
  a pointer to this `light_node`.

Reimplemented from openvrml::node.

float openvrml::light_node::do_ambient_intensity | ( |  | ) | const throw ()`[private, pure virtual]`

`ambient_intensity` implementation.

Returns:
  the ambient intensity.

float openvrml::light_node::do_intensity | ( |  | ) | const throw ()`[private, pure virtual]`

`intensity` implementation.

Returns:
  the intensity.

bool openvrml::light_node::do_on | ( |  | ) | const throw ()`[private, pure virtual]`

`on` implementation.

Returns:
  `true` if the light is on; `false` otherwise.

const openvrml::color & openvrml::light_node::do_color | ( |  | ) | const throw ()`[private, pure virtual]`

`color` implementation.

Returns:
  the color.