QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
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
 

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 31 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 75 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 82 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 96 of file Bezier3D.h.

◆ getControlPoly()

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

Returns a pointer to the control polygon.

Implements ParametricLine.

Definition at line 101 of file Bezier3D.h.

◆ getDegree()

int Bezier3D::getDegree ( ) const
inlineoverridevirtual

Returns the degree of the curve.

Implements ParametricLine.

Definition at line 106 of file Bezier3D.h.

◆ getParent()

ParametricLine * Bezier3D::getParent ( ) const
inlineoverridevirtual

Returns the parent.

Implements ParametricLine.

Definition at line 111 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 88 of file Bezier3D.h.

◆ setControlPoly()

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

Sets the control polygon.

Implements ParametricLine.

Definition at line 121 of file Bezier3D.h.

◆ setParent()

void Bezier3D::setParent ( ParametricLine par)
inlineoverridevirtual

Sets the parent.

Implements ParametricLine.

Definition at line 116 of file Bezier3D.h.


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