Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
43 lines
821 B
C++
43 lines
821 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup freestyle
|
|
* \brief Class to build a shape node. It contains a Rep, which is the shape geometry
|
|
*/
|
|
|
|
#include "NodeShape.h"
|
|
|
|
namespace Freestyle {
|
|
|
|
NodeShape::~NodeShape()
|
|
{
|
|
vector<Rep *>::iterator rep;
|
|
|
|
if (!_Shapes.empty()) {
|
|
for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
|
|
int refCount = (*rep)->destroy();
|
|
if (0 == refCount) {
|
|
delete (*rep);
|
|
}
|
|
}
|
|
|
|
_Shapes.clear();
|
|
}
|
|
}
|
|
|
|
void NodeShape::accept(SceneVisitor &v)
|
|
{
|
|
v.visitNodeShape(*this);
|
|
|
|
v.visitFrsMaterial(_FrsMaterial);
|
|
|
|
v.visitNodeShapeBefore(*this);
|
|
vector<Rep *>::iterator rep;
|
|
for (rep = _Shapes.begin(); rep != _Shapes.end(); ++rep) {
|
|
(*rep)->accept(v);
|
|
}
|
|
v.visitNodeShapeAfter(*this);
|
|
}
|
|
|
|
} /* namespace Freestyle */
|