|
OSSIA
Open Scenario System for Interactive Application
|
The curve class. More...
The curve class.
A curve is a succession of curve_segment. It is used in a Behavior to drive automation or mapper.
Public Types | |
| using | abscissa_type = X |
| using | ordinate_type = Y |
| using | curve_type = curve< X, Y > |
| using | map_type = curve_map< X, std::pair< Y, ossia::curve_segment< Y > > > |
Public Member Functions | |
| curve (const curve &other) | |
| curve (curve &&other) noexcept | |
| curve & | operator= (const curve &other) |
| curve & | operator= (curve &&other) noexcept |
| virtual | ~curve ()=default |
| destructor | |
| void | reset () override |
| Clear internal data structures of the curve. | |
| bool | add_point (ossia::curve_segment< Y > &&segment, X abscissa, Y value) |
| add a segment to reach a target point to the curve | |
| bool | remove_point (X abscissa) |
| remove a point from the curve | |
| Y | value_at (X abscissa) const |
| get value at an abscissa | |
| ossia::curve_type | get_type () const override |
| get the type of both coordinates | |
| X | get_x0 () const |
| get initial point abscissa | |
| Y | get_y0 () const |
| get initial point ordinate | |
| void | set_x0 (X value) |
| set initial point abscissa | |
| void | set_y0 (Y value) |
| set initial point ordinate | |
| std::optional< destination > | get_y0_destination () const |
| get initial point ordinate destination | |
| void | set_y0_destination (const ossia::destination &destination) |
| set initial curve ordinate using a Destination | |
| map_type | get_points () const |
| get points of the curve | |
| void | reserve (std::size_t count) |
Static Public Member Functions | |
| static Y | convert_to_template_type_value (const ossia::value &value, ossia::destination_index::const_iterator idx) |
|
inlineoverridevirtual |
Clear internal data structures of the curve.
Call before a new execution.
Implements ossia::curve_abstract.
|
inline |
add a segment to reach a target point to the curve
| std::shared_ptr< | CurveSegment<Y>> | segment to target point |
| X | target point abscissa | |
| Y | target point ordinate |
|
inline |
remove a point from the curve
| X | point abscissa |
|
inline |
get value at an abscissa
| X | abscissa. |
|
inlineoverridevirtual |
get the type of both coordinates
Implements ossia::curve_abstract.
|
inline |
get initial point abscissa
if there is an initial abcissa destination, it will return the value of the address
|
inline |
get initial point ordinate
if there is an initial ordinate destination, it will return the value of the address
|
inline |
set initial point abscissa
if there is an initial abscissa destination, this accessor is useless
| X | abscissa |
|
inline |
set initial point ordinate
if there is an initial ordinate destination, this accessor is useless
| Y | ordinate |
|
inline |
get initial point ordinate destination
|
inline |
set initial curve ordinate using a Destination
| const | Destination* |
|
inline |
get points of the curve