UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_bspl3_surface3d.hpp
1 /* u3d_bspl3_surface3d.hpp */
2 /* $Id: u3d_bspl3_surface3d.hpp,v 1.6 2008/06/04 12:22:37 sad Exp $ */
3 #ifndef __u3d_bspl3_surface3d_hpp
4 #define __u3d_bspl3_surface3d_hpp
5 
6 #include "u3d_math_abstract_surface.hpp"
7 #include <mth/u3d_bspl3_primitives.hpp>
8 #include "u3d_abstract_prgrid2d.hpp"
9 
10 #include "u3d_prgrid2d.hpp"
11 
15 {
16 
17  friend class U3dBspl3Surface4d;
18 
19 public:
20 
24 
27 
29  virtual ~U3dBspl3Surface3d();
30 
31 
34  virtual void approximate(const U3dBspl3AbstractMatrix &bm, const U3dAbstractPRGrid2d &grd);
35 
36 
39  virtual bool getPoint(double p, double q, U3dPoint &point);
40 
43  virtual bool getXYZp(double p, double q, U3dPoint &drp);
44 
47  virtual bool getXYZq(double p, double q, U3dPoint &drq);
48 
51  virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp);
52 
55  virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq);
56 
59  virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq);
60 
62  const U3dAbstractPRGrid2d* grtGrid() {return m_grid;}
63 
66  U3dBspl3MatrixType getType();
67 
69  virtual int getInitialPointsNum();
70 
73  virtual U3dPoint* getInitialPoint(unsigned int ind);
74 
76  virtual void getInitialPoints(U3dPointsAr &ps);
77 
79  virtual const U3dPointsAr& getInitialPoints() const;
80 
81 
82 protected:
83 
85  typedef std::vector<U3dSimpleBspl3Surface*> BsplLine;
86 
89 
91  std::vector<U3dSimpleBspl3Curve*> m_bspls_x, m_bspls_y;
92 
94  std::vector<BsplLine> m_bspls_z;
95 
98 
100  double m_pq_accur;
101 
105  bool get_expanded_gp(int i, int j, U3dPoint &point);
106 
109  static void correct_vars(double &p, double acc) {
110  if (p > 1. - acc)
111  p = 1. - acc;
112  if (p < acc)
113  p = acc;
114  }
115 
117  void clear();
118 
119 };
120 
121 #endif /* u3d_bspl3_surface3d.hpp */
virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq)
U3dAbstractPRGrid2d * m_grid
Definition: u3d_bspl3_surface3d.hpp:88
U3dBspl3Surface3d(const U3dBspl3AbstractMatrix &bm, const U3dAbstractPRGrid2d &grd)
virtual bool getXYZp(double p, double q, U3dPoint &drp)
virtual bool approximate()=0
Definition: u3d_math_abstract_surface.hpp:11
double m_pq_accur
Definition: u3d_bspl3_surface3d.hpp:100
virtual bool getXYZq(double p, double q, U3dPoint &drq)
Definition: u3d_bspl3_surface4d.hpp:11
virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp)
std::vector< U3dSimpleBspl3Surface * > BsplLine
Definition: u3d_bspl3_surface3d.hpp:85
virtual bool getPoint(double p, double q, U3dPoint &point)
Definition: geometry.H:16
const U3dAbstractPRGrid2d * grtGrid()
Definition: u3d_bspl3_surface3d.hpp:62
Definition: u3d_point.hpp:16
Definition: u3d_bspl3_surface3d.hpp:14
virtual const U3dPointsAr & getInitialPoints() const
U3dBspl3AbstractMatrix * m_bm
Definition: u3d_bspl3_surface3d.hpp:97
U3dBspl3MatrixType getType()
virtual ~U3dBspl3Surface3d()
virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq)
virtual int getInitialPointsNum()
Definition: u3d_bspl3_matrices.hpp:24
bool get_expanded_gp(int i, int j, U3dPoint &point)
static void correct_vars(double &p, double acc)
Definition: u3d_bspl3_surface3d.hpp:109
virtual U3dPoint * getInitialPoint(unsigned int ind)
std::vector< U3dSimpleBspl3Curve * > m_bspls_x
Definition: u3d_bspl3_surface3d.hpp:91
std::vector< BsplLine > m_bspls_z
Definition: u3d_bspl3_surface3d.hpp:94
Definition: u3d_abstract_prgrid2d.hpp:11