diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-08 02:09:26 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-08 02:29:02 +0300 |
commit | 4a22faf15a0cd027f724d515d06b24ba47cac03c (patch) | |
tree | 2f5fe18a57b9523eb1339284a05dab2d199d5db4 /source/blender/compositor/operations/COM_MapRangeOperation.cc | |
parent | 12a5a605572d742335a4978966444d393792cd28 (diff) |
Cleanup: Convert camelCase naming to snake_case in Compositortemp-compositor-cleanups
To follow the style guide.
Diffstat (limited to 'source/blender/compositor/operations/COM_MapRangeOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_MapRangeOperation.cc | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cc b/source/blender/compositor/operations/COM_MapRangeOperation.cc index 0fcdbd1fd99..e8ce1f100c3 100644 --- a/source/blender/compositor/operations/COM_MapRangeOperation.cc +++ b/source/blender/compositor/operations/COM_MapRangeOperation.cc @@ -22,45 +22,45 @@ namespace blender::compositor { MapRangeOperation::MapRangeOperation() { - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addOutputSocket(DataType::Value); - inputOperation_ = nullptr; - useClamp_ = false; + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_output_socket(DataType::Value); + input_operation_ = nullptr; + use_clamp_ = false; flags.can_be_constant = true; } -void MapRangeOperation::initExecution() +void MapRangeOperation::init_execution() { - inputOperation_ = this->getInputSocketReader(0); - sourceMinOperation_ = this->getInputSocketReader(1); - sourceMaxOperation_ = this->getInputSocketReader(2); - destMinOperation_ = this->getInputSocketReader(3); - destMaxOperation_ = this->getInputSocketReader(4); + input_operation_ = this->get_input_socket_reader(0); + source_min_operation_ = this->get_input_socket_reader(1); + source_max_operation_ = this->get_input_socket_reader(2); + dest_min_operation_ = this->get_input_socket_reader(3); + dest_max_operation_ = this->get_input_socket_reader(4); } /* The code below assumes all data is inside range +- this, and that input buffer is single channel */ #define BLENDER_ZMAX 10000.0f -void MapRangeOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void MapRangeOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { float inputs[8]; /* includes the 5 inputs + 3 pads */ float value; float source_min, source_max; float dest_min, dest_max; - inputOperation_->readSampled(inputs, x, y, sampler); - sourceMinOperation_->readSampled(inputs + 1, x, y, sampler); - sourceMaxOperation_->readSampled(inputs + 2, x, y, sampler); - destMinOperation_->readSampled(inputs + 3, x, y, sampler); - destMaxOperation_->readSampled(inputs + 4, x, y, sampler); + input_operation_->read_sampled(inputs, x, y, sampler); + source_min_operation_->read_sampled(inputs + 1, x, y, sampler); + source_max_operation_->read_sampled(inputs + 2, x, y, sampler); + dest_min_operation_->read_sampled(inputs + 3, x, y, sampler); + dest_max_operation_->read_sampled(inputs + 4, x, y, sampler); value = inputs[0]; source_min = inputs[1]; @@ -84,7 +84,7 @@ void MapRangeOperation::executePixelSampled(float output[4], value = dest_min; } - if (useClamp_) { + if (use_clamp_) { if (dest_max > dest_min) { CLAMP(value, dest_min, dest_max); } @@ -96,13 +96,13 @@ void MapRangeOperation::executePixelSampled(float output[4], output[0] = value; } -void MapRangeOperation::deinitExecution() +void MapRangeOperation::deinit_execution() { - inputOperation_ = nullptr; - sourceMinOperation_ = nullptr; - sourceMaxOperation_ = nullptr; - destMinOperation_ = nullptr; - destMaxOperation_ = nullptr; + input_operation_ = nullptr; + source_min_operation_ = nullptr; + source_max_operation_ = nullptr; + dest_min_operation_ = nullptr; + dest_max_operation_ = nullptr; } void MapRangeOperation::update_memory_buffer_partial(MemoryBuffer *output, @@ -131,7 +131,7 @@ void MapRangeOperation::update_memory_buffer_partial(MemoryBuffer *output, value = dest_min; } - if (useClamp_) { + if (use_clamp_) { if (dest_max > dest_min) { CLAMP(value, dest_min, dest_max); } |