#include <Bezier.h>
|
| | Bezier ()=default |
| | Bezier (Vector4D handle1, Vector4D handle2) |
| auto | operator() (float t) -> float |
| | evaluates the bezier at a point along the curve.
|
| template<typename P> |
| auto | operator() (float t, const P &begin, const P &end) -> P |
| | interpolates between 2 values, using the bezier curve just calls value
|
| auto | value (float t) -> float |
| | evaluetates the bezier at a single point along it's curve
|
| template<typename P> |
| auto | value (float t, const P &start, const P &end) -> P |
| | interpolates between 2 values, using the bezier curve
|
| auto | data () -> float * |
| | pointer to raw memory of bezier, for editors purposes
|
|
| float | handles [4] = {0.455f, 0.030f, 0.515f, 0.955f} |
| | the handles for the curve, in order, x1, y1, x2, y2. Defaults to InOut Quadradic Easing
|
| float | selectedPreset = 0.f |
| | Extra float for use by imgui_bezier editor. If we refactor imgui_bezier, we might not need this.
|
◆ Bezier() [1/2]
◆ Bezier() [2/2]
◆ data()
| auto th::Bezier::data |
( |
| ) |
->float * |
pointer to raw memory of bezier, for editors purposes
- Returns
- a pointer to the beginning of the handles array, with an extra float at the end
◆ operator()() [1/2]
| auto th::Bezier::operator() |
( |
float | t | ) |
->float |
evaluates the bezier at a point along the curve.
equivalent to bezier.value(t);
- Parameters
-
| t | how far into the curve to sample, range [0,1] |
- Returns
- the y value of the curve, range [0,1]
◆ operator()() [2/2]
template<typename P>
| auto th::Bezier::operator() |
( |
float | t, |
|
|
const P & | begin, |
|
|
const P & | end )->P |
|
inline |
interpolates between 2 values, using the bezier curve just calls value
- Template Parameters
-
| P | the type of the value to lerp between |
- Parameters
-
| t | how far into the curve to sample, range [0,1] |
| start | the value to start at |
| end | the value to end at |
- Returns
- A new interpolated value, range [start, end]
◆ value() [1/2]
| auto th::Bezier::value |
( |
float | t | ) |
->float |
evaluetates the bezier at a single point along it's curve
- Parameters
-
| t | how far into the curve to sample, range [0,1] |
- Returns
- the y value of the curve, range [0,1]
◆ value() [2/2]
template<typename P>
| auto th::Bezier::value |
( |
float | t, |
|
|
const P & | start, |
|
|
const P & | end )->P |
|
inline |
interpolates between 2 values, using the bezier curve
- Template Parameters
-
| P | the type of the value to lerp between |
- Parameters
-
| t | how far into the curve to sample, range [0,1] |
| start | the value to start at |
| end | the value to end at |
- Returns
- A new interpolated value, range [start, end]
◆ from_json
| auto from_json |
( |
const json & | j, |
|
|
Bezier & | n )->void |
|
friend |
◆ to_json
◆ handles
| float th::Bezier::handles[4] = {0.455f, 0.030f, 0.515f, 0.955f} |
|
private |
the handles for the curve, in order, x1, y1, x2, y2. Defaults to InOut Quadradic Easing
◆ selectedPreset
| float th::Bezier::selectedPreset = 0.f |
|
private |
Extra float for use by imgui_bezier editor. If we refactor imgui_bezier, we might not need this.
The documentation for this struct was generated from the following files:
- /home/egrazil/sites/Brunot/The House/source/Utility/Math/Bezier.h
- /home/egrazil/sites/Brunot/The House/source/Utility/Math/Bezier.cpp