mercator
0.4.0
A terrain generation library for the Worldforge system.
|
Shader that fills the surface. More...
#include <FillShader.h>
Public Types | |
typedef std::map< std::string, float > | Parameters |
STL map of parameter values for a shader constructor. More... | |
Public Member Functions | |
FillShader () | |
Constructor. More... | |
FillShader (const Parameters ¶ms) | |
Constructor. More... | |
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. More... | |
bool | getColor () const |
Accessor for color flag. More... | |
bool | getAlpha () const |
Accessor for alpha flag. More... | |
std::unique_ptr< Surface > | newSurface (const Segment &) const |
Create a new Surface which matches the requirements of this shader. More... | |
Shader that fills the surface.
This shader is typically only used for the lowest possible layer, which is usually bed rock.
Definition at line 16 of file FillShader.h.
|
inherited |
|
explicitdefault |
Constructor.
|
explicit |
Constructor.
params | a map of parameters for the shader. |
Definition at line 14 of file FillShader.cpp.
|
overridevirtual |
Check whether this Shader has any effect on the given Segment.
Implements Mercator::Shader.
Definition at line 20 of file FillShader.cpp.
|
inlineinherited |
|
inlineinherited |
Create a new Surface which matches the requirements of this shader.
Called by terrain when creating a new Segment to add the necessary Surface objects to that Segment.
Definition at line 27 of file Shader.cpp.
Referenced by Mercator::Terrain::addShader().
|
overridevirtual |
Populate a Surface with data.
Implements Mercator::Shader.
Definition at line 25 of file FillShader.cpp.
References Mercator::Buffer< DataType >::getChannels(), Mercator::Buffer< DataType >::getData(), Mercator::Surface::getSegment(), and Mercator::Segment::getSize().