Blender V4.3
GridHelpers.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#include "GridHelpers.h"
11
12namespace Freestyle {
13
15{
16 // Get proscenium boundary for culling
17 // bufferZone determines the amount by which the area processed should exceed the actual image
18 // area. This is intended to avoid visible artifacts generated along the proscenium edge. Perhaps
19 // this is no longer needed now that entire view edges are culled at once, since that
20 // theoretically should eliminate visible artifacts. To the extent it is still useful, bufferZone
21 // should be put into the UI as configurable percentage value
22 const real bufferZone = 0.05;
23 // borderZone describes a blank border outside the proscenium, but still inside the image area.
24 // Only intended for exposing possible artifacts along or outside the proscenium edge during
25 // debugging.
26 const real borderZone = 0.0;
27 viewProscenium[0] = g_freestyle.viewport[2] * (borderZone - bufferZone);
28 viewProscenium[1] = g_freestyle.viewport[2] * (1.0f - borderZone + bufferZone);
29 viewProscenium[2] = g_freestyle.viewport[3] * (borderZone - bufferZone);
30 viewProscenium[3] = g_freestyle.viewport[3] * (1.0f - borderZone + bufferZone);
31}
32
33GridHelpers::Transform::~Transform() = default;
34
35} /* namespace Freestyle */
struct FreestyleGlobals g_freestyle
Class to define a cell grid surrounding the projected image of a scene.
void getDefaultViewProscenium(real viewProscenium[4])
inherits from class Rep
Definition AppCanvas.cpp:20
double real
Definition Precision.h:14