Blender
V4.3
source
blender
freestyle
intern
geometry
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
12
namespace
Freestyle
{
13
14
void
GridHelpers::getDefaultViewProscenium
(
real
viewProscenium[4])
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
33
GridHelpers::Transform::~Transform() =
default
;
34
35
}
/* namespace Freestyle */
g_freestyle
struct FreestyleGlobals g_freestyle
Definition
FRS_freestyle.cpp:59
GridHelpers.h
Class to define a cell grid surrounding the projected image of a scene.
Freestyle::GridHelpers::getDefaultViewProscenium
void getDefaultViewProscenium(real viewProscenium[4])
Definition
GridHelpers.cpp:14
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
Freestyle::real
double real
Definition
Precision.h:14
FreestyleGlobals::viewport
int viewport[4]
Definition
FRS_freestyle.h:27
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0