Blender V4.3
StrokeTesselator.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
12#include "Stroke.h"
13
15
16#ifdef WITH_CXX_GUARDEDALLOC
17# include "MEM_guardedalloc.h"
18#endif
19
20namespace Freestyle {
21
23 public:
25 {
26 _FrsMaterial.setDiffuse(0, 0, 0, 1);
27 _overloadFrsMaterial = false;
28 }
29
30 virtual ~StrokeTesselator() {}
31
33 LineRep *Tesselate(Stroke *iStroke);
34
38 template<class StrokeIterator> NodeGroup *Tesselate(StrokeIterator begin, StrokeIterator end);
39
40 inline void setFrsMaterial(const FrsMaterial &iMaterial)
41 {
42 _FrsMaterial = iMaterial;
43 _overloadFrsMaterial = true;
44 }
45
46 inline const FrsMaterial &frs_material() const
47 {
48 return _FrsMaterial;
49 }
50
51 private:
52 FrsMaterial _FrsMaterial;
53 bool _overloadFrsMaterial;
54
55#ifdef WITH_CXX_GUARDEDALLOC
56 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeTesselator")
57#endif
58};
59
60} /* namespace Freestyle */
Class to define the representation of 3D Line.
Read Guarded memory(de)allocation.
Classes to define a stroke.
void setDiffuse(float r, float g, float b, float a)
LineRep * Tesselate(Stroke *iStroke)
NodeGroup * Tesselate(StrokeIterator begin, StrokeIterator end)
void setFrsMaterial(const FrsMaterial &iMaterial)
const FrsMaterial & frs_material() const
inherits from class Rep
Definition AppCanvas.cpp:20