osgFX::SpecularHighlights Class Reference

Inheritance diagram for osgFX::SpecularHighlights:

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

Public Member Functions

 SpecularHighlights ()
 SpecularHighlights (const SpecularHighlights &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Effect (osgFX, SpecularHighlights,"Specular Highlights","This effect applies additive specular highlights at fragment level (instead ""of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. ""A texture matrix is computed to rotate the cube map automatically; this makes ""the specular effect consistent with respect to view direction and light position. ""The user can choose which light should be used to compute the texture matrix.\n""This effect requires the GL_ARB_texture_env_add extension and one of the cube map ""extensions (GL_EXT_texture_cube_map, GL_ARB_texture_cube_map or OpenGL v1.3).","Marco Jez")
int getLightNumber () const
void setLightNumber (int n)
int getTextureUnit () const
void setTextureUnit (int n)
const osg::Vec4getSpecularColor () const
void setSpecularColor (const osg::Vec4 &color)
float getSpecularExponent () const
void setSpecularExponent (float e)

Protected Member Functions

virtual ~SpecularHighlights ()
SpecularHighlightsoperator= (const SpecularHighlights &)
bool define_techniques ()

Detailed Description

This effect applies additive specular highlights at fragment level (instead of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. A texture matrix is computed to rotate the cube map automatically; this makes the specular effect consistent with respect to view direction and light position. The user can choose which light should be used to compute the texture matrix. This effect requires the GL_ARB_texture_env_add extension and one of the cube map extensions (GL_EXT_texture_cube_map, GL_ARB_texture_cube_map or OpenGL v1.3).


Constructor & Destructor Documentation

osgFX::SpecularHighlights::SpecularHighlights (  ) 

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

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


Member Function Documentation

bool osgFX::SpecularHighlights::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.

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

get the OpenGL light number

const osg::Vec4 & osgFX::SpecularHighlights::getSpecularColor (  )  const [inline]

get the specular color

float osgFX::SpecularHighlights::getSpecularExponent (  )  const [inline]

get the specular exponent

int osgFX::SpecularHighlights::getTextureUnit (  )  const [inline]

get the texture unit number

osgFX::SpecularHighlights::META_Effect ( osgFX  ,
SpecularHighlights  ,
"Specular Highlights"  ,
"This effect applies additive specular highlights at fragment level (instead ""of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. ""A texture matrix is computed to rotate the cube map automatically; this makes ""the specular effect consistent with respect to view direction and light position. ""The user can choose which light should be used to compute the texture matrix.\n""This effect requires the GL_ARB_texture_env_add extension and one of the cube map ""extensions (GL_EXT_texture_cube_map, GL_ARB_texture_cube_map or OpenGL v1.3)."  ,
"Marco Jez"   
)

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

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

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

void osgFX::SpecularHighlights::setSpecularColor ( const osg::Vec4 color  )  [inline]

set the specular color

void osgFX::SpecularHighlights::setSpecularExponent ( float  e  )  [inline]

set the specular exponent

void osgFX::SpecularHighlights::setTextureUnit ( int  n  )  [inline]

set the texture unit that will be used to apply the cube map


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