[89] | 1 | #ifndef qwt3d_function_h__2004_03_05_13_51_begin_guarded_code
|
---|
| 2 | #define qwt3d_function_h__2004_03_05_13_51_begin_guarded_code
|
---|
| 3 |
|
---|
| 4 | #include "qwt3d_gridmapping.h"
|
---|
| 5 |
|
---|
| 6 | namespace Qwt3D
|
---|
| 7 | {
|
---|
| 8 |
|
---|
| 9 | class SurfacePlot;
|
---|
| 10 |
|
---|
| 11 | //! Abstract base class for mathematical functions
|
---|
| 12 | /**
|
---|
| 13 | A Function encapsulates a mathematical function with rectangular domain. The user has to adapt the pure virtual operator()
|
---|
| 14 | to get a working object. Also, the client code should call setDomain, setMesh and create for reasonable operating conditions.
|
---|
| 15 | */
|
---|
| 16 | class QWT3D_EXPORT Function : public GridMapping
|
---|
| 17 | {
|
---|
| 18 |
|
---|
| 19 | public:
|
---|
| 20 |
|
---|
| 21 | Function(); //!< Constructs Function object w/o assigned SurfacePlot.
|
---|
| 22 | explicit Function(Qwt3D::SurfacePlot& plotWidget); //!< Constructs Function object and assigns a SurfacePlot
|
---|
| 23 | explicit Function(Qwt3D::SurfacePlot* plotWidget); //!< Constructs Function object and assigns a SurfacePlot
|
---|
| 24 | virtual double operator()(double x, double y) = 0; //!< Overwrite this.
|
---|
| 25 |
|
---|
| 26 | void setMinZ(double val); //!< Sets minimal z value.
|
---|
| 27 | void setMaxZ(double val); //!< Sets maximal z value.
|
---|
| 28 |
|
---|
| 29 | //! Assigns a new SurfacePlot and creates a data representation for it.
|
---|
| 30 | virtual bool create(Qwt3D::SurfacePlot& plotWidget);
|
---|
| 31 | //! Creates data representation for the actual assigned SurfacePlot.
|
---|
| 32 | virtual bool create();
|
---|
| 33 | //! Assigns the object to another widget. To see the changes, you have to call this function before create().
|
---|
| 34 | void assign(Qwt3D::SurfacePlot& plotWidget);
|
---|
| 35 | //! Assigns the object to another widget. To see the changes, you have to call this function before create().
|
---|
| 36 | void assign(Qwt3D::SurfacePlot* plotWidget);
|
---|
| 37 | };
|
---|
| 38 |
|
---|
| 39 | } // ns
|
---|
| 40 |
|
---|
| 41 | #endif /* include guarded */
|
---|