FireSTARR
Loading...
Searching...
No Matches
SpreadAlgorithm.h
1/* Copyright (c) 2020, Queen's Printer for Ontario */
2/* Copyright (c) His Majesty the King in Right of Canada as represented by the Minister of Natural Resources, 2024-2025. */
3
4/* SPDX-License-Identifier: AGPL-3.0-or-later */
5
6#include "stdafx.h"
7#include "InnerPos.h"
8
9namespace fs
10{
11using HorizontalAdjustment = std::function<MathSize(MathSize)>;
12
13HorizontalAdjustment horizontal_adjustment(
14 const AspectSize slope_azimuth,
15 const SlopeSize slope);
16
18{
19public:
20 [[nodiscard]] virtual OffsetSet calculate_offsets(
21 HorizontalAdjustment correction_factor,
22 MathSize tfc,
23 MathSize head_raz,
24 MathSize head_ros,
25 MathSize back_ros,
26 MathSize length_to_breadth) const
27 noexcept = 0;
28};
29
31 : public SpreadAlgorithm
32{
33public:
34 BaseSpreadAlgorithm(const MathSize max_angle,
35 const MathSize cell_size,
36 const MathSize min_ros)
37 : max_angle_(max_angle), cell_size_(cell_size), min_ros_(min_ros)
38 {
39 }
40protected:
41 MathSize max_angle_;
42 MathSize cell_size_;
43 MathSize min_ros_;
44};
45
47 : public BaseSpreadAlgorithm
48{
49public:
50 using BaseSpreadAlgorithm::BaseSpreadAlgorithm;
51 [[nodiscard]] OffsetSet calculate_offsets(
52 HorizontalAdjustment correction_factor,
53 MathSize tfc,
54 MathSize head_raz,
55 MathSize head_ros,
56 MathSize back_ros,
57 MathSize length_to_breadth) const noexcept override;
58};
59
61 : public BaseSpreadAlgorithm
62{
63public:
64 using BaseSpreadAlgorithm::BaseSpreadAlgorithm;
65 [[nodiscard]] OffsetSet calculate_offsets(
66 HorizontalAdjustment correction_factor,
67 MathSize tfc,
68 MathSize head_raz,
69 MathSize head_ros,
70 MathSize back_ros,
71 MathSize length_to_breadth) const noexcept override;
72};
73}
Definition SpreadAlgorithm.h:32
Definition SpreadAlgorithm.h:48
Definition SpreadAlgorithm.h:18
Definition SpreadAlgorithm.h:62