mercator 0.4.0
A terrain generation library for the Worldforge system.
AreaShader.h
1// This file may be redistributed and modified only under the terms of
2// the GNU General Public License (See COPYING for details).
3// Copyright (C) 2005 Alistair Riddoch
4
5#ifndef MERCATOR_AREASHADER_H
6#define MERCATOR_AREASHADER_H
7
8#include "Shader.h"
9
10namespace Mercator
11{
12
13class Area;
14
16class AreaShader : public Shader
17{
18public:
22 explicit AreaShader(int layer);
23
24 void shade(Surface &s) const override;
25
26 bool checkIntersect(const Segment &) const override;
27private:
29 void shadeArea(Surface& s, const Area& ar) const;
30
32 int m_layer;
33};
34
35}
36
37#endif // of MERCATOR_AREASHADER_H
Shader for handling areas.
Definition: AreaShader.h:17
AreaShader(int layer)
Constructor.
Definition: AreaShader.cpp:205
bool checkIntersect(const Segment &) const override
Check whether this Shader has any effect on the given Segment.
Definition: AreaShader.cpp:212
void shade(Surface &s) const override
Populate a Surface with data.
Definition: AreaShader.cpp:218
Region of terrain surface which is modified.
Definition: Area.h:29
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: Segment.h:37
Base class for Shader objects which create surface data for use when rendering terrain.
Definition: Shader.h:25
Data store for terrain surface data.
Definition: Surface.h:23