

Public Types | |
| enum | Flag_t { kCoordsBoth, kCoordsX, kCoordsY } |
| Values to indicate which coordinate(s) must be checked to consider that two points are distinct. More... | |
Public Member Functions | |
| Bezier (intf_thread_t *p_intf, const vector< float > &pAbscissas, const vector< float > &pOrdinates, Flag_t flag=kCoordsBoth) | |
| ~Bezier () | |
| int | getNbCtrlPoints () const |
| Get the number of control points used to define the curve. | |
| float | getNearestPercent (int x, int y) const |
| Return the percentage (between 0 and 1) of the curve point nearest from (x, y). | |
| float | getMinDist (int x, int y, float xScale=1.0f, float yScale=1.0f) const |
| Return the distance of (x, y) to the curve, corrected by the (optional) given scale factors. | |
| void | getPoint (float t, int &x, int &y) const |
| Get the coordinates of the point at t percent of the curve (t must be between 0 and 1). | |
| int | getWidth () const |
| Get the width (maximum abscissa) of the curve. | |
| int | getHeight () const |
| Get the height (maximum ordinate) of the curve. | |
| enum Bezier::Flag_t |
| Bezier::Bezier | ( | intf_thread_t * | p_intf, | |
| const vector< float > & | pAbscissas, | |||
| const vector< float > & | pOrdinates, | |||
| Flag_t | flag = kCoordsBoth | |||
| ) |
References cx, i, kCoordsBoth, kCoordsX, kCoordsY, and MAX_BEZIER_POINT.
| Bezier::~Bezier | ( | ) | [inline] |
| int Bezier::getNbCtrlPoints | ( | ) | const [inline] |
| float Bezier::getNearestPercent | ( | int | x, | |
| int | y | |||
| ) | const |
Return the percentage (between 0 and 1) of the curve point nearest from (x, y).
Referenced by Anchor::canHang(), and CtrlSliderBg::handleEvent().
| float Bezier::getMinDist | ( | int | x, | |
| int | y, | |||
| float | xScale = 1.0f, |
|||
| float | yScale = 1.0f | |||
| ) | const |
Return the distance of (x, y) to the curve, corrected by the (optional) given scale factors.
Referenced by Anchor::canHang(), Anchor::isHanging(), and CtrlSliderBg::mouseOver().
| void Bezier::getPoint | ( | float | t, | |
| int & | x, | |||
| int & | y | |||
| ) | const |
Get the coordinates of the point at t percent of the curve (t must be between 0 and 1).
Referenced by Anchor::canHang(), CtrlSliderCursor::draw(), and CtrlSliderCursor::mouseOver().
| int Bezier::getWidth | ( | ) | const |
| int Bezier::getHeight | ( | ) | const |
1.5.6