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