Files Classes Functions Hierarchy
#include <meshpatch.h>
Public Member Functions | |
| meshpatch (uintc M_, uintc N_) | |
| Build a mesh patch with bernstein polynomials. | |
| ~meshpatch () | |
| Memory cleanup. | |
| template<typename T , typename W > | |
| void | eval (T &p, double const u, double const v, W const &pij) const |
| Evaluate an actual patch. | |
Public Attributes | |
| uintc | M |
| The number of points on the u-axis. | |
| uintc | N |
| The number of points of the v-axis. | |
Protected Attributes | |
| bernsteinPoly *const | vbu |
| bernsteinPoly *const | vbv |
| double *const | vbuval |
| double *const | vbvval |
This is a generalization of a patch. The client evaluates patches with a functional object pij in eval.
Definition at line 17 of file meshpatch.h.
Build a mesh patch with bernstein polynomials.
Definition at line 4 of file meshpatch.cpp.
References M, N, vbu, and vbv.
00005 : M(M_), N(N_), vbu(new bernsteinPoly[M+1]), vbv(new bernsteinPoly[N+1]), 00006 vbuval(new double[M+1]), vbvval(new double[N+1]) 00007 { 00008 for (uint i=0; i<=M; ++i) 00009 vbu[i].construct(M,i); 00010 for (uint i=0; i<=N; ++i) 00011 vbv[i].construct(N,i); 00012 }
| meshpatch::~meshpatch | ( | ) |
| void meshpatch::eval | ( | T & | p, | |
| double const | u, | |||
| double const | v, | |||
| W const & | pij | |||
| ) | const [inline] |
Evaluate an actual patch.
Definition at line 44 of file meshpatch.h.
References M, N, vbu, vbuval, vbv, and vbvval.
Referenced by meshpatchtest::test01(), and pointgrid3Dbilineardraw::update().
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 }
The number of points on the u-axis.
Definition at line 22 of file meshpatch.h.
Referenced by eval(), and meshpatch().
The number of points of the v-axis.
Definition at line 24 of file meshpatch.h.
Referenced by eval(), and meshpatch().
bernsteinPoly* const meshpatch::vbu [protected] |
double* const meshpatch::vbuval [protected] |
bernsteinPoly* const meshpatch::vbv [protected] |
double* const meshpatch::vbvval [protected] |
1.5.8