Files Classes Functions Hierarchy
00001 #ifndef MESHPATCH 00002 #define MESHPATCH 00003 00004 #include <point.h> 00005 #include <print.h> 00006 00007 #include <bernstein.h> 00008 00009 typedef point3<double> pt3; 00010 00017 class meshpatch 00018 { 00019 public: 00020 00022 uintc M; 00024 uintc N; 00025 00026 protected: 00027 bernsteinPoly * const vbu; 00028 bernsteinPoly * const vbv; 00029 00030 double * const vbuval; 00031 double * const vbvval; 00032 00033 public: 00034 00036 meshpatch(uintc M_, uintc N_); 00037 00039 ~meshpatch(); 00040 00042 template< typename T, typename W > 00043 void eval 00044 ( 00045 T & p, 00046 double const u, 00047 double const v, 00048 W const & pij 00049 ) const 00050 { 00051 for (uint i=0; i<=M; ++i) 00052 vbuval[i] = vbu[i].eval(u); 00053 00054 for (uint i=0; i<=N; ++i) 00055 vbvval[i] = vbv[i].eval(v); 00056 00057 p = T(); 00058 T p2; 00059 uint k; 00060 for (uint i=0; i<=M; ++i) 00061 { 00062 T p2; 00063 for (k=0; k<=N; ++k) 00064 p2 += pij(i,k)*vbvval[k]; 00065 00066 p += p2*vbuval[i]; 00067 } 00068 } 00069 00070 }; 00071 00072 00073 00074 #endif 00075 00076
1.5.8