osgFX::AnisotropicLighting Class Reference

Inheritance diagram for osgFX::AnisotropicLighting:

osgFX::Effect osg::Group osg::Node osg::Object osg::Referenced List of all members.

Public Member Functions

 AnisotropicLighting ()
 AnisotropicLighting (const AnisotropicLighting &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Effect (osgFX, AnisotropicLighting,"Anisotropic Lighting","This single-pass effect implements a sort of anisotropic ""lighting that replaces the standard OpenGL lighting model.\n""The final color of vertices is not computed directly, it is ""the result of a texture lookup on a user-supplied lighting ""image map. A vertex program is used to compute the s and t ""texture coordinates as follows: s = (N dot H) ; t = (N dot L) ""where N is the vertex normal, L is the light-to-vertex vector, ""H is the half-way vector. This is a good example of how you ""can use the State::getInitialViewMatrix() method to retrieve ""the view matrix and perform view-dependant effects without ""fakes of any kind.\n""This effect requires the ARB_vertex_program extension.","Marco Jez")
osg::ImagegetLightingMap ()
const osg::ImagegetLightingMap () const
void setLightingMap (osg::Image *image)
int getLightNumber () const
void setLightNumber (int n)

Protected Member Functions

virtual ~AnisotropicLighting ()
AnisotropicLightingoperator= (const AnisotropicLighting &)
bool define_techniques ()

Detailed Description

This single-pass effect implements a sort of anisotropic lighting that replaces the standard OpenGL lighting model. The final color of vertices is not computed directly, it is the result of a texture lookup on a user-supplied lighting image map. A vertex program is used to compute the s and t texture coordinates as follows: s = (N dot H) ; t = (N dot L) where N is the vertex normal, L is the light-to-vertex vector, H is the half-way vector. This is a good example of how you can use the State::getInitialViewMatrix() method to retrieve the view matrix and perform view-dependant effects without fakes of any kind. This effect requires the ARB_vertex_program extension.


Constructor & Destructor Documentation

osgFX::AnisotropicLighting::AnisotropicLighting (  ) 

osgFX::AnisotropicLighting::AnisotropicLighting ( const AnisotropicLighting copy,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

virtual osgFX::AnisotropicLighting::~AnisotropicLighting (  )  [inline, protected, virtual]


Member Function Documentation

bool osgFX::AnisotropicLighting::define_techniques (  )  [protected, virtual]

abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect. You will usually call addTechnique() inside this method.

Implements osgFX::Effect.

const osg::Image * osgFX::AnisotropicLighting::getLightingMap (  )  const [inline]

get the const lighting map

osg::Image * osgFX::AnisotropicLighting::getLightingMap (  )  [inline]

get the lighting map

int osgFX::AnisotropicLighting::getLightNumber (  )  const [inline]

get the OpenGL light number

osgFX::AnisotropicLighting::META_Effect ( osgFX  ,
AnisotropicLighting  ,
"Anisotropic Lighting"  ,
"This single-pass effect implements a sort of anisotropic ""lighting that replaces the standard OpenGL lighting model.\n""The final color of vertices is not computed   directly,
it is""the result of a texture lookup on a user-supplied lighting""image map.A vertex program is used to compute the s and t""texture coordinates as follows:s  = (N dot H) ; t = (N dot L) ""where N is the vertex normal,
L is the light-to-vertex  vector,
""H is the half-way vector.This is a good example of how you""can use the State::getInitialViewMatrix() method to retrieve""the view matrix and perform view-dependant effects without""fakes of any kind.\n""This effect requires the ARB_vertex_program extension."  ,
"Marco Jez"   
)

AnisotropicLighting& osgFX::AnisotropicLighting::operator= ( const AnisotropicLighting  )  [inline, protected]

void osgFX::AnisotropicLighting::setLightingMap ( osg::Image image  )  [inline]

set the lighting map

void osgFX::AnisotropicLighting::setLightNumber ( int  n  )  [inline]

set the OpenGL light number that will be used in lighting computations


The documentation for this class was generated from the following file:
Generated on Sun Oct 1 13:17:09 2006 for openscenegraph by  doxygen 1.4.7