ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
VectorRunningAverageFilter.h
Go to the documentation of this file.
1/**
2 * @file VectorRunningAverageFilter.h
3 * @brief Implements a running average filter for 3D vector smoothing.
4 *
5 * The `VectorRunningAverageFilter` class applies independent running average filters
6 * to each component (X, Y, Z) of a 3D vector to reduce noise in the input data.
7 *
8 * @date 22/12/2024
9 * @version 1.0
10 * @author Coela Can't
11 */
12
13#pragma once
14
16#include "../Math/Vector3D.h"
17
18/**
19 * @class VectorRunningAverageFilter
20 * @brief Applies running average filtering independently to each component of a 3D vector.
21 *
22 * The `VectorRunningAverageFilter` class uses three `RunningAverageFilter` instances
23 * to process the X, Y, and Z components of a `Vector3D`, providing a smoothed output for noisy 3D data.
24 *
25 * @tparam memory The size of the memory buffer used for the running average filter.
26 */
27template <size_t memory>
29private:
30 RunningAverageFilter<memory> X; ///< Running average filter for the X component of the vector.
31 RunningAverageFilter<memory> Y; ///< Running average filter for the Y component of the vector.
32 RunningAverageFilter<memory> Z; ///< Running average filter for the Z component of the vector.
33
34public:
35 /**
36 * @brief Default constructor for `VectorRunningAverageFilter`.
37 *
38 * Initializes the running average filters for each component with default parameters.
39 */
41
42 /**
43 * @brief Constructs a `VectorRunningAverageFilter` with a specified gain.
44 *
45 * Initializes the running average filters for each component with the given gain value.
46 *
47 * @param gain The smoothing gain for the running average filter (range 0.0 to 1.0).
48 */
50
51 /**
52 * @brief Filters a 3D vector input using the running average filter.
53 *
54 * Applies running average filtering independently to the X, Y, and Z components of the input vector.
55 *
56 * @param input The input `Vector3D` to filter.
57 * @return The filtered `Vector3D`.
58 */
60};
Implements a running average filter for smoothing data.
Implements a generic Kalman Filter for 1D data.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Definition Vector3D.h:26
Applies running average filtering independently to each component of a 3D vector.
Vector3D Filter(Vector3D input)
Filters a 3D vector input using the running average filter.
RunningAverageFilter< memory > X
Running average filter for the X component of the vector.
RunningAverageFilter< memory > Y
Running average filter for the Y component of the vector.
VectorRunningAverageFilter()
Default constructor for VectorRunningAverageFilter.
RunningAverageFilter< memory > Z
Running average filter for the Z component of the vector.