2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2008-2022 Blender Authors
|
2023-06-14 23:30:43 +10:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2008-04-30 15:41:54 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup freestyle
|
|
|
|
|
* \brief Class to display an oriented line representation.
|
2012-12-28 20:21:05 +00:00
|
|
|
*/
|
2008-04-30 15:41:54 +00:00
|
|
|
|
|
|
|
|
#include "OrientedLineRep.h"
|
2012-12-28 20:21:05 +00:00
|
|
|
|
2008-04-30 15:41:54 +00:00
|
|
|
#include "../system/BaseObject.h"
|
|
|
|
|
|
2013-04-09 00:46:49 +00:00
|
|
|
namespace Freestyle {
|
|
|
|
|
|
2012-12-28 20:21:05 +00:00
|
|
|
void OrientedLineRep::accept(SceneVisitor &v)
|
|
|
|
|
{
|
2020-08-07 17:59:12 +02:00
|
|
|
Rep::accept(v); // NOLINT(bugprone-parent-virtual-call), this seems to intentionally *not* call
|
|
|
|
|
// the parent class' accept() function, but rather the grandparent's. The
|
|
|
|
|
// v.visitLineRep(*this); call below is actually what the parent class would do.
|
2019-05-31 22:51:19 +10:00
|
|
|
if (!frs_material()) {
|
2012-12-28 20:21:05 +00:00
|
|
|
v.visitOrientedLineRep(*this);
|
2019-05-31 22:51:19 +10:00
|
|
|
}
|
|
|
|
|
else {
|
2012-12-28 20:21:05 +00:00
|
|
|
v.visitLineRep(*this);
|
2019-05-31 22:51:19 +10:00
|
|
|
}
|
2008-04-30 15:41:54 +00:00
|
|
|
}
|
2013-04-09 00:46:49 +00:00
|
|
|
|
|
|
|
|
} /* namespace Freestyle */
|