Blender  V2.93
StrokeTesselator.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 "Stroke.h"
25 
26 #include "../scene_graph/LineRep.h"
27 
28 #ifdef WITH_CXX_GUARDEDALLOC
29 # include "MEM_guardedalloc.h"
30 #endif
31 
32 namespace Freestyle {
33 
35  public:
37  {
38  _FrsMaterial.setDiffuse(0, 0, 0, 1);
39  _overloadFrsMaterial = false;
40  }
41 
43  {
44  }
45 
47  LineRep *Tesselate(Stroke *iStroke);
48 
52  template<class StrokeIterator> NodeGroup *Tesselate(StrokeIterator begin, StrokeIterator end);
53 
54  inline void setFrsMaterial(const FrsMaterial &iMaterial)
55  {
56  _FrsMaterial = iMaterial;
57  _overloadFrsMaterial = true;
58  }
59 
60  inline const FrsMaterial &frs_material() const
61  {
62  return _FrsMaterial;
63  }
64 
65  private:
66  FrsMaterial _FrsMaterial;
67  bool _overloadFrsMaterial;
68 
69 #ifdef WITH_CXX_GUARDEDALLOC
70  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeTesselator")
71 #endif
72 };
73 
74 } /* namespace Freestyle */
Read Guarded memory(de)allocation.
Classes to define a stroke.
void setDiffuse(const float r, const float g, const float b, const float a)
Definition: FrsMaterial.h:388
NodeGroup * Tesselate(StrokeIterator begin, StrokeIterator end)
LineRep * Tesselate(Stroke *iStroke)
const FrsMaterial & frs_material() const
void setFrsMaterial(const FrsMaterial &iMaterial)
inherits from class Rep
Definition: AppCanvas.cpp:32