1#ifndef TATOOINE_COLOR_SCALES_BRBG_H
2#define TATOOINE_COLOR_SCALES_BRBG_H
11template <
floating_po
int Real>
19 std::unique_ptr<color_type[]>
m_data;
29 {0.32941199999999998, 0.18823500000000001, 0.019608},
30 {0.46720499999999998, 0.26943499999999998, 0.031911000000000002},
31 {0.59999999999999998, 0.36562899999999998, 0.074202000000000004},
32 {0.72548999999999997, 0.48373699999999997, 0.16032299999999999},
33 {0.81299500000000002, 0.63583199999999995, 0.33640900000000001},
34 {0.88688999999999996, 0.78123799999999999, 0.52787399999999995},
35 {0.94348299999999996, 0.87473999999999996, 0.70011500000000004},
36 {0.96316800000000002, 0.92979599999999996, 0.84159899999999999},
37 {0.95724699999999996, 0.95993799999999996, 0.95955400000000002},
38 {0.84406000000000003, 0.93287200000000003, 0.92018500000000003},
39 {0.70396000000000003, 0.88642799999999999, 0.85928499999999997},
40 {0.52925800000000001, 0.81507099999999999, 0.77070399999999994},
41 {0.34625099999999998, 0.69181099999999995, 0.653057},
42 {0.17585500000000001, 0.56201500000000004, 0.53064199999999995},
43 {0.047905000000000003, 0.44144600000000001, 0.41007300000000002},
44 {0.002307, 0.33217999999999998, 0.294348},
45 {0, 0.235294, 0.18823500000000001}}} {}
52 return m_data[(num_samples() - 1)];
54 t *= num_samples() - 1;
55 auto const i =
static_cast<std::size_t
>(std::floor(t));
57 return m_data[i] * (1 - t) + m_data[i + 1] * t;
Real real_type
Definition: BrBG.h:13
auto sample(real_type t) const
Definition: BrBG.h:47
auto data() const -> color_type const *
Definition: BrBG.h:25
auto data() -> color_type *
Definition: BrBG.h:24
auto data_container() const -> color_type const *
Definition: BrBG.h:23
static constexpr std::size_t num_samples()
Definition: BrBG.h:16
BrBG()
Definition: BrBG.h:27
auto data_container() -> color_type *
Definition: BrBG.h:22
auto operator()(real_type const t) const
Definition: BrBG.h:59
std::unique_ptr< color_type[]> m_data
Definition: BrBG.h:19