Blender  V2.93
COM_BlurBaseOperation.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #pragma once
20 
21 #include "COM_NodeOperation.h"
22 #include "COM_QualityStepHelper.h"
23 
24 #define MAX_GAUSSTAB_RADIUS 30000
25 
26 #include "BLI_simd.h"
27 
28 namespace blender::compositor {
29 
31  private:
32  protected:
33  BlurBaseOperation(DataType data_type);
34  float *make_gausstab(float rad, int size);
35 #ifdef BLI_HAVE_SSE2
36  __m128 *convert_gausstab_sse(const float *gausstab, int size);
37 #endif
38  float *make_dist_fac_inverse(float rad, int size, int falloff);
39 
40  void updateSize();
41 
48 
49  float m_size;
51 
53 
54  public:
58  void initExecution() override;
59 
63  void deinitExecution() override;
64 
65  void setData(const NodeBlurData *data);
66 
67  void setSize(float size)
68  {
69  this->m_size = size;
70  this->m_sizeavailable = true;
71  }
72 
73  void setExtendBounds(bool extend_bounds)
74  {
75  this->m_extend_bounds = extend_bounds;
76  }
77 
78  void determineResolution(unsigned int resolution[2],
79  unsigned int preferredResolution[2]) override;
80 };
81 
82 } // namespace blender::compositor
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
float * make_gausstab(float rad, int size)
void setData(const NodeBlurData *data)
void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) override
determine the resolution of this node
float * make_dist_fac_inverse(float rad, int size, int falloff)
NodeOperation contains calculation logic.
DataType
possible data types for sockets
Definition: COM_defines.h:27