Blender V4.3
NodeShape.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#include "NodeShape.h"
11
12namespace Freestyle {
13
15{
16 vector<Rep *>::iterator rep;
17
18 if (!_Shapes.empty()) {
19 for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
20 int refCount = (*rep)->destroy();
21 if (0 == refCount) {
22 delete (*rep);
23 }
24 }
25
26 _Shapes.clear();
27 }
28}
29
31{
32 v.visitNodeShape(*this);
33
34 v.visitFrsMaterial(_FrsMaterial);
35
36 v.visitNodeShapeBefore(*this);
37 vector<Rep *>::iterator rep;
38 for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
39 (*rep)->accept(v);
40 }
41 v.visitNodeShapeAfter(*this);
42}
43
44} /* namespace Freestyle */
Class to build a shape node. It contains a Rep, which is the shape geometry.
ATTR_WARN_UNUSED_RESULT const BMVert * v
virtual void accept(SceneVisitor &v)
Definition NodeShape.cpp:30
inherits from class Rep
Definition AppCanvas.cpp:20