Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
BezierEase Struct Reference
+ Inheritance diagram for BezierEase:
+ Collaboration diagram for BezierEase:

Classes

struct  SingleCubicBezier
 

Public Member Functions

 BezierEase (QEasingCurve::Type type=QEasingCurve::BezierSpline)
 
void init ()
 
QEasingCurveFunctioncopy () const override
 
void getBezierSegment (SingleCubicBezier *&singleCubicBezier, qreal x)
 
qreal value (qreal x) override
 
- Public Member Functions inherited from QEasingCurveFunction
 QEasingCurveFunction (QEasingCurve::Type type, qreal period=0.3, qreal amplitude=1.0, qreal overshoot=1.70158)
 
virtual ~QEasingCurveFunction ()
 
bool operator== (const QEasingCurveFunction &other) const
 

Static Public Member Functions

static qreal newtonIteration (const SingleCubicBezier &singleCubicBezier, qreal t, qreal x)
 
static qreal evaluateSegmentForY (const SingleCubicBezier &singleCubicBezier, qreal t)
 
static qreal evaluateForX (const SingleCubicBezier &singleCubicBezier, qreal t)
 
static qreal evaluateDerivateForX (const SingleCubicBezier &singleCubicBezier, qreal t)
 
static qreal _cbrt (qreal d)
 
static float _fast_cbrt (float x)
 
static double _fast_cbrt (double d)
 
static qreal _acos (qreal x)
 
static qreal _cos (qreal x)
 
static bool inRange (qreal f)
 
static void cosacos (qreal x, qreal &s1, qreal &s2, qreal &s3)
 
static qreal singleRealSolutionForCubic (qreal a, qreal b, qreal c)
 
static bool almostZero (qreal value)
 
static qreal findTForX (const SingleCubicBezier &singleCubicBezier, qreal x)
 

Public Attributes

QList< SingleCubicBezier_curves
 
QList< qreal_intervals
 
int _curveCount
 
bool _init
 
bool _valid
 
- Public Attributes inherited from QEasingCurveFunction
QEasingCurve::Type _t
 
qreal _p
 
qreal _a
 
qreal _o
 
QList< QPointF_bezierCurves
 
TCBPoints _tcbPoints
 

Detailed Description

Definition at line 427 of file qeasingcurve.cpp.

Constructor & Destructor Documentation

◆ BezierEase()

BezierEase::BezierEase ( QEasingCurve::Type type = QEasingCurve::BezierSpline)
inline

Definition at line 442 of file qeasingcurve.cpp.

Referenced by copy().

+ Here is the caller graph for this function:

Member Function Documentation

◆ _acos()

static qreal BezierEase::_acos ( qreal x)
inlinestatic

Definition at line 673 of file qeasingcurve.cpp.

◆ _cbrt()

static qreal BezierEase::_cbrt ( qreal d)
inlinestatic

Definition at line 612 of file qeasingcurve.cpp.

References _fast_cbrt(), d, and sign().

Referenced by singleRealSolutionForCubic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _cos()

static qreal BezierEase::_cos ( qreal x)
inlinestatic

Definition at line 678 of file qeasingcurve.cpp.

References M_PI.

◆ _fast_cbrt() [1/2]

static double BezierEase::_fast_cbrt ( double d)
inlinestatic

Definition at line 650 of file qeasingcurve.cpp.

References d.

◆ _fast_cbrt() [2/2]

static float BezierEase::_fast_cbrt ( float x)
inlinestatic

Definition at line 635 of file qeasingcurve.cpp.

References i.

Referenced by _cbrt().

+ Here is the caller graph for this function:

◆ almostZero()

static bool BezierEase::almostZero ( qreal value)
inlinestatic

Definition at line 808 of file qeasingcurve.cpp.

Referenced by findTForX().

+ Here is the caller graph for this function:

◆ copy()

QEasingCurveFunction * BezierEase::copy ( ) const
inlineoverridevirtual

Reimplemented from QEasingCurveFunction.

Reimplemented in TCBEase.

Definition at line 500 of file qeasingcurve.cpp.

References BezierEase(), QEasingCurveFunction::_a, QEasingCurveFunction::_bezierCurves, QEasingCurveFunction::_o, QEasingCurveFunction::_p, QEasingCurveFunction::_t, and QEasingCurveFunction::_tcbPoints.

+ Here is the call graph for this function:

◆ cosacos()

static void BezierEase::cosacos ( qreal x,
qreal & s1,
qreal & s2,
qreal & s3 )
inlinestatic

Definition at line 716 of file qeasingcurve.cpp.

References qSqrt(), s2, and s3.

Referenced by singleRealSolutionForCubic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ evaluateDerivateForX()

static qreal BezierEase::evaluateDerivateForX ( const SingleCubicBezier & singleCubicBezier,
qreal t )
inlinestatic

Definition at line 600 of file qeasingcurve.cpp.

References p1, and p2.

Referenced by newtonIteration().

+ Here is the caller graph for this function:

◆ evaluateForX()

static qreal BezierEase::evaluateForX ( const SingleCubicBezier & singleCubicBezier,
qreal t )
inlinestatic

Definition at line 582 of file qeasingcurve.cpp.

References p1, and p2.

Referenced by newtonIteration().

+ Here is the caller graph for this function:

◆ evaluateSegmentForY()

static qreal BezierEase::evaluateSegmentForY ( const SingleCubicBezier & singleCubicBezier,
qreal t )
inlinestatic

Definition at line 564 of file qeasingcurve.cpp.

References p1, and p2.

Referenced by value().

+ Here is the caller graph for this function:

◆ findTForX()

static qreal BezierEase::findTForX ( const SingleCubicBezier & singleCubicBezier,
qreal x )
inlinestatic

Definition at line 815 of file qeasingcurve.cpp.

References almostZero(), p1, p2, and singleRealSolutionForCubic().

Referenced by value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getBezierSegment()

void BezierEase::getBezierSegment ( SingleCubicBezier *& singleCubicBezier,
qreal x )
inline

Definition at line 512 of file qeasingcurve.cpp.

References _curveCount, _curves, _intervals, and QList< T >::data().

Referenced by value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

void BezierEase::init ( )
inline

Definition at line 446 of file qeasingcurve.cpp.

References QEasingCurveFunction::_bezierCurves, _curveCount, _curves, _init, _intervals, _valid, QList< T >::at(), QList< T >::constLast(), i, QList< T >::size(), QPointF::x(), and QPointF::y().

Referenced by value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inRange()

static bool BezierEase::inRange ( qreal f)
inlinestatic

Definition at line 711 of file qeasingcurve.cpp.

Referenced by singleRealSolutionForCubic().

+ Here is the caller graph for this function:

◆ newtonIteration()

static qreal BezierEase::newtonIteration ( const SingleCubicBezier & singleCubicBezier,
qreal t,
qreal x )
inlinestatic

Definition at line 527 of file qeasingcurve.cpp.

References evaluateDerivateForX(), and evaluateForX().

+ Here is the call graph for this function:

◆ singleRealSolutionForCubic()

static qreal BezierEase::singleRealSolutionForCubic ( qreal a,
qreal b,
qreal c )
inlinestatic

Definition at line 738 of file qeasingcurve.cpp.

References _cbrt(), cosacos(), inRange(), qSqrt(), s1, s2, s3, t1, t2, and t3.

Referenced by findTForX().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ value()

qreal BezierEase::value ( qreal x)
inlineoverridevirtual

Reimplemented from QEasingCurveFunction.

Reimplemented in TCBEase.

Definition at line 536 of file qeasingcurve.cpp.

References QEasingCurveFunction::_bezierCurves, _init, _valid, evaluateSegmentForY(), findTForX(), getBezierSegment(), init(), QList< T >::isEmpty(), Q_ASSERT, qWarning, and QList< T >::size().

Referenced by TCBEase::value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _curveCount

int BezierEase::_curveCount

Definition at line 438 of file qeasingcurve.cpp.

Referenced by getBezierSegment(), and init().

◆ _curves

QList<SingleCubicBezier> BezierEase::_curves

Definition at line 436 of file qeasingcurve.cpp.

Referenced by getBezierSegment(), and init().

◆ _init

bool BezierEase::_init

Definition at line 439 of file qeasingcurve.cpp.

Referenced by init(), and value().

◆ _intervals

QList<qreal> BezierEase::_intervals

Definition at line 437 of file qeasingcurve.cpp.

Referenced by getBezierSegment(), and init().

◆ _valid

bool BezierEase::_valid

Definition at line 440 of file qeasingcurve.cpp.

Referenced by init(), and value().


The documentation for this struct was generated from the following file: