File: AreaShader.h

package info (click to toggle)
mercator 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,008 kB
  • sloc: sh: 10,433; cpp: 4,482; makefile: 115
file content (37 lines) | stat: -rw-r--r-- 799 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2005 Alistair Riddoch

#ifndef MERCATOR_AREASHADER_H
#define MERCATOR_AREASHADER_H

#include <Mercator/Shader.h>

namespace Mercator
{

class Area;

/// \brief Shader for handling areas.
class AreaShader : public Shader
{
public:
    /// \brief Constructor
    ///
    /// @param layer layer number.
    AreaShader(int layer);
    
    virtual void shade(Surface &s) const;
    
    virtual bool checkIntersect(const Segment &) const;
private:
    /// helper to shader a single area into the surface
    void shadeArea(Surface& s, const Area* const ar) const;
    
    /// The layer number.
    int m_layer;
};

}

#endif // of MERCATOR_AREASHADER_H