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 
10 namespace Mercator
11 {
12 
13 class Area;
14 
16 class AreaShader : public Shader
17 {
18 public:
22  explicit AreaShader(int layer);
23 
24  void shade(Surface &s) const override;
25 
26  bool checkIntersect(const Segment &) const override;
27 private:
29  void shadeArea(Surface& s, const Area& ar) const;
30 
32  int m_layer;
33 };
34 
35 }
36 
37 #endif // of MERCATOR_AREASHADER_H
Mercator::AreaShader::shade
void shade(Surface &s) const override
Populate a Surface with data.
Definition: AreaShader.cpp:218
Mercator::Segment
Class storing heightfield and other data for a single fixed size square area of terrain defined by fo...
Definition: Segment.h:37
Mercator::AreaShader
Shader for handling areas.
Definition: AreaShader.h:16
Mercator::Surface
Data store for terrain surface data.
Definition: Surface.h:23
Mercator::Area
Region of terrain surface which is modified.
Definition: Area.h:28
Mercator::AreaShader::checkIntersect
bool checkIntersect(const Segment &) const override
Check whether this Shader has any effect on the given Segment.
Definition: AreaShader.cpp:212
Mercator::AreaShader::AreaShader
AreaShader(int layer)
Constructor.
Definition: AreaShader.cpp:205
Mercator::Shader
Base class for Shader objects which create surface data for use when rendering terrain.
Definition: Shader.h:25