diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/operations/COM_MathBaseOperation.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (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_MathBaseOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_MathBaseOperation.h | 273 |
1 files changed, 162 insertions, 111 deletions
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.h b/source/blender/compositor/operations/COM_MathBaseOperation.h index 7306a166e87..7c11ea8f45b 100644 --- a/source/blender/compositor/operations/COM_MathBaseOperation.h +++ b/source/blender/compositor/operations/COM_MathBaseOperation.h @@ -20,179 +20,230 @@ #define __COM_MATHBASEOPERATION_H__ #include "COM_NodeOperation.h" - /** * this program converts an input color to an output value. * it assumes we are in sRGB color space. */ class MathBaseOperation : public NodeOperation { -protected: - /** - * Prefetched reference to the inputProgram - */ - SocketReader *m_inputValue1Operation; - SocketReader *m_inputValue2Operation; - - bool m_useClamp; - -protected: - /** - * Default constructor - */ - MathBaseOperation(); - - void clampIfNeeded(float color[4]); -public: - /** - * the inner loop of this program - */ - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) = 0; - - /** - * Initialize the execution - */ - void initExecution(); - - /** - * Deinitialize the execution - */ - void deinitExecution(); - - /** - * Determine resolution - */ - void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); - - void setUseClamp(bool value) { this->m_useClamp = value; } + protected: + /** + * Prefetched reference to the inputProgram + */ + SocketReader *m_inputValue1Operation; + SocketReader *m_inputValue2Operation; + + bool m_useClamp; + + protected: + /** + * Default constructor + */ + MathBaseOperation(); + + void clampIfNeeded(float color[4]); + + public: + /** + * the inner loop of this program + */ + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) = 0; + + /** + * Initialize the execution + */ + void initExecution(); + + /** + * Deinitialize the execution + */ + void deinitExecution(); + + /** + * Determine resolution + */ + void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]); + + void setUseClamp(bool value) + { + this->m_useClamp = value; + } }; class MathAddOperation : public MathBaseOperation { -public: - MathAddOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathAddOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathSubtractOperation : public MathBaseOperation { -public: - MathSubtractOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathSubtractOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMultiplyOperation : public MathBaseOperation { -public: - MathMultiplyOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathMultiplyOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathDivideOperation : public MathBaseOperation { -public: - MathDivideOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathDivideOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathSineOperation : public MathBaseOperation { -public: - MathSineOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathSineOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathCosineOperation : public MathBaseOperation { -public: - MathCosineOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathCosineOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathTangentOperation : public MathBaseOperation { -public: - MathTangentOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathTangentOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcSineOperation : public MathBaseOperation { -public: - MathArcSineOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathArcSineOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcCosineOperation : public MathBaseOperation { -public: - MathArcCosineOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathArcCosineOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcTangentOperation : public MathBaseOperation { -public: - MathArcTangentOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathArcTangentOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathPowerOperation : public MathBaseOperation { -public: - MathPowerOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathPowerOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathLogarithmOperation : public MathBaseOperation { -public: - MathLogarithmOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathLogarithmOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMinimumOperation : public MathBaseOperation { -public: - MathMinimumOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathMinimumOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathMaximumOperation : public MathBaseOperation { -public: - MathMaximumOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathMaximumOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathRoundOperation : public MathBaseOperation { -public: - MathRoundOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathRoundOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathLessThanOperation : public MathBaseOperation { -public: - MathLessThanOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathLessThanOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathGreaterThanOperation : public MathBaseOperation { -public: - MathGreaterThanOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathGreaterThanOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathModuloOperation : public MathBaseOperation { -public: - MathModuloOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathModuloOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathAbsoluteOperation : public MathBaseOperation { -public: - MathAbsoluteOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathAbsoluteOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathArcTan2Operation : public MathBaseOperation { -public: - MathArcTan2Operation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathArcTan2Operation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathFloorOperation : public MathBaseOperation { -public: - MathFloorOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathFloorOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathCeilOperation : public MathBaseOperation { -public: - MathCeilOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathCeilOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathFractOperation : public MathBaseOperation { -public: - MathFractOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathFractOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; class MathSqrtOperation : public MathBaseOperation { -public: - MathSqrtOperation() : MathBaseOperation() {} - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); + public: + MathSqrtOperation() : MathBaseOperation() + { + } + void executePixelSampled(float output[4], float x, float y, PixelSampler sampler); }; #endif |