Mercator  0.4.0
Public Types | Public Member Functions | List of all members
Mercator::TileShader Class Reference

Shader agregating surface data. More...

#include <TileShader.h>

Inheritance diagram for Mercator::TileShader:
Mercator::Shader

Public Types

typedef std::map< int, Shader * > Shaderstore
 STL map to store sparse array of Shader pointers.
 
- Public Types inherited from Mercator::Shader
typedef std::map< std::string, float > Parameters
 STL map of parameter values for a shader constructor.
 

Public Member Functions

void addShader (Shader *t, int id)
 Add a shader to those agregated by the tile shader.
 
bool checkIntersect (const Segment &) const override
 Check whether this Shader has any effect on the given Segment. More...
 
void shade (Surface &) const override
 Populate a Surface with data.
 
- Public Member Functions inherited from Mercator::Shader
virtual ~Shader ()
 Destructor does nothing interesting.
 
bool getColor () const
 Accessor for color flag.
 
bool getAlpha () const
 Accessor for alpha flag.
 
SurfacenewSurface (const Segment &) const
 Create a new Surface which matches the requirements of this shader. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mercator::Shader
 Shader (bool color=false, bool alpha=true)
 Protected constructor for classes which inherit from this one. More...
 

Detailed Description

Shader agregating surface data.

Some applications require the terrain surface data be stored in a single buffer so specific locations can be queried to determine the type. Typically this is used on a server, where lots of surface data optimised for rendering is not required, but fast cheap queries about the surface at a specific point are required.

Member Function Documentation

bool Mercator::TileShader::checkIntersect ( const Segment ) const
overridevirtual

Check whether this Shader has any effect on the given Segment.

Returns
true if the given Segment height range is within the range that this Shader uses. e.g. A high altitude snow shader will have no effect on low level terrain.

Implements Mercator::Shader.


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