diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_TranslateOperation.h')
-rw-r--r-- | source/blender/compositor/operations/COM_TranslateOperation.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h index 25251ff1d9e..30e489bf395 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.h +++ b/source/blender/compositor/operations/COM_TranslateOperation.h @@ -30,14 +30,14 @@ class TranslateOperation : public MultiThreadedOperation { static constexpr int Y_INPUT_INDEX = 2; private: - SocketReader *inputOperation_; - SocketReader *inputXOperation_; - SocketReader *inputYOperation_; - float deltaX_; - float deltaY_; - bool isDeltaSet_; - float factorX_; - float factorY_; + SocketReader *input_operation_; + SocketReader *input_xoperation_; + SocketReader *input_yoperation_; + float delta_x_; + float delta_y_; + bool is_delta_set_; + float factor_x_; + float factor_y_; protected: MemoryBufferExtend x_extend_mode_; @@ -46,39 +46,39 @@ class TranslateOperation : public MultiThreadedOperation { public: TranslateOperation(); TranslateOperation(DataType data_type, ResizeMode mode = ResizeMode::Center); - bool determineDependingAreaOfInterest(rcti *input, - ReadBufferOperation *readOperation, - rcti *output) override; - void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) override; + bool determine_depending_area_of_interest(rcti *input, + ReadBufferOperation *read_operation, + rcti *output) override; + void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override; - void initExecution() override; - void deinitExecution() override; + void init_execution() override; + void deinit_execution() override; float getDeltaX() { - return deltaX_ * factorX_; + return delta_x_ * factor_x_; } float getDeltaY() { - return deltaY_ * factorY_; + return delta_y_ * factor_y_; } - inline void ensureDelta() + inline void ensure_delta() { - if (!isDeltaSet_) { + if (!is_delta_set_) { if (execution_model_ == eExecutionModel::Tiled) { - float tempDelta[4]; - inputXOperation_->readSampled(tempDelta, 0, 0, PixelSampler::Nearest); - deltaX_ = tempDelta[0]; - inputYOperation_->readSampled(tempDelta, 0, 0, PixelSampler::Nearest); - deltaY_ = tempDelta[0]; + float temp_delta[4]; + input_xoperation_->read_sampled(temp_delta, 0, 0, PixelSampler::Nearest); + delta_x_ = temp_delta[0]; + input_yoperation_->read_sampled(temp_delta, 0, 0, PixelSampler::Nearest); + delta_y_ = temp_delta[0]; } else { - deltaX_ = get_input_operation(X_INPUT_INDEX)->get_constant_value_default(0.0f); - deltaY_ = get_input_operation(Y_INPUT_INDEX)->get_constant_value_default(0.0f); + delta_x_ = get_input_operation(X_INPUT_INDEX)->get_constant_value_default(0.0f); + delta_y_ = get_input_operation(Y_INPUT_INDEX)->get_constant_value_default(0.0f); } - isDeltaSet_ = true; + is_delta_set_ = true; } } |