osgUtil::HalfWayMapGenerator Class Reference

`#include <HalfWayMapGenerator>`

Inheritance diagram for osgUtil::HalfWayMapGenerator:

## Public Member Functions

| HalfWayMapGenerator (const osg::Vec3 &light_direction, int texture_size=64)
| HalfWayMapGenerator (const HalfWayMapGenerator &copy, const osg::CopyOp &copyop)
Public Member Functions inherited from osgUtil::CubeMapGenerator
| CubeMapGenerator (int texture_size=64)
| CubeMapGenerator (const CubeMapGenerator &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osg::Image * | getImage (osg::TextureCubeMap::Face face)
const osg::Image * | getImage (osg::TextureCubeMap::Face face) const
void | generateMap (bool use_osg_system=true)
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
virtual void | setThreadSafeRefUnref (bool)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const

## Protected Member Functions

virtual | ~HalfWayMapGenerator ()
HalfWayMapGenerator & | operator= (const HalfWayMapGenerator &)
virtual osg::Vec4 | compute_color (const osg::Vec3 &R) const
Protected Member Functions inherited from osgUtil::CubeMapGenerator
virtual | ~CubeMapGenerator ()
CubeMapGenerator & | operator= (const CubeMapGenerator &)
void | set_pixel (int index, int c, int r, const osg::Vec4 &color)
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Additional Inherited Members

Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()
Static Protected Member Functions inherited from osgUtil::CubeMapGenerator
static osg::Vec4 | vector_to_color (const osg::Vec3 &vec)
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount

## 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

## HalfWayMapGenerator() [1/2]

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

Referenced by HalfWayMapGenerator(), and operator=().

## HalfWayMapGenerator() [2/2]

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

References HalfWayMapGenerator().

## ~HalfWayMapGenerator()

virtual osgUtil::HalfWayMapGenerator::~HalfWayMapGenerator | ( |  | ) |

inline protected virtual

## Member Function Documentation

## compute_color()

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.

References osg::Vec3f::length(), and osgUtil::CubeMapGenerator::vector_to_color().

## operator=()

HalfWayMapGenerator & osgUtil::HalfWayMapGenerator::operator= | ( | const HalfWayMapGenerator & |  | ) |

inline protected

References HalfWayMapGenerator().

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

- HalfWayMapGenerator