Blender V4.3
COM_DotproductOperation.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
7namespace blender::compositor {
8
17
19 const rcti &area,
21{
22 for (BuffersIterator<float> it = output->iterate_with(inputs, area); !it.is_end(); ++it) {
23 const float *input1 = it.in(0);
24 const float *input2 = it.in(1);
25 *it.out = -(input1[0] * input2[0] + input1[1] * input2[1] + input1[2] * input2[2]);
26 }
27}
28
29} // namespace blender::compositor
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
a MemoryBuffer contains access to the data
void add_output_socket(DataType datatype)
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
void set_canvas_input_index(unsigned int index)
set the index of the input socket that will determine the canvas of this operation
@ Vector
Vector data type.
typename BuffersIteratorBuilder< T >::Iterator BuffersIterator