Bezier3D class

Class Bezier3D represents a bezier curve, represented by control points.

Parameter t is running from 0 to 1. The class is capable to calculate the curve point and the first two derivatives belonging to it.

Base classes

class ParametricLine
ParametricLine is an Interface for parametric lines.

Constructors, destructors, conversion operators

Bezier3D() defaulted
Default constructor.
Bezier3D(ParametricLine* par, QVector<QgsPoint*>* controlpoly)
Constructor, par is a pointer to the parent, controlpoly a controlpolygon.

Public functions

void add(ParametricLine* pl) override
Do not use this method, since a Bezier curve does not consist of other curves.
void calcFirstDer(float t, Vector3D* v) override
Calculates the first derivative and assigns it to v.
void calcPoint(float t, QgsPoint* p) override
Calculates the point on the curve and assigns it to p.
void calcSecDer(float t, Vector3D* v) override
Calculates the second derivative and assigns it to v.
void changeDirection() override
Changes the order of control points.
auto getControlPoint(int number) const -> const QgsPoint* override
Returns a control point.
auto getControlPoly() const -> const QVector<QgsPoint*>* override
Returns a pointer to the control polygon.
auto getDegree() const -> int override
Returns the degree of the curve.
auto getParent() const -> ParametricLine* override
Returns the parent.
void remove(int i) override
Do not use this method, since a Bezier curve does not consist of other curves.
void setControlPoly(QVector<QgsPoint*>* cp) override
Sets the control polygon.
void setParent(ParametricLine* par) override
Sets the parent.