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