54 auto operator()(
float t,
const P& begin,
const P& end) -> P
56 return value(t, begin, end);
65 auto value(
float t) -> float;
76 auto value(
float t,
const P& start,
const P& end) -> P
79 auto fromEnd =
value(t);
81 auto fromBegin = 1 - fromEnd;
83 return fromBegin * start + fromEnd * end;
90 auto data() ->
float*;
99 float handles[4] = {0.455f, 0.030f, 0.515f, 0.955f};
nlohmann::json json
Definition Json.cpp:19
Definition Factory.cpp:62
auto operator()(float t, const P &begin, const P &end) -> P
interpolates between 2 values, using the bezier curve just calls value
Definition Bezier.h:54
auto operator()(float t) -> float
evaluates the bezier at a point along the curve.
Definition Bezier.cpp:26
friend auto from_json(const json &j, Bezier &n) -> void
Definition Bezier.cpp:50
auto data() -> float *
pointer to raw memory of bezier, for editors purposes
Definition Bezier.cpp:36
friend auto to_json(json &j, const Bezier &n) -> void
Definition Bezier.cpp:41
float handles[4]
the handles for the curve, in order, x1, y1, x2, y2. Defaults to InOut Quadradic Easing
Definition Bezier.h:99
auto value(float t, const P &start, const P &end) -> P
interpolates between 2 values, using the bezier curve
Definition Bezier.h:76
auto value(float t) -> float
evaluetates the bezier at a single point along it's curve
Definition Bezier.cpp:31
float selectedPreset
Extra float for use by imgui_bezier editor. If we refactor imgui_bezier, we might not need this.
Definition Bezier.h:102