QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
 
 Bezier3D (ParametricLine *par, QVector< QgsPoint * > *controlpoly)
 Constructor, par is a pointer to the parent, controlpoly a controlpolygon.
 
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.
 
const QgsPointgetControlPoint (int number) const override
 Returns a control point.
 
const QVector< QgsPoint * > * getControlPoly () const override
 Returns a pointer to the control polygon.
 
int getDegree () const override
 Returns the degree of the curve.
 
ParametricLinegetParent () const 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.
 
- Public Member Functions inherited from ParametricLine
 ParametricLine ()=default
 
 ParametricLine (ParametricLine *par, QVector< QgsPoint * > *controlpoly)
 Constructor, par is a pointer to the parent object, controlpoly the controlpolygon.
 
virtual ~ParametricLine ()=default
 

Additional Inherited Members

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

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

◆ 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: