Blender  V3.3
COM_BoxMaskOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
7 
8 namespace blender::compositor {
9 
11  private:
12  using MaskFunc = std::function<float(bool is_inside, const float *mask, const float *value)>;
13 
17  SocketReader *input_mask_;
18  SocketReader *input_value_;
19 
20  float sine_;
21  float cosine_;
22  float aspect_ratio_;
23  int mask_type_;
24 
25  NodeBoxMask *data_;
26 
27  public:
29 
33  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
34 
38  void init_execution() override;
39 
43  void deinit_execution() override;
44 
46  {
47  data_ = data;
48  }
49 
50  void set_mask_type(int mask_type)
51  {
52  mask_type_ = mask_type;
53  }
54 
56  const rcti &area,
57  Span<MemoryBuffer *> inputs) override;
58 
59  private:
60  void apply_mask(MemoryBuffer *output,
61  const rcti &area,
63  MaskFunc mask_func);
64 };
65 
66 } // namespace blender::compositor
typedef float(TangentPoint)[2]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
void update_memory_buffer_partial(MemoryBuffer *output, const rcti &area, Span< MemoryBuffer * > inputs) override
a MemoryBuffer contains access to the data of a chunk
NodeOperation contains calculation logic.
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
T * data_
Definition: eval_output.h:163
static bool is_inside(int x, int y, int cols, int rows)
Definition: filesel.c:706
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
static void area(int d1, int d2, int e1, int e2, float weights[2])
static bNodeSocketTemplate inputs[]