Loading...
Searching...
No Matches
Ogre::TerrainMaterialGeneratorA Class Reference
Optional Components » Terrain

A TerrainMaterialGenerator which can cope with normal mapped, specular mapped terrain. More...

`#include <OgreTerrainMaterialGeneratorA.h>`

Inheritance diagram for Ogre::TerrainMaterialGeneratorA:
[legend]

## Classes

class | SM2Profile
| Shader model 2 profile target. More...

## Public Member Functions

| TerrainMaterialGeneratorA ()
virtual | ~TerrainMaterialGeneratorA ()
MaterialPtr | generate (const Terrain *terrain) override
| Generate a material for the given terrain using the active profile.
MaterialPtr | generateForCompositeMap (const Terrain *terrain) override
| Generate a material for the given composite map of the terrain using the active profile.
Profile * | getActiveProfile () const override
| Get the active profile.
RTShader::RenderState * | getMainRenderState () const
uint8 | getMaxLayers (const Terrain *terrain) const override
| Get the maximum number of layers supported with the given terrain.
bool | getReceiveDynamicShadowsEnabled () const
| Whether to support dynamic texture shadows received from other objects, on the terrain (default true).
bool | getReceiveDynamicShadowsLowLod () const
| Whether to use shadows on low LOD material rendering (when using composite map) (default false).
bool | isCompositeMapEnabled () const
bool | isLightmapEnabled () const
bool | isVertexCompressionSupported () const override
| Return whether this material generator supports using a compressed vertex format.
void | requestOptions (Terrain *terrain) override
| Triggers the generator to request the options that it needs.
void | setCompositeMapEnabled (bool enabled)
| Whether to use the composite map to provide a lower LOD technique in the distance (default true).
void | setLayerNormalMappingEnabled (bool enabled)
| Whether to support normal mapping per layer in the shader (default true).
void | setLayerSpecularMappingEnabled (bool enabled)
| Whether to support specular mapping per layer in the shader (default true).
void | setLightmapEnabled (bool enabled) override
| Whether to support a light map over the terrain in the shader, if it's present (default true).
void | setReceiveDynamicShadowsEnabled (bool enabled)
| Whether to support dynamic texture shadows received from other objects, on the terrain (default true).
void | setReceiveDynamicShadowsLowLod (bool enabled)
| Whether to use shadows on low LOD material rendering (when using composite map) (default false).
void | updateParams (const MaterialPtr &mat, const Terrain *terrain) override
| Update parameters for the given terrain using the active profile.
void | updateParamsForCompositeMap (const MaterialPtr &mat, const Terrain *terrain) override
| Update parameters for the given terrain composite map using the active profile.
Public Member Functions inherited from Ogre::TerrainMaterialGenerator
| TerrainMaterialGenerator ()
virtual | ~TerrainMaterialGenerator ()
Texture * | _getCompositeMapRTT ()
void | _markChanged ()
| Internal method - indicates that a change has been made that would require material regeneration.
void | _renderCompositeMap (size_t size, const Rect &rect, const MaterialPtr &mat, const TexturePtr &destCompositeMap)
| Helper method to render a composite map.
unsigned long long int | getChangeCount () const
| Returns the number of times the generator has undergone a change which would require materials to be regenerated.
unsigned int | getDebugLevel () const
| Get the debug level of the material.
const TerrainLayerDeclaration & | getLayerDeclaration () const
| Get the layer declaration that this material generator operates with.
void | setDebugLevel (unsigned int dbg)
| Set the debug level of the material.
void | updateCompositeMap (const Terrain *terrain, const Rect &rect)
| Update the composite map for a terrain.

## Detailed Description

A TerrainMaterialGenerator which can cope with normal mapped, specular mapped terrain.

## Constructor & Destructor Documentation

## TerrainMaterialGeneratorA()

Ogre::TerrainMaterialGeneratorA::TerrainMaterialGeneratorA | ( |  | ) |

Referenced by Ogre::TerrainMaterialGeneratorA::SM2Profile::SM2Profile().

## ~TerrainMaterialGeneratorA()

virtual Ogre::TerrainMaterialGeneratorA::~TerrainMaterialGeneratorA | ( |  | ) |

virtual

## Member Function Documentation

## getMainRenderState()

RTShader::RenderState * Ogre::TerrainMaterialGeneratorA::getMainRenderState | ( |  | ) | const

inline

## setLayerNormalMappingEnabled()

void Ogre::TerrainMaterialGeneratorA::setLayerNormalMappingEnabled | ( | bool | enabled | ) |

inline

Whether to support normal mapping per layer in the shader (default true).

## setLayerSpecularMappingEnabled()

void Ogre::TerrainMaterialGeneratorA::setLayerSpecularMappingEnabled | ( | bool | enabled | ) |

inline

Whether to support specular mapping per layer in the shader (default true).

## getReceiveDynamicShadowsEnabled()

bool Ogre::TerrainMaterialGeneratorA::getReceiveDynamicShadowsEnabled | ( |  | ) | const

inline

Whether to support dynamic texture shadows received from other objects, on the terrain (default true).

## setReceiveDynamicShadowsEnabled()

void Ogre::TerrainMaterialGeneratorA::setReceiveDynamicShadowsEnabled | ( | bool | enabled | ) |

Whether to support dynamic texture shadows received from other objects, on the terrain (default true).

## setReceiveDynamicShadowsLowLod()

void Ogre::TerrainMaterialGeneratorA::setReceiveDynamicShadowsLowLod | ( | bool | enabled | ) |

Whether to use shadows on low LOD material rendering (when using composite map) (default false).

## getReceiveDynamicShadowsLowLod()

bool Ogre::TerrainMaterialGeneratorA::getReceiveDynamicShadowsLowLod | ( |  | ) | const

inline

Whether to use shadows on low LOD material rendering (when using composite map) (default false).

## isLightmapEnabled()

bool Ogre::TerrainMaterialGeneratorA::isLightmapEnabled | ( |  | ) | const

inline

## setCompositeMapEnabled()

void Ogre::TerrainMaterialGeneratorA::setCompositeMapEnabled | ( | bool | enabled | ) |

Whether to use the composite map to provide a lower LOD technique in the distance (default true).

## isCompositeMapEnabled()

bool Ogre::TerrainMaterialGeneratorA::isCompositeMapEnabled | ( |  | ) | const

inline

## getActiveProfile()

Profile * Ogre::TerrainMaterialGeneratorA::getActiveProfile | ( |  | ) | const

inline override virtual

Get the active profile.

Reimplemented from Ogre::TerrainMaterialGenerator.

## isVertexCompressionSupported()

bool Ogre::TerrainMaterialGeneratorA::isVertexCompressionSupported | ( |  | ) | const

inline override virtual

Return whether this material generator supports using a compressed vertex format.

This is only possible when using shaders.

Reimplemented from Ogre::TerrainMaterialGenerator.

## requestOptions()

void Ogre::TerrainMaterialGeneratorA::requestOptions | ( | Terrain * | terrain | ) |

override virtual

Triggers the generator to request the options that it needs.

Reimplemented from Ogre::TerrainMaterialGenerator.

## generate()

MaterialPtr Ogre::TerrainMaterialGeneratorA::generate | ( | const Terrain * | terrain | ) |

inline override virtual

Generate a material for the given terrain using the active profile.

Implements Ogre::TerrainMaterialGenerator.

## generateForCompositeMap()

MaterialPtr Ogre::TerrainMaterialGeneratorA::generateForCompositeMap | ( | const Terrain * | terrain | ) |

override virtual

Generate a material for the given composite map of the terrain using the active profile.

Implements Ogre::TerrainMaterialGenerator.

## setLightmapEnabled()

void Ogre::TerrainMaterialGeneratorA::setLightmapEnabled | ( | bool | enabled | ) |

override virtual

Whether to support a light map over the terrain in the shader, if it's present (default true).

Reimplemented from Ogre::TerrainMaterialGenerator.

## getMaxLayers()

uint8 Ogre::TerrainMaterialGeneratorA::getMaxLayers | ( | const Terrain * | terrain | ) | const

inline override virtual

Get the maximum number of layers supported with the given terrain.

Note
  When you change the options on the terrain, this value can change.

Reimplemented from Ogre::TerrainMaterialGenerator.

## updateParams()

void Ogre::TerrainMaterialGeneratorA::updateParams | ( | const MaterialPtr & | mat,
|  | const Terrain * | terrain )

override virtual

Update parameters for the given terrain using the active profile.

Reimplemented from Ogre::TerrainMaterialGenerator.

## updateParamsForCompositeMap()

void Ogre::TerrainMaterialGeneratorA::updateParamsForCompositeMap | ( | const MaterialPtr & | mat,
|  | const Terrain * | terrain )

override virtual

Update parameters for the given terrain composite map using the active profile.

Reimplemented from Ogre::TerrainMaterialGenerator.

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

- OgreTerrainMaterialGeneratorA.h