Blender
V4.5
source
blender
compositor
intern
domain.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include "
BLI_math_matrix.hh
"
6
#include "
BLI_math_matrix_types.hh
"
7
#include "
BLI_math_vector_types.hh
"
8
9
#include "
COM_domain.hh
"
10
11
namespace
blender::compositor
{
12
13
Domain::Domain
(
const
int2
&
size
) :
size
(
size
),
transformation
(
float3x3
::
identity
()) {}
14
15
Domain::Domain
(
const
int2
&
size
,
const
float3x3
&
transformation
)
16
:
size
(
size
),
transformation
(
transformation
)
17
{
18
}
19
20
void
Domain::transform
(
const
float3x3
&input_transformation)
21
{
22
transformation
= input_transformation *
transformation
;
23
}
24
25
Domain
Domain::identity
()
26
{
27
return
Domain
(
int2
(1),
float3x3::identity
());
28
}
29
30
bool
Domain::is_equal
(
const
Domain
&a,
const
Domain
&
b
,
const
float
epsilon)
31
{
32
return
a.
size
==
b
.size &&
math::is_equal
(a.
transformation
,
b
.transformation, epsilon);
33
}
34
35
bool
operator==
(
const
Domain
&a,
const
Domain
&
b
)
36
{
37
return
a.
size
==
b
.size && a.
transformation
==
b
.transformation;
38
}
39
40
bool
operator!=
(
const
Domain
&a,
const
Domain
&
b
)
41
{
42
return
!(a ==
b
);
43
}
44
45
}
// namespace blender::compositor
BLI_math_matrix.hh
BLI_math_matrix_types.hh
BLI_math_vector_types.hh
COM_domain.hh
blender::compositor::Domain
Definition
COM_domain.hh:135
blender::compositor::Domain::size
int2 size
Definition
COM_domain.hh:138
blender::compositor::Domain::Domain
Domain(const int2 &size)
Definition
domain.cc:13
blender::compositor::Domain::is_equal
static bool is_equal(const Domain &a, const Domain &b, const float epsilon=0.0f)
Definition
domain.cc:30
blender::compositor::Domain::transformation
float3x3 transformation
Definition
COM_domain.hh:141
blender::compositor::Domain::transform
void transform(const float3x3 &input_transformation)
Definition
domain.cc:20
blender::compositor::Domain::identity
static Domain identity()
Definition
domain.cc:25
b
b
Definition
compositor_morphological_distance_info.hh:24
blender::compositor
Definition
BKE_node.hh:76
blender::compositor::operator==
bool operator==(const BokehKernelKey &a, const BokehKernelKey &b)
Definition
bokeh_kernel.cc:44
blender::compositor::operator!=
bool operator!=(const Domain &a, const Domain &b)
Definition
domain.cc:40
blender::math::is_equal
bool is_equal(const MatBase< T, NumCol, NumRow > &a, const MatBase< T, NumCol, NumRow > &b, const T epsilon=T(0))
Definition
BLI_math_matrix.hh:504
blender::int2
VecBase< int32_t, 2 > int2
Definition
BLI_math_vector_types.hh:601
blender::float3x3
MatBase< float, 3, 3 > float3x3
Definition
BLI_math_matrix_types.hh:1008
blender::MatBase< float, 3, 3 >::identity
static MatBase identity()
Definition
BLI_math_matrix_types.hh:450
Generated on
for Blender by
doxygen
1.15.0