UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_math_abstract_surface.hpp
1 /* u3d_math_abstract_surface.hpp */
2 /* $Id: u3d_math_abstract_surface.hpp,v 1.6 2007/01/31 09:47:49 urij Exp $ */
3 #ifndef __u3d_math_abstract_surface_hpp
4 #define __u3d_math_abstract_surface_hpp
5 
6 #include <u3d_defines.hpp>
7 #include <u3d_triangle.hpp>
8 #include <u3d_message.hpp>
9 #include <vector>
10 
12 {
13 public:
14  U3dMathAbstractSurface(U3dPointsAr &points)
15  {m_is_ip_done = false;}
16 
18 
19  virtual ~U3dMathAbstractSurface(){};
20 
21  virtual void addPoint(U3dPoint* point) = 0;
22  virtual bool removePoint(int pointId) = 0;
23  virtual void movePoint(int pointId, double x, double y, double z) = 0;
24 
27  virtual bool getPoint(double p, double q, U3dPoint &point) = 0;
28 
31  virtual bool getXYZ(double p, double q, double &x, double &y, double &z);
32 
35  virtual bool getXYZp(double p, double q, U3dPoint &drp);
36 
39  virtual bool getXYZq(double p, double q, U3dPoint &drq);
40 
43  virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp);
44 
47  virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq);
48 
51  virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq);
52 
55  virtual bool getCurvature(double p, double q, double &c);
56 
59  virtual bool getMaxCurvature(double p1, double q1, double p2, double q2,
60  double &c);
61 
64  virtual void getAreaSize(U3dPoint &min, U3dPoint &max);
65 
68  {return m_is_ip_done;}
69 
71  int getInitialPointsNum(){return m_ips.size();}
72 
75  U3dPoint* getInitialPoint(int ind);
76 
78  void GetInitialPoints(U3dPointsAr &ps)
79  {ps = m_ips;}
80 
81  U3dMathAbstractSurface& operator<<(U3dPoint *p){
82  addPoint(p);
83  return *this;}
84 
85 protected:
87  bool m_is_ip_done;
88 
90  U3dPointsAr m_ips;
91 
94  static double m_min_dpq;
95 
97  struct Area3d
98  {
99  double xmn,xmx,ymn,ymx,zmn,zmx;
100  } area3d;
101 
103  virtual bool approximate() = 0;
104 };
105 
106 #endif /* __u3d_math_abstract_surface_hpp */
virtual bool approximate()=0
Definition: u3d_math_abstract_surface.hpp:11
virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq)
virtual bool getMaxCurvature(double p1, double q1, double p2, double q2, double &c)
Definition: geometry.H:16
U3dPointsAr m_ips
Definition: u3d_math_abstract_surface.hpp:90
Definition: u3d_point.hpp:16
virtual bool getXYZq(double p, double q, U3dPoint &drq)
virtual bool getXYZp(double p, double q, U3dPoint &drp)
virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp)
static double m_min_dpq
Definition: u3d_math_abstract_surface.hpp:104
virtual void getAreaSize(U3dPoint &min, U3dPoint &max)
Definition: u3d_math_abstract_surface.hpp:107
bool m_is_ip_done
Definition: u3d_math_abstract_surface.hpp:97
bool isInterpolated()
Definition: u3d_math_abstract_surface.hpp:67
virtual ~U3dMathAbstractSurface()
virtual bool getXYZ(double p, double q, double &x, double &y, double &z)
virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq)
virtual U3dPoint * getInitialPoint(unsigned int ind)=0
virtual bool getCurvature(double p, double q, double &c)
void GetInitialPoints(U3dPointsAr &ps)
Definition: u3d_math_abstract_surface.hpp:78
int getInitialPointsNum()
Definition: u3d_math_abstract_surface.hpp:71
virtual bool getPoint(double p, double q, U3dPoint &point)=0