Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/operations/COM_BokehImageOperation.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/compositor/operations/COM_BokehImageOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.h193
1 files changed, 100 insertions, 93 deletions
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h
index 445dea88cb7..58a1e2f85d8 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.h
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.h
@@ -47,98 +47,105 @@
* With a simple compare it can be detected if the evaluated pixel is between the outer and inner edge.
*/
class BokehImageOperation : public NodeOperation {
-private:
- /**
- * \brief Settings of the bokeh image
- */
- NodeBokehImage *m_data;
-
- /**
- * \brief precalced center of the image
- */
- float m_center[2];
-
- /**
- * \brief 1.0-rounding
- */
- float m_inverseRounding;
-
- /**
- * \brief distance of a full circle lens
- */
- float m_circularDistance;
-
- /**
- * \brief radius when the first flap starts
- */
- float m_flapRad;
-
- /**
- * \brief radians of a single flap
- */
- float m_flapRadAdd;
-
- /**
- * \brief should the m_data field by deleted when this operation is finished
- */
- bool m_deleteData;
-
- /**
- * \brief determine the coordinate of a flap cornder
- *
- * \param r: result in bokehimage space are stored [x,y]
- * \param flapNumber: the flap number to calculate
- * \param distance: the lens distance is used to simulate lens shifts
- */
- void detemineStartPointOfFlap(float r[2], int flapNumber, float distance);
-
- /**
- * \brief Determine if a coordinate is inside the bokeh image
- *
- * \param distance: the distance that will be used. This parameter is modified a bit to mimic lens shifts
- * \param x: the x coordinate of the pixel to evaluate
- * \param y: the y coordinate of the pixel to evaluate
- * \return float range 0..1 0 is completely outside
- */
- float isInsideBokeh(float distance, float x, float y);
-public:
- BokehImageOperation();
-
- /**
- * \brief the inner loop of this program
- */
- void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
-
- /**
- * \brief Initialize the execution
- */
- void initExecution();
-
- /**
- * \brief Deinitialize the execution
- */
- void deinitExecution();
-
- /**
- * \brief determine the resolution of this operation. currently fixed at [COM_BLUR_BOKEH_PIXELS, COM_BLUR_BOKEH_PIXELS]
- * \param resolution:
- * \param preferredResolution:
- */
- void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
-
- /**
- * \brief set the node data
- * \param data:
- */
- void setData(NodeBokehImage *data) { this->m_data = data; }
-
- /**
- * \brief deleteDataOnFinish
- *
- * There are cases that the compositor uses this operation on its own (see defocus node)
- * the deleteDataOnFinish must only be called when the data has been created by the compositor.
- *It should not be called when the data has been created by the node-editor/user.
- */
- void deleteDataOnFinish() { this->m_deleteData = true; }
+ private:
+ /**
+ * \brief Settings of the bokeh image
+ */
+ NodeBokehImage *m_data;
+
+ /**
+ * \brief precalced center of the image
+ */
+ float m_center[2];
+
+ /**
+ * \brief 1.0-rounding
+ */
+ float m_inverseRounding;
+
+ /**
+ * \brief distance of a full circle lens
+ */
+ float m_circularDistance;
+
+ /**
+ * \brief radius when the first flap starts
+ */
+ float m_flapRad;
+
+ /**
+ * \brief radians of a single flap
+ */
+ float m_flapRadAdd;
+
+ /**
+ * \brief should the m_data field by deleted when this operation is finished
+ */
+ bool m_deleteData;
+
+ /**
+ * \brief determine the coordinate of a flap cornder
+ *
+ * \param r: result in bokehimage space are stored [x,y]
+ * \param flapNumber: the flap number to calculate
+ * \param distance: the lens distance is used to simulate lens shifts
+ */
+ void detemineStartPointOfFlap(float r[2], int flapNumber, float distance);
+
+ /**
+ * \brief Determine if a coordinate is inside the bokeh image
+ *
+ * \param distance: the distance that will be used. This parameter is modified a bit to mimic lens shifts
+ * \param x: the x coordinate of the pixel to evaluate
+ * \param y: the y coordinate of the pixel to evaluate
+ * \return float range 0..1 0 is completely outside
+ */
+ float isInsideBokeh(float distance, float x, float y);
+
+ public:
+ BokehImageOperation();
+
+ /**
+ * \brief the inner loop of this program
+ */
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
+
+ /**
+ * \brief Initialize the execution
+ */
+ void initExecution();
+
+ /**
+ * \brief Deinitialize the execution
+ */
+ void deinitExecution();
+
+ /**
+ * \brief determine the resolution of this operation. currently fixed at [COM_BLUR_BOKEH_PIXELS, COM_BLUR_BOKEH_PIXELS]
+ * \param resolution:
+ * \param preferredResolution:
+ */
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
+
+ /**
+ * \brief set the node data
+ * \param data:
+ */
+ void setData(NodeBokehImage *data)
+ {
+ this->m_data = data;
+ }
+
+ /**
+ * \brief deleteDataOnFinish
+ *
+ * There are cases that the compositor uses this operation on its own (see defocus node)
+ * the deleteDataOnFinish must only be called when the data has been created by the compositor.
+ *It should not be called when the data has been created by the node-editor/user.
+ */
+ void deleteDataOnFinish()
+ {
+ this->m_deleteData = true;
+ }
};
#endif