Blender  V2.93
OccluderSource.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
24 #include "../geometry/GridHelpers.h"
25 
26 #include "../winged_edge/WEdge.h"
27 
28 #ifdef WITH_CXX_GUARDEDALLOC
29 # include "MEM_guardedalloc.h"
30 #endif
31 
32 namespace Freestyle {
33 
35  // Disallow copying and assignment
36  OccluderSource(const OccluderSource &other);
37  OccluderSource &operator=(const OccluderSource &other);
38 
39  public:
41  virtual ~OccluderSource();
42 
43  void begin();
44  virtual bool next();
45  bool isValid();
46 
47  WFace *getWFace();
50 
51  virtual void getOccluderProscenium(real proscenium[4]);
52  virtual real averageOccluderArea();
53 
54  protected:
56  vector<WShape *>::const_iterator currentShape, shapesEnd;
57  vector<WFace *>::const_iterator currentFace, facesEnd;
58 
59  bool valid;
60 
63 
64  void buildCachedPolygon();
65 
66 #ifdef WITH_CXX_GUARDEDALLOC
67  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OccluderSource")
68 #endif
69 };
70 
71 } /* namespace Freestyle */
Read Guarded memory(de)allocation.
vector< WFace * >::const_iterator currentFace
vector< WFace * >::const_iterator facesEnd
virtual real averageOccluderArea()
virtual void getOccluderProscenium(real proscenium[4])
vector< WShape * >::const_iterator shapesEnd
vector< WShape * >::const_iterator currentShape
const GridHelpers::Transform & transform
inherits from class Rep
Definition: AppCanvas.cpp:32
double real
Definition: Precision.h:26