UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_svrg_math_bspl3_surface.hpp
1 // u3d_svrg_math_bspl3_surface.hpp
2 // $Id: u3d_svrg_math_bspl3_surface.hpp,v 1.8 2007/06/26 13:21:32 guser1 Exp $
3 #ifndef U3D_SVRG_MATH_BSPL3_SURFACE_
4 #define U3D_SVRG_MATH_BSPL3_SURFACE_
5 
6 #include "u3d_svrg_math_abstract_surface.hpp"
7 #include "u3d_bspl3_family.hpp"
8 
9 
13 {
14  friend class U3dSVRGMathBspl3Surf4d;
15 
16 public:
19  U3dSVRGMathBspl3Surface(U3dPointsAr &points, double g_step);
20 
24 
26  virtual ~U3dSVRGMathBspl3Surface();
27 
30  virtual bool getPoint(double p, double q, U3dPoint &point);
31 
34  virtual bool getXYZp(double p, double q, U3dPoint &drp);
35 
38  virtual bool getXYZq(double p, double q, U3dPoint &drq);
39 
42  virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp);
43 
46  virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq);
47 
50  virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq);
51 
52 protected:
53 
55  typedef std::vector<U3dSimpleBspl3Surface*> BsplLine;
56 
58  std::vector<U3dSimpleBspl3Curve*> m_bspls_x, m_bspls_y;
59 
61  std::vector<BsplLine> m_bspls_z;
62 
65 
67  double m_pq_accur;
68 
70  virtual bool approximate();
71 
74  static bool find_element(double p, int n, int &nnp, double &pp);
75 
79  bool get_expanded_gp(int i, int j, U3dPoint &point);
80 
83  static void correct_vars(double &p, double acc) {
84  if (p > 1. - acc)
85  p = 1. - acc;
86  if (p < acc)
87  p = acc;
88  }
89 
92  static void update_index (int &i, int m) {
93  if (i < 2)
94  i = 0;
95  else if (i >= m + 1)
96  i = m - 1;
97  else
98  i--;
99  }
100 
101 };
102 
103 #endif /*U3D_SVRG_MATH_BSPL3_SURFACE_*/
virtual bool approximate()
static void correct_vars(double &p, double acc)
Definition: u3d_svrg_math_bspl3_surface.hpp:83
virtual bool getXYZpq(double p, double q, U3dPoint &ddrpq)
std::vector< BsplLine > m_bspls_z
Definition: u3d_svrg_math_bspl3_surface.hpp:61
virtual ~U3dSVRGMathBspl3Surface()
virtual bool getPoint(double p, double q, U3dPoint &point)
Definition: u3d_svrg_math_bspl3_surface.hpp:12
bool get_expanded_gp(int i, int j, U3dPoint &point)
static bool find_element(double p, int n, int &nnp, double &pp)
virtual bool getXYZpp(double p, double q, U3dPoint &ddrpp)
Definition: geometry.H:16
Definition: u3d_point.hpp:16
virtual bool getXYZqq(double p, double q, U3dPoint &ddrqq)
U3dBspl3AbstractMatrix * m_bm
Definition: u3d_svrg_math_bspl3_surface.hpp:64
virtual bool getXYZq(double p, double q, U3dPoint &drq)
std::vector< U3dSimpleBspl3Surface * > BsplLine
Definition: u3d_svrg_math_bspl3_surface.hpp:55
virtual bool getXYZp(double p, double q, U3dPoint &drp)
Definition: u3d_bspl3_matrices.hpp:24
U3dSVRGMathBspl3Surface(U3dPointsAr &points, double g_step)
static void update_index(int &i, int m)
Definition: u3d_svrg_math_bspl3_surface.hpp:92
Definition: u3d_svrg_math_abstract_surface.hpp:21
Definition: u3d_svrg_math_bspl3_surf4d.hpp:10
std::vector< U3dSimpleBspl3Curve * > m_bspls_x
Definition: u3d_svrg_math_bspl3_surface.hpp:58
double m_pq_accur
Definition: u3d_svrg_math_bspl3_surface.hpp:67