diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-03 13:05:19 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-07-03 13:05:19 +0400 |
commit | 2f5735a9d4745f33e850a163248c6c18a1305f64 (patch) | |
tree | a6f2712af50c9abcfc3c4853f0bda7c5e04df958 /source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h | |
parent | 63810ffcef825930b034899f54107fc35b159349 (diff) |
Optimized the area of interest of the lensdistortion node.
This will have faster feedback to the user, as lensdistortion is mostly
a node that is located at the end of a composite
Diffstat (limited to 'source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h index 7e4fda0f755..f80b938818c 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.h @@ -66,9 +66,23 @@ public: bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); + /** + * @brief Set the distortion and dispersion and precalc some values + * @param distortion + * @param dispersion + */ + void setDistortionAndDispersion(float distortion, float dispersion) { + this->m_distortion = distortion; + this->m_dispersion = dispersion; + updateVariables(distortion, dispersion); + this->m_valuesAvailable = true; + } + private: - void determineUV(float *result, float x, float y) const; + void determineUV(float result[4], float x, float y) const; + void determineUV(float result[4], float x, float y, float distortion, float dispersion); void updateDispersionAndDistortion(MemoryBuffer **inputBuffers); + void updateVariables(float distortion, float dispersion); }; #endif |