class OSGFX_EXPORT osgFX::BumpMapping

This effect makes surfaces appear bumpy.

Inheritance:


Public Methods

[more] BumpMapping()
[more] BumpMapping(const BumpMapping &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)
[more] 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")
[more]void prepareGeometry(osg::Geometry* geo)
prepare a Geometry for bump lighting.
[more]void prepareNode(osg::Node* node)
prepare a Node for bump lighting, calling prepareGeometry() for each Geometry
[more]void prepareChildren()
prepare children for bump lighting.
[more]void setUpDemo()
set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates
[more]inline int getLightNumber() const
get the OpenGL light number
[more]inline void setLightNumber(int n)
set the OpenGL light number that will be used in lighting computations
[more]inline int getDiffuseTextureUnit() const
get the texture unit that contains diffuse color texture.
[more]inline void setDiffuseTextureUnit(int n)
set the texture unit that contains diffuse color texture.
[more]inline int getNormalMapTextureUnit() const
get the texture unit that contains normal map texture.
[more]inline void setNormalMapTextureUnit(int n)
set the texture unit that contains normal map texture.
[more]inline osg::Texture2D* getOverrideDiffuseTexture()
get the diffuse color texture that overrides children's texture
[more]inline const osg::Texture2D* getOverrideDiffuseTexture() const
get the const diffuse color texture that overrides children's texture
[more]inline void setOverrideDiffuseTexture(osg::Texture2D* texture)
set the diffuse color texture that overrides children's texture
[more]inline osg::Texture2D* getOverrideNormalMapTexture()
get the normal map texture that overrides children's texture
[more]inline const osg::Texture2D* getOverrideNormalMapTexture() const
get the const normal map texture that overrides children's texture
[more]inline void setOverrideNormalMapTexture(osg::Texture2D* texture)
set the normal map texture that overrides children's texture

Protected Methods

[more]virtual ~BumpMapping()
[more]BumpMapping& operator=(const BumpMapping &)
[more]bool define_techniques()


Inherited from Effect:

Public Classes

oenum TechniqueSelection

Public Methods

ovirtual inline bool isSameKindAs(const osg::Object* obj) const
ovirtual inline const char* libraryName() const
ovirtual inline const char* className() const
ovirtual const char* effectName() const
ovirtual const char* effectDescription() const
ovirtual const char* effectAuthor() const
ovirtual void traverse(osg::NodeVisitor &nv)
oinline bool getEnabled() const
oinline void setEnabled(bool v)
oinline int getNumTechniques() const
oinline Technique* getTechnique(int i)
oinline const Technique* getTechnique(int i) const
oinline int getSelectedTechnique() const
oinline void selectTechnique(int i)
oinline void addTechnique(Technique* tech)
oinline void dirtyTechniques()
oinline void inherited_traverse(osg::NodeVisitor &nv)


Documentation

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. 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.
o BumpMapping()

o BumpMapping(const BumpMapping &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)

o 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")

ovoid prepareGeometry(osg::Geometry* geo)
prepare a Geometry for bump lighting. Tangent-space basis vectors are generated and attached to the geometry as vertex attribute arrays.

ovoid prepareNode(osg::Node* node)
prepare a Node for bump lighting, calling prepareGeometry() for each Geometry

ovoid prepareChildren()
prepare children for bump lighting. Actually calls prepareNode() for each child

ovoid setUpDemo()
set up a demo environment with predefined diffuse and normal maps, as well as texture coordinates

ovirtual ~BumpMapping()

oBumpMapping& operator=(const BumpMapping &)

obool define_techniques()

oinline int getLightNumber() const
get the OpenGL light number

oinline void setLightNumber(int n)
set the OpenGL light number that will be used in lighting computations

oinline int getDiffuseTextureUnit() const
get the texture unit that contains diffuse color texture. Default is 1

oinline void setDiffuseTextureUnit(int n)
set the texture unit that contains diffuse color texture. Default is 1

oinline int getNormalMapTextureUnit() const
get the texture unit that contains normal map texture. Default is 0

oinline void setNormalMapTextureUnit(int n)
set the texture unit that contains normal map texture. Default is 0

oinline osg::Texture2D* getOverrideDiffuseTexture()
get the diffuse color texture that overrides children's texture

oinline const osg::Texture2D* getOverrideDiffuseTexture() const
get the const diffuse color texture that overrides children's texture

oinline void setOverrideDiffuseTexture(osg::Texture2D* texture)
set the diffuse color texture that overrides children's texture

oinline osg::Texture2D* getOverrideNormalMapTexture()
get the normal map texture that overrides children's texture

oinline const osg::Texture2D* getOverrideNormalMapTexture() const
get the const normal map texture that overrides children's texture

oinline void setOverrideNormalMapTexture(osg::Texture2D* texture)
set the normal map texture that overrides children's texture


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.