UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
u3d_bspl3_primitives.hpp
1 /* u3d_bspl3_primitives.hpp */
2 /* $Id: u3d_bspl3_primitives.hpp,v 1.2 2008/03/25 11:46:58 ibadm Exp $ */
3 #ifndef __u3d_bspl3_primitives_hpp
4 #define __u3d_bspl3_primitives_hpp
5 
6 #include "u3d_bspl3_matrices.hpp"
7 #include <vector>
8 
9 //------------------------------------------------------------------------------------------
12 {
13 public:
14 
17 
21  U3dSimpleBspl3Curve(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4]);
22 
24  virtual ~U3dSimpleBspl3Curve(){};
25 
26 
28  void construct(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4]);
29 
30 
32  double get(double p) const;
33 
35  double getSp(double p) const;
36 
38  double getSpp(double p) const;
39 
41  void getCoeffs(double (&c)[4]) const {
42  c[0] = m_rv[0];
43  c[1] = m_rv[1];
44  c[2] = m_rv[2];
45  c[3] = m_rv[3];
46  }
47 
49  double getLineDeviation(double k, double b, double p);
50 
51 protected:
52 
55 
57  double m_rv[4];
58 };
59 
61 typedef std::vector<U3dSimpleBspl3Curve*> U3dSimpleBspl3CurveAr;
62 
63 //------------------------------------------------------------------------------------------
67 {
68 public:
69 
73  U3dSimpleBspl3Surface(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4][4]);
74 
77 
79  double get(double p, double q) const;
80 
82  double getSp(double p, double q) const;
83 
85  double getSq(double p, double q) const;
86 
88  double getSpp(double p, double q) const;
89 
91  double getSqq(double p, double q) const;
92 
94  double getSpq(double p, double q) const;
95 
96 protected:
97 
100 
102  double m_rm[4][4];
103 
105  double calc(double *pp, double *qq) const;
106 
107 private:
108 
110  void cp2rm(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4][4]);
111 };
112 
113 
114 //------------------------------------------------------------------------------------------
118 {
119 public:
120 
124  U3dSimpleBspl3Surf3d(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4][4][4]);
125 
128 
130  double get(double p, double q, double r) const;
131 
132 protected:
133 
135  double m_rt[4][4][4];
136 
139 
141  void make_tensor(const U3dBspl3AbstractMatrix *bm, const double (&cp)[4][4][4]);
142 
144  double calc(double *pp, double *qq, double *rr) const;
145 };
146 
147 
148 #endif /* u3d_bspl3_primitives.hpp */
double m_rt[4][4][4]
Definition: u3d_bspl3_primitives.hpp:135
Definition: u3d_bspl3_primitives.hpp:117
double m_rv[4]
Definition: u3d_bspl3_primitives.hpp:57
double getSqq(double p, double q) const
void getCoeffs(double(&c)[4]) const
Definition: u3d_bspl3_primitives.hpp:41
const U3dBspl3AbstractMatrix * m_bm
Definition: u3d_bspl3_primitives.hpp:138
double getSp(double p, double q) const
virtual ~U3dSimpleBspl3Surface()
Definition: u3d_bspl3_primitives.hpp:76
const U3dBspl3AbstractMatrix * m_bm
Definition: u3d_bspl3_primitives.hpp:54
void make_tensor(const U3dBspl3AbstractMatrix *bm, const double(&cp)[4][4][4])
double getSq(double p, double q) const
Definition: u3d_bspl3_primitives.hpp:11
const U3dBspl3AbstractMatrix * m_bm
Definition: u3d_bspl3_primitives.hpp:99
double getLineDeviation(double k, double b, double p)
double calc(double *pp, double *qq, double *rr) const
virtual ~U3dSimpleBspl3Surf3d()
Definition: u3d_bspl3_primitives.hpp:127
double getSp(double p) const
U3dSimpleBspl3Surface(const U3dBspl3AbstractMatrix *bm, const double(&cp)[4][4])
double getSpp(double p, double q) const
Definition: u3d_bspl3_matrices.hpp:24
Definition: u3d_bspl3_primitives.hpp:66
double getSpq(double p, double q) const
virtual ~U3dSimpleBspl3Curve()
Definition: u3d_bspl3_primitives.hpp:24
void construct(const U3dBspl3AbstractMatrix *bm, const double(&cp)[4])
double getSpp(double p) const
U3dSimpleBspl3Surf3d(const U3dBspl3AbstractMatrix *bm, const double(&cp)[4][4][4])
double calc(double *pp, double *qq) const
double m_rm[4][4]
Definition: u3d_bspl3_primitives.hpp:102