Inheritance diagram for osgFX::BumpMapping:
Public Member Functions | |
BumpMapping () | |
BumpMapping (const BumpMapping ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Effect (osgFX, BumpMapping,"Bump Mapping","This effect makes surfaces appear bumpy. Children nodes must use two textures, ""one for diffuse color and one for the normal map (which can be created ""from a height map with tools like nVIDIA's normal map generator). Furthermore, ""tangent-space basis vectors must be created and assigned to each Geometry; this ""can be done quickly by calling BumpMapping::prepareChildren(). Note that both ""diffuse and normal map textures must have corresponding UV maps defined in ""Geometry objects.\n""This effect defines a preferred technique which uses ARB vertex & fragment ""programs, and a fallback technique which doesn't use fragment programs. The ""latter is more limited though since it can't handle ambient and specular ""components.","Marco Jez") | |
int | getLightNumber () const |
void | setLightNumber (int n) |
int | getDiffuseTextureUnit () const |
void | setDiffuseTextureUnit (int n) |
int | getNormalMapTextureUnit () const |
void | setNormalMapTextureUnit (int n) |
osg::Texture2D * | getOverrideDiffuseTexture () |
const osg::Texture2D * | getOverrideDiffuseTexture () const |
void | setOverrideDiffuseTexture (osg::Texture2D *texture) |
osg::Texture2D * | getOverrideNormalMapTexture () |
const osg::Texture2D * | getOverrideNormalMapTexture () const |
void | setOverrideNormalMapTexture (osg::Texture2D *texture) |
void | prepareGeometry (osg::Geometry *geo) |
void | prepareNode (osg::Node *node) |
void | prepareChildren () |
void | setUpDemo () |
Protected Member Functions | |
virtual | ~BumpMapping () |
BumpMapping & | operator= (const BumpMapping &) |
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. You will usually call addTechnique() inside this method. Implements osgFX::Effect. |
|
get the texture unit that contains diffuse color texture. Default is 1 |
|
get the OpenGL light number |
|
get the texture unit that contains normal map texture. Default is 0 |
|
get the const diffuse color texture that overrides children's texture |
|
get the diffuse color texture that overrides children's texture |
|
get the const normal map texture that overrides children's texture |
|
get the normal map texture that overrides children's texture |
|
|
|
|
|
prepare children for bump lighting. Actually calls prepareNode() for each child |
|
prepare a Geometry for bump lighting. Tangent-space basis vectors are generated and attached to the geometry as vertex attribute arrays. |
|
prepare a Node for bump lighting, calling prepareGeometry() for each Geometry |
|
set the texture unit that contains diffuse color texture. Default is 1 |
|
set the OpenGL light number that will be used in lighting computations |
|
set the texture unit that contains normal map texture. Default is 0 |
|
set the diffuse color texture that overrides children's texture |
|
set the normal map texture that overrides children's texture |
|
set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates Reimplemented from osgFX::Effect. |