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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgFX::SpecularHighlights Class Reference

This effect applies additive specular highlights at fragment level (instead of OpenGL's vertex-level lighting) by using a cube map and reflective texgen. More...

Inheritance diagram for osgFX::SpecularHighlights:

[legend]
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
| get the OpenGL light number
void | setLightNumber (int n)
| set the OpenGL light number that will be used in lighting computations
int | getTextureUnit () const
| get the texture unit number
void | setTextureUnit (int n)
| set the texture unit that will be used to apply the cube map
const osg::Vec4 & | getSpecularColor () const
| get the specular color
void | setSpecularColor (const osg::Vec4 &color)
| set the specular color
float | getSpecularExponent () const
| get the specular exponent
void | setSpecularExponent (float e)
| set the specular exponent
## Protected Member Functions
virtual | ~SpecularHighlights ()
SpecularHighlights & | operator= (const SpecularHighlights &)
bool | define_techniques ()
| abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect.

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

SpecularHighlights::SpecularHighlights | ( |  | ) |

SpecularHighlights::SpecularHighlights | ( | const SpecularHighlights & | copy,
|  | const osg::CopyOp & | copyop = `osg::CopyOp::SHALLOW_COPY`
| ) |

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

## Member Function Documentation

bool 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 files:

- SpecularHighlights
- SpecularHighlights.cpp