VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | Public Attributes | List of all members
TerrainShaderKey Struct Reference

Selector key which picks the specific terrain shader variant to use. More...

Public Member Functions

bool operator< (const TerrainShaderKey &other) const
 Less than operator for use with QMap. More...
 
 TerrainShaderKey ()
 Construct an empty TerrainShaderKey with default values. More...
 
 TerrainShaderKey (bool hasEdge, bool hasBevel, TerrainMaterialDef::BlendMode blendMode)
 Construct a TerrainShaderKey. More...
 

Public Attributes

bool hasEdge = false
 Whether or not this shader renders edges. More...
 
bool hasBevel = false
 Whether or not this shader renders a bevel section. More...
 
TerrainMaterialDef::BlendMode blendMode = TerrainMaterialDef::BlendMode::Add
 How the blend texture should be composited on to the base texture. More...
 

Detailed Description

Selector key which picks the specific terrain shader variant to use.

See also
TerrainShader::getSharedShader()

Constructor & Destructor Documentation

TerrainShaderKey::TerrainShaderKey ( )

Construct an empty TerrainShaderKey with default values.

TerrainShaderKey::TerrainShaderKey ( bool  hasEdge,
bool  hasBevel,
TerrainMaterialDef::BlendMode  blendMode 
)

Construct a TerrainShaderKey.

Parameters
hasEdgeValue for hasEdge
hasBevelValue for hasBevel
blendModeValue for blendMode

Member Function Documentation

bool TerrainShaderKey::operator< ( const TerrainShaderKey other) const

Less than operator for use with QMap.

Parameters
otherTerrainShaderKey to compare
Returns
true if this is logically less than other

Member Data Documentation

How the blend texture should be composited on to the base texture.

Note
This value has no effect when hasBevel is false.
bool TerrainShaderKey::hasBevel = false

Whether or not this shader renders a bevel section.

TerrainShaders with bevel sections take a blend texture, and additional texture coordinates for that texture.

bool TerrainShaderKey::hasEdge = false

Whether or not this shader renders edges.

TerrainShaders with edges take a mask texture, and additional texture coordinates for that texture.