Fix for a static variable in BlenderStrokeRenderer::RenderStrokeRep() left after
[blender.git] / source / blender / freestyle / intern / view_map / Pow23GridDensityProvider.h
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * The Original Code is Copyright (C) 2010 Blender Foundation.
19  * All rights reserved.
20  *
21  * The Original Code is: all of this file.
22  *
23  * Contributor(s): none yet.
24  *
25  * ***** END GPL LICENSE BLOCK *****
26  */
27
28 #ifndef __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__
29 #define __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__
30
31 /** \file blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
32  *  \ingroup freestyle
33  *  \brief Class to define a cell grid surrounding the projected image of a scene
34  *  \author Alexander Beels
35  *  \date 2011-2-8
36  */
37
38 #include "GridDensityProvider.h"
39
40 class Pow23GridDensityProvider : public GridDensityProvider
41 {
42         // Disallow copying and assignment
43         Pow23GridDensityProvider(const Pow23GridDensityProvider& other);
44         Pow23GridDensityProvider& operator=(const Pow23GridDensityProvider& other);
45
46 public:
47         Pow23GridDensityProvider(OccluderSource& source, const real proscenium[4], unsigned numFaces);
48         Pow23GridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox, const GridHelpers::Transform& transform,
49                                  unsigned numFaces);
50         Pow23GridDensityProvider(OccluderSource& source, unsigned numFaces);
51         virtual ~Pow23GridDensityProvider();
52
53 protected:
54         unsigned numFaces;
55
56 private:
57         void initialize(const real proscenium[4]);
58 };
59
60 class Pow23GridDensityProviderFactory : public GridDensityProviderFactory
61 {
62 public:
63         Pow23GridDensityProviderFactory(unsigned numFaces);
64         ~Pow23GridDensityProviderFactory();
65
66         auto_ptr<GridDensityProvider> newGridDensityProvider(OccluderSource& source, const real proscenium[4]);
67         auto_ptr<GridDensityProvider> newGridDensityProvider(OccluderSource& source, const BBox<Vec3r>& bbox,
68                                                              const GridHelpers::Transform& transform);
69         auto_ptr<GridDensityProvider> newGridDensityProvider(OccluderSource& source);
70
71 protected:
72         unsigned numFaces;
73 };
74
75 #endif // __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__