OpenMW
Public Member Functions | Private Member Functions | Private Attributes
Terrain::MaterialGenerator Class Reference

#include <material.hpp>

List of all members.

Public Member Functions

 MaterialGenerator (bool shaders)
void setLayerList (const std::vector< LayerInfo > &layerList)
bool hasLayers ()
void setBlendmapList (const std::vector< Ogre::TexturePtr > &blendmapList)
const std::vector
< Ogre::TexturePtr > & 
getBlendmapList ()
void setCompositeMap (const std::string &name)
void enableShadows (bool shadows)
void enableNormalMapping (bool normalMapping)
void enableParallaxMapping (bool parallaxMapping)
void enableSplitShadows (bool splitShadows)
Ogre::MaterialPtr generate (Ogre::MaterialPtr mat)
Ogre::MaterialPtr generateForCompositeMap (Ogre::MaterialPtr mat)
Ogre::MaterialPtr generateForCompositeMapRTT (Ogre::MaterialPtr mat)

Private Member Functions

Ogre::MaterialPtr create (Ogre::MaterialPtr mat, bool renderCompositeMap, bool displayCompositeMap)

Private Attributes

std::vector< LayerInfomLayerList
std::vector< Ogre::TexturePtr > mBlendmapList
std::string mCompositeMap
bool mShaders
bool mShadows
bool mSplitShadows
bool mNormalMapping
bool mParallaxMapping

Constructor & Destructor Documentation

Parameters:
layerListlayer textures
blendmapListblend textures
shadersWhether to use shaders. With a shader, blendmap packing can be used (4 channels instead of one), so if this parameter is true, then the supplied blend maps are expected to be packed.

Member Function Documentation

Ogre::MaterialPtr Terrain::MaterialGenerator::create ( Ogre::MaterialPtr  mat,
bool  renderCompositeMap,
bool  displayCompositeMap 
) [private]
void Terrain::MaterialGenerator::enableNormalMapping ( bool  normalMapping) [inline]
void Terrain::MaterialGenerator::enableParallaxMapping ( bool  parallaxMapping) [inline]
void Terrain::MaterialGenerator::enableShadows ( bool  shadows) [inline]
void Terrain::MaterialGenerator::enableSplitShadows ( bool  splitShadows) [inline]
Ogre::MaterialPtr Terrain::MaterialGenerator::generate ( Ogre::MaterialPtr  mat)

Creates a material suitable for displaying a chunk of terrain using alpha-blending.

Parameters:
matMaterial that will be replaced by the generated material. May be empty as well, in which case a new material is created.
Ogre::MaterialPtr Terrain::MaterialGenerator::generateForCompositeMap ( Ogre::MaterialPtr  mat)

Creates a material suitable for displaying a chunk of terrain using a ready-made composite map.

Parameters:
matMaterial that will be replaced by the generated material. May be empty as well, in which case a new material is created.
Ogre::MaterialPtr Terrain::MaterialGenerator::generateForCompositeMapRTT ( Ogre::MaterialPtr  mat)

Creates a material suitable for rendering composite maps, i.e. for "baking" several layer textures into one. The main difference compared to a normal material is that no shading is applied at this point.

Parameters:
matMaterial that will be replaced by the generated material. May be empty as well, in which case a new material is created.
const std::vector<Ogre::TexturePtr>& Terrain::MaterialGenerator::getBlendmapList ( ) [inline]
void Terrain::MaterialGenerator::setBlendmapList ( const std::vector< Ogre::TexturePtr > &  blendmapList) [inline]
void Terrain::MaterialGenerator::setCompositeMap ( const std::string &  name) [inline]
void Terrain::MaterialGenerator::setLayerList ( const std::vector< LayerInfo > &  layerList) [inline]

Member Data Documentation

std::vector<Ogre::TexturePtr> Terrain::MaterialGenerator::mBlendmapList [private]

The documentation for this class was generated from the following files: