Blender V4.3
COM_algorithm_transform.hh
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#pragma once
6
8
9#include "COM_context.hh"
10#include "COM_domain.hh"
11#include "COM_result.hh"
12
14
15/* Transforms the given result based on the given transformation and realization options, writing
16 * the transformed result to the given output.
17 *
18 * The rotation and scale components of the transformation are realized and the size of the result
19 * is increased/reduced to adapt to the new transformation. For instance, if the transformation is
20 * a rotation, the input will be rotated and expanded in size to account for the bounding box of
21 * the input after rotation. The size of the returned result is bound and clipped by the maximum
22 * possible GPU texture size to avoid allocations that surpass hardware limits, which is typically
23 * 16k.
24 *
25 * The translation component of the transformation is delayed and only stored in the domain of the
26 * result to be realized later when needed, except if the realization options has wrapping enabled,
27 * in which case, the result will be translated such that it is clipped on the one side and wrapped
28 * on the opposite side.
29 *
30 * The empty areas around the image after rotation will either be transparent or repetitions of the
31 * image based on the realization options. */
32void transform(Context &context,
33 Result &input,
34 Result &output,
35 const float3x3 &transformation,
36 RealizationOptions realization_options);
37
38} // namespace blender::realtime_compositor
void transform(Context &context, Result &input, Result &output, const float3x3 &transformation, RealizationOptions realization_options)
MatBase< float, 3, 3 > float3x3