Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# osgUtil::HalfWayMapGenerator Class Reference

This cube map generator produces an Half-way vector map, useful for hardware-based specular lighting effects. More...

Inheritance diagram for osgUtil::HalfWayMapGenerator:

[legend]
List of all members.

## Public Member Functions
| HalfWayMapGenerator (const osg::Vec3 &light_direction, int texture_size=64)
| HalfWayMapGenerator (const HalfWayMapGenerator &copy, const osg::CopyOp &copyop)
## Protected Member Functions
virtual | ~HalfWayMapGenerator ()
HalfWayMapGenerator & | operator= (const HalfWayMapGenerator &)
virtual osg::Vec4 | compute_color (const osg::Vec3 &R) const
| Override this method to define how colors are computed.

## Detailed Description

This cube map generator produces an Half-way vector map, useful for hardware-based specular lighting effects.

It computes: C = normalize(R - L), where C is the resulting color, R is the reflection vector and L is the light direction.

## Constructor & Destructor Documentation

osgUtil::HalfWayMapGenerator::HalfWayMapGenerator | ( | const osg::Vec3 & | light_direction,
|  | int | texture_size = 64
| ) |

osgUtil::HalfWayMapGenerator::HalfWayMapGenerator | ( | const HalfWayMapGenerator & | copy,
|  | const osg::CopyOp & | copyop
| ) |

virtual osgUtil::HalfWayMapGenerator::~HalfWayMapGenerator | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

osg::Vec4 osgUtil::HalfWayMapGenerator::compute_color | ( | const osg::Vec3 & | R | ) | const`[inline, protected, virtual]`

| Override this method to define how colors are computed. The parameter R is the reflection vector, pointing from the center of the cube. The return value should be the RGBA color associated with that reflection ray. Implements osgUtil::CubeMapGenerator.

HalfWayMapGenerator& osgUtil::HalfWayMapGenerator::operator= | ( | const HalfWayMapGenerator & |  | ) | `[inline, protected]`

The documentation for this class was generated from the following file:

- HalfWayMapGenerator