QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
Public Member Functions | List of all members
Bezier3D Class Reference

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

#include <Bezier3D.h>

Inheritance diagram for Bezier3D:
Inheritance graph
[legend]

Public Member Functions

 Bezier3D ()=default
 Default constructor. More...
 
 Bezier3D (ParametricLine *par, QVector< QgsPoint * > *controlpoly)
 Constructor, par is a pointer to the parent, controlpoly a controlpolygon. More...
 
void add (ParametricLine *pl) override
 Do not use this method, since a Bezier curve does not consist of other curves. More...
 
void calcFirstDer (float t, Vector3D *v) override
 Calculates the first derivative and assigns it to v. More...
 
void calcPoint (float t, QgsPoint *p) override
 Calculates the point on the curve and assigns it to p. More...
 
void calcSecDer (float t, Vector3D *v) override
 Calculates the second derivative and assigns it to v. More...
 
void changeDirection () override
 Changes the order of control points. More...
 
const QgsPointgetControlPoint (int number) const override
 Returns a control point. More...
 
const QVector< QgsPoint * > * getControlPoly () const override
 Returns a pointer to the control polygon. More...
 
int getDegree () const override
 Returns the degree of the curve. More...
 
ParametricLinegetParent () const override
 Returns the parent. More...
 
void remove (int i) override
 Do not use this method, since a Bezier curve does not consist of other curves. More...
 
void setControlPoly (QVector< QgsPoint * > *cp) override
 Sets the control polygon. More...
 
void setParent (ParametricLine *par) override
 Sets the parent. More...
 
- Public Member Functions inherited from ParametricLine
 ParametricLine ()=default
 Default constructor. More...
 
 ParametricLine (ParametricLine *par, QVector< QgsPoint * > *controlpoly)
 Constructor, par is a pointer to the parent object, controlpoly the controlpolygon. More...
 
virtual ~ParametricLine ()=default
 
virtual void add (ParametricLine *pl)=0
 
virtual void calcFirstDer (float t, Vector3D *v)=0
 
virtual void calcPoint (float t, QgsPoint *p)=0
 
virtual void calcSecDer (float t, Vector3D *v)=0
 
virtual void changeDirection ()=0
 
virtual const QgsPointgetControlPoint (int number) const =0
 
virtual const QVector< QgsPoint * > * getControlPoly () const =0
 
virtual int getDegree () const =0
 
virtual ParametricLinegetParent () const =0
 
virtual void remove (int i)=0
 
virtual void setControlPoly (QVector< QgsPoint * > *cp)=0
 
virtual void setParent (ParametricLine *paral)=0
 

Additional Inherited Members

- Protected Attributes inherited from ParametricLine
QVector< QgsPoint * > * mControlPoly = nullptr
 MControlPoly stores the points of the control polygon. More...
 
int mDegree = 0
 Degree of the parametric Line. More...
 
ParametricLinemParent = nullptr
 Pointer to the parent object. If there isn't one, mParent is 0. More...
 

Detailed Description

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.

Note
Not available in Python bindings

Definition at line 33 of file Bezier3D.h.

Constructor & Destructor Documentation

◆ Bezier3D() [1/2]

Bezier3D::Bezier3D ( )
default

Default constructor.

◆ Bezier3D() [2/2]

Bezier3D::Bezier3D ( ParametricLine par,
QVector< QgsPoint * > *  controlpoly 
)
inline

Constructor, par is a pointer to the parent, controlpoly a controlpolygon.

Definition at line 77 of file Bezier3D.h.

Member Function Documentation

◆ add()

void Bezier3D::add ( ParametricLine pl)
inlineoverridevirtual

Do not use this method, since a Bezier curve does not consist of other curves.

Implements ParametricLine.

Definition at line 84 of file Bezier3D.h.

◆ calcFirstDer()

void Bezier3D::calcFirstDer ( float  t,
Vector3D v 
)
overridevirtual

Calculates the first derivative and assigns it to v.

Implements ParametricLine.

Definition at line 22 of file Bezier3D.cpp.

◆ calcPoint()

void Bezier3D::calcPoint ( float  t,
QgsPoint p 
)
overridevirtual

Calculates the point on the curve and assigns it to p.

Implements ParametricLine.

Definition at line 53 of file Bezier3D.cpp.

◆ calcSecDer()

void Bezier3D::calcSecDer ( float  t,
Vector3D v 
)
overridevirtual

Calculates the second derivative and assigns it to v.

Implements ParametricLine.

Definition at line 77 of file Bezier3D.cpp.

◆ changeDirection()

void Bezier3D::changeDirection ( )
overridevirtual

Changes the order of control points.

Implements ParametricLine.

Definition at line 110 of file Bezier3D.cpp.

◆ getControlPoint()

const QgsPoint * Bezier3D::getControlPoint ( int  number) const
inlineoverridevirtual

Returns a control point.

Implements ParametricLine.

Definition at line 98 of file Bezier3D.h.

◆ getControlPoly()

const QVector< QgsPoint * > * Bezier3D::getControlPoly ( ) const
inlineoverridevirtual

Returns a pointer to the control polygon.

Implements ParametricLine.

Definition at line 103 of file Bezier3D.h.

◆ getDegree()

int Bezier3D::getDegree ( ) const
inlineoverridevirtual

Returns the degree of the curve.

Implements ParametricLine.

Definition at line 108 of file Bezier3D.h.

◆ getParent()

ParametricLine * Bezier3D::getParent ( ) const
inlineoverridevirtual

Returns the parent.

Implements ParametricLine.

Definition at line 113 of file Bezier3D.h.

◆ remove()

void Bezier3D::remove ( int  i)
inlineoverridevirtual

Do not use this method, since a Bezier curve does not consist of other curves.

Implements ParametricLine.

Definition at line 90 of file Bezier3D.h.

◆ setControlPoly()

void Bezier3D::setControlPoly ( QVector< QgsPoint * > *  cp)
inlineoverridevirtual

Sets the control polygon.

Implements ParametricLine.

Definition at line 123 of file Bezier3D.h.

◆ setParent()

void Bezier3D::setParent ( ParametricLine par)
inlineoverridevirtual

Sets the parent.

Implements ParametricLine.

Definition at line 118 of file Bezier3D.h.


The documentation for this class was generated from the following files: