Generates two output signals, each in proportion to an input signal.
More...
#include <filters.hpp>
|
| void | begin (uint8_t mode=INCREMENTAL) |
| | Initializes the ScalingFilter2D with the specified mode. Must be called to set up the filter.
|
| void | set_ratio (ControlParameter ratio) |
| | Sets the scaling ratio between output and input.
|
| void | set_ratio (ControlParameter output_distance, ControlParameter input_distance) |
| | Sets the scaling ratio using output and input distances.
|
|
|
ControlParameter | ratio = 1.0 |
| | ControlParameter scaling output relative to input (output/input). Can be set by calling set_ratio().
|
|
BlockPort | input_1 |
| | First input BlockPort. Map upstream components to this input.
|
|
BlockPort | input_2 |
| | Second input BlockPort. Map upstream components to this input.
|
|
BlockPort | output_1 |
| | First output BlockPort corresponding to the scaled input_1. Map downstream components to this output.
|
|
BlockPort | output_2 |
| | Second output BlockPort corresponding to the scaled input_2. Map downstream components to this output.
|
Generates two output signals, each in proportion to an input signal.
The ScalingFilter2D class scales two input signals by a specified ratio to produce two output signals. This is useful for scaling a motion trajectory in two dimensions.
◆ begin()
| void ScalingFilter2D::begin |
( |
uint8_t | mode = INCREMENTAL | ) |
|
Initializes the ScalingFilter2D with the specified mode. Must be called to set up the filter.
- Parameters
-
| mode | Mode of operation: INCREMENTAL or ABSOLUTE. Default is INCREMENTAL. |
◆ set_ratio() [1/2]
| void ScalingFilter2D::set_ratio |
( |
ControlParameter | output_distance, |
|
|
ControlParameter | input_distance ) |
|
inline |
Sets the scaling ratio using output and input distances.
- Parameters
-
| output_distance | Distance in world units for the output. |
| input_distance | Distance in world units for the input. |
◆ set_ratio() [2/2]
| void ScalingFilter2D::set_ratio |
( |
ControlParameter | ratio | ) |
|
Sets the scaling ratio between output and input.
- Parameters
-
| ratio | Scaling ratio (output / input). |
The documentation for this class was generated from the following file: