Blender  V3.3
NodeShape.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
8 #include "NodeShape.h"
9 
10 namespace Freestyle {
11 
13 {
14  vector<Rep *>::iterator rep;
15 
16  if (!_Shapes.empty()) {
17  for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
18  int refCount = (*rep)->destroy();
19  if (0 == refCount) {
20  delete (*rep);
21  }
22  }
23 
24  _Shapes.clear();
25  }
26 }
27 
29 {
30  v.visitNodeShape(*this);
31 
32  v.visitFrsMaterial(_FrsMaterial);
33 
34  v.visitNodeShapeBefore(*this);
35  vector<Rep *>::iterator rep;
36  for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
37  (*rep)->accept(v);
38  }
39  v.visitNodeShapeAfter(*this);
40 }
41 
42 } /* 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 ~NodeShape()
Definition: NodeShape.cpp:12
virtual void accept(SceneVisitor &v)
Definition: NodeShape.cpp:28
inherits from class Rep
Definition: AppCanvas.cpp:18