Blender V5.0
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
11
12#include "Stroke.h"
13
15
16#include "MEM_guardedalloc.h"
17
18namespace Freestyle {
19
21 public:
23 {
24 _FrsMaterial.setDiffuse(0, 0, 0, 1);
25 _overloadFrsMaterial = false;
26 }
27
28 virtual ~StrokeTesselator() {}
29
31 LineRep *Tesselate(Stroke *iStroke);
32
36 template<class StrokeIterator> NodeGroup *Tesselate(StrokeIterator begin, StrokeIterator end);
37
38 inline void setFrsMaterial(const FrsMaterial &iMaterial)
39 {
40 _FrsMaterial = iMaterial;
41 _overloadFrsMaterial = true;
42 }
43
44 inline const FrsMaterial &frs_material() const
45 {
46 return _FrsMaterial;
47 }
48
49 private:
50 FrsMaterial _FrsMaterial;
51 bool _overloadFrsMaterial;
52
53 MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:StrokeTesselator")
54};
55
56} /* namespace Freestyle */
Class to define the representation of 3D Line.
Read Guarded memory(de)allocation.
Classes to define a stroke.
iter begin(iter)
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