UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zd_function3d.hpp
1 /* zd_function3d.hpp */
2 /* $Id: zd_function3d.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 #ifndef __zd_function3d_hpp
4 #define __zd_function3d_hpp
5 
6 #include "zd_document.hpp"
7 
8 
10 typedef enum
11 {
12  Z_F3D_XHOR_YVER,
14  Z_F3D_XVER_YHOR
17 } ZdFunc3DArgDir;
18 
19 
29 class ZdFunction3D : public ZdDocument
30 {
31 public:
32 
35  ZdFunction3D (const char* szFuncName = NULL);
36 
38  virtual ~ZdFunction3D ();
39 
40 
41  /*
42  * Run-time type identification facility
43  */
44 
46  virtual bool compatibleType (const char* szType) const;
47 
48 
49  /*
50  * Basic functionality
51  */
52 
54  virtual int countX () = 0;
55 
57  virtual int countY () = 0;
58 
60  virtual double argX (int iX) = 0;
61 
63  virtual double argY (int iY) = 0;
64 
67  virtual double func (int iX, int iY) = 0;
68 
69 
70  /*
71  * Extended functionality with default implementation
72  */
73 
75  virtual void argX (std::vector<double>& vX);
76 
78  virtual void argY (std::vector<double>& vY);
79 
83  virtual bool isNullAll ();
84 
87  virtual bool isNullFunc (int iX, int iY);
88 
91  virtual double argStepX ();
92 
95  virtual double argStepY ();
96 
100  virtual void getArgBoundsX (double b[2]);
101 
103  virtual double minArgX () {
104  double bX[2];
105  getArgBoundsX(bX);
106  return bX[0];
107  }
108 
110  virtual double maxArgX () {
111  double bX[2];
112  getArgBoundsX(bX);
113  return bX[1];
114  }
115 
119  virtual void getArgBoundsY (double b[2]);
120 
122  virtual double minArgY () {
123  double bY[2];
124  getArgBoundsY(bY);
125  return bY[0];
126  }
127 
129  virtual double maxArgY () {
130  double bY[2];
131  getArgBoundsY(bY);
132  return bY[1];
133  }
134 
139  virtual void getFuncBounds (double b[2]);
140 
142  double minFunc () {
143  double b[2];
144  getFuncBounds(b);
145  return b[0];
146  }
147 
149  virtual double maxFunc () {
150  double b[2];
151  getFuncBounds(b);
152  return b[1];
153  }
154 
158  virtual int argIndexX (double x);
159 
163  virtual int argIndexY (double y);
164 
169  //virtual bool cell (double x, double y, int& iX, int& iY);
170 
175  //static double leastSurfaceTension (double x, double y);
176 
177 private:
178 
180  static int s_iNameCounter;
181 
183  static const char *s_szOwnType;
184 
185 };
186 
187 
188 #endif /* zd_function3d.hpp */
virtual void getFuncBounds(double b[2])
virtual double maxArgX()
Definition: zd_function3d.hpp:110
virtual double argStepY()
ZdFunction3D(const char *szFuncName=NULL)
virtual double argX(int iX)=0
virtual bool compatibleType(const char *szType) const
virtual void getArgBoundsY(double b[2])
virtual double argY(int iY)=0
virtual double minArgX()
Definition: zd_function3d.hpp:103
virtual int countY()=0
virtual int argIndexY(double y)
virtual double maxFunc()
Definition: zd_function3d.hpp:149
virtual double func(int iX, int iY)=0
virtual int argIndexX(double x)
virtual bool isNullAll()
Definition: zd_document.hpp:16
virtual ~ZdFunction3D()
virtual double minArgY()
Definition: zd_function3d.hpp:122
virtual bool isNullFunc(int iX, int iY)
double minFunc()
Definition: zd_function3d.hpp:142
virtual int countX()=0
virtual double maxArgY()
Definition: zd_function3d.hpp:129
virtual double argStepX()
virtual void getArgBoundsX(double b[2])
Definition: zd_function3d.hpp:29