QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
Qwt3DParametricSurface Class Referenceabstract

Abstract base class for parametric surfaces. More...

#include <qwt3d_parametricsurface.h>

Inheritance diagram for Qwt3DParametricSurface:
Qwt3DGridMapping Qwt3DMapping

Classes

class  PrivateData
 

Public Member Functions

virtual Triple operator() (double u, double v)=0
 
virtual Qwt3DParametricData create ()
 Evaluates the parametric surface over the mesh grid and returns the result.
 
void setPeriodic (bool u, bool v)
 
- Public Member Functions inherited from Qwt3DGridMapping
 Qwt3DGridMapping ()
 Default constructor.
 
void setMesh (unsigned int columns, unsigned int rows)
 
void setDomain (double minu, double maxu, double minv, double maxv)
 Sets the domain (parameter range) for the u and v directions.
 
void restrictRange (ParallelEpiped const &)
 Restricts the data range to a parallelepiped.
 
- Public Member Functions inherited from Qwt3DMapping
virtual QString name () const
 

Additional Inherited Members

- Protected Member Functions inherited from Qwt3DGridMapping
ParallelEpipedrange ()
 
const ParallelEpipedrange () const
 
unsigned int meshU () const
 
unsigned int meshV () const
 
double minU () const
 
double maxU () const
 
double minV () const
 
double maxV () const
 

Detailed Description

Abstract base class for parametric surfaces.

A Qwt3DParametricSurface encapsulates a parametric surface defined by operator()(u, v). The user overrides operator() to produce a working object. setDomain, setMesh and create should be called for reasonable operating conditions.

create() returns a Qwt3DParametricData struct that the caller feeds to Qwt3DSurface::loadFromData(). The class no longer holds a back-pointer to the surface item (deferred smell #2, resolved).

class Torus : public Qwt3DParametricSurface
{
public:
Triple operator()(double u, double v) override { ... }
};
Torus torus;
torus.setMesh(40, 40);
torus.setDomain(0, 2*PI, 0, 2*PI);
torus.setPeriodic(true, true);
auto data = torus.create();
surface->loadFromData(data);
Abstract base class for parametric surfaces.
Definition qwt3d_parametricsurface.h:36
Triple [x,y,z].
Definition qwt3d_types.h:201

Member Function Documentation

◆ create()

Qwt3DParametricData Qwt3DParametricSurface::create ( )
virtual

Evaluates the parametric surface over the mesh grid and returns the result.

Returns
Qwt3DParametricData containing the xyz triple matrix and periodicity flags

Allocates a triple matrix, evaluates operator()(u, v) over the mesh grid, clips values to the range bounds, and returns the result. The caller is responsible for feeding this to Qwt3DSurface::loadFromData(). Returns an empty result (columns=0) if the mesh is too small.


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