Public Methods | |
bezier_ninfo (T in_tol1, T in_tol2) | |
virtual bool | evaluate (const gul::Ptr< T > &dom) |
void | setCurrentPoint (const EP *inP, const point_ninfo< T, HP, EP > *inSP) |
Public Attributes | |
T | last_u |
T | last_v |
bool | last_result |
const EP * | P |
const point_ninfo< T, HP, EP > * | SP |
Ptr< Ptr< EP > > | SKL |
T | tol1 |
T | tol2 |
bool | init |
|
Definition at line 109 of file gunu_project.cpp. References init, P, SKL, tol1, and tol2.
|
|
Definition at line 139 of file gunu_project.cpp. References gunu::BezierSurfaceDerivatives(), GULAPI, init, last_result, last_u, last_v, P, SKL, SP, tol1, and tol2.
00140 { 00141 T u = dom[0], v = dom[1], rootPS; 00142 EP S, Su, Sv, Suu, Svv, Suv, PS; 00143 T SuSu, SvSv, b1, b2; 00144 00145 if( init && (u == last_u) && (v == last_v) ) 00146 return last_result; 00147 else 00148 { 00149 init = true; 00150 last_u = u; 00151 last_v = v; 00152 } 00153 00154 if( u < 0.0 ) u = 0.0; 00155 else if( u > 1.0 ) u = 1.0; 00156 00157 if( v < 0.0 ) v = 0.0; 00158 else if( v > 1.0 ) v = 1.0; 00159 00160 BezierSurfaceDerivatives( 00161 u, v, SP->S[0].pu, SP->S[0].U, SP->S[0].pv, SP->S[0].V, 00162 SP->S[0].Pw, 2, SKL ); 00163 00164 S = SKL[0][0]; 00165 Su = SKL[1][0]; 00166 Sv = SKL[0][1]; 00167 Suu = SKL[2][0]; 00168 Suv = SKL[1][1]; 00169 Svv = SKL[0][2]; 00170 00171 PS = S - *P; 00172 SuSu = Su*Su; 00173 SvSv = Sv*Sv; 00174 00175 fjac[0][0] = PS*Suu + SuSu; 00176 fjac[0][1] = fjac[1][0] = PS*Suv + Su*Sv; 00177 fjac[1][1] = PS*Svv + SvSv; 00178 00179 fvec[0] = Su*PS; 00180 fvec[1] = Sv*PS; 00181 00182 if( rel_equal(S,*P,tol1) ) 00183 { 00184 last_result = true; 00185 return true; 00186 } 00187 00188 rootPS = rtr<T>::sqrt(PS*PS); 00189 b1 = rtr<T>::sqrt(SuSu)*rootPS; 00190 b2 = rtr<T>::sqrt(SvSv)*rootPS; 00191 00192 if( rel_equal(fvec[0]+b1,b1,tol2) && 00193 rel_equal(fvec[1]+b2,b2,tol2) ) 00194 { 00195 last_result = true; 00196 return true; 00197 } 00198 00199 last_result = false; 00200 return false; 00201 } |
|
Definition at line 128 of file gunu_project.cpp.
|
|
Definition at line 107 of file gunu_project.cpp. Referenced by bezier_ninfo(), evaluate(), and setCurrentPoint(). |
|
Definition at line 101 of file gunu_project.cpp. Referenced by evaluate(). |
|
Definition at line 99 of file gunu_project.cpp. Referenced by evaluate(). |
|
Definition at line 100 of file gunu_project.cpp. Referenced by evaluate(). |
|
Definition at line 102 of file gunu_project.cpp. Referenced by bezier_ninfo(), evaluate(), and setCurrentPoint(). |
|
Definition at line 104 of file gunu_project.cpp. Referenced by bezier_ninfo(), and evaluate(). |
|
Definition at line 103 of file gunu_project.cpp. Referenced by evaluate(). |
|
Definition at line 105 of file gunu_project.cpp. Referenced by bezier_ninfo(), and evaluate(). |
|
Definition at line 106 of file gunu_project.cpp. Referenced by bezier_ninfo(), and evaluate(). |