FBX SDK Reference Guide: kfbxsurfevalmacrosutil.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_SURFACE_EVALUATOR_MACROS_UTILS_H_
00005 #define _FBXSDK_SURFACE_EVALUATOR_MACROS_UTILS_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
00039 
00040 **************************************************************************************/
00041 
00042 #include <kaydaradef.h>
00043 #ifndef KFBX_DLL 
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 #include <klib/kdebug.h>
00049 
00050 #include <fbxfilesdk_nsbegin.h>
00051 
00052 #define Epsilon     0.00000001
00053 
00054 
00058 //_____________________________________________________________________________
00059 #define Normalize_Normal(  )                                                    \
00060                             Norme_Normal = pNormal[0]*pNormal[0] + pNormal[1]*pNormal[1] + pNormal[2]*pNormal[2];\
00061                             Norme_Normal = sqrt(Norme_Normal);                                                   \
00062                                                                                                                  \
00063                             pNormal[0]/= Norme_Normal;                                                           \
00064                             pNormal[1]/= Norme_Normal;                                                           \
00065                             pNormal[2]/= Norme_Normal;                                                           \
00066 //_____________________________________________________________________________
00067 
00068 #ifdef KSURFACE_EVALUATOR_4D
00069     #define Normal_Dimension_Code() {/*pNormal[3]   = 1.0;*/}
00070 #else
00071     #define Normal_Dimension_Code() {}
00072 #endif
00073 
00074 #ifdef  KSURFACE_EVALUATOR_NORMALIZE
00075     #define Normal_Code()   {Normalize_Normal(); Normal_Dimension_Code();}
00076 #else
00077     #define Normal_Code()   {Normal_Dimension_Code();}
00078 #endif
00079 
00080 #ifdef KSURFACE_EVALUATOR_4D
00081     #define Dimension_Code()    { /* *pDestination  = 1.0;*/ pDestination   ++; }
00082 #else
00083     #define Dimension_Code()    {}
00084 #endif
00085         
00086 /*
00087 //_____________________________________________________________________________
00088 #define Compute_Point_And_Normal( Eval_Type, Normal_Eval_Type )         \
00089                                                                         \
00090                         pPointNormalU = NormalU; pPointNormalV = NormalV;                                                                   \
00091                                                                                                                                             \
00092                         Compute_UNR_Point_Dimension##Eval_Type();           Compute_UNR_Point_NormalUV_Dimension##Normal_Eval_Type();       \
00093                         pDestination++; Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                               \
00094                                                                                                                                             \
00095                         Compute_UNR_Point_Dimension##Eval_Type();           Compute_UNR_Point_NormalUV_Dimension##Normal_Eval_Type();       \
00096                         pDestination++; Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                               \
00097                                                                                                                                             \
00098                         Compute_UNR_Point_Dimension##Eval_Type();           Compute_UNR_Point_NormalUV_Dimension##Normal_Eval_Type();       \
00099                         pDestination++;                                     pPointNormalU++; pPointNormalV++;                               \
00100                                                                                                                                             \
00101                         pNormal[0] = (NormalU[1]*NormalV[2] - NormalU[2]*NormalV[1]);                                                       \
00102                         pNormal[1] = (NormalU[2]*NormalV[0] - NormalU[0]*NormalV[2]);                                                       \
00103                         pNormal[2] = (NormalU[0]*NormalV[1] - NormalU[1]*NormalV[0]);                                                       \
00104                                                                                                                                             \
00105                         Normal_Code();                                                                                                      \
00106                         Dimension_Code();                                                                                                   \
00107                                                                                                                                             \
00108                         pNormal += N_Dimension;                                                                                             \
00109 //_____________________________________________________________________________ 
00110   */
00111 //_____________________________________________________________________________
00112 #define Compute_Point_And_Normal_Table( Eval_Type, Normal_Eval_Type, Rational ) \
00113                                                                                 \
00114                         Compute_##Rational##_Point_Dimension##Eval_Type();          Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();      \
00115                         pDestination++; Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                               \
00116                                                                                                                                             \
00117                         Compute_##Rational##_Point_Dimension##Eval_Type();          Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();      \
00118                         pDestination++; Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                               \
00119                                                                                                                                             \
00120                         Compute_##Rational##_Point_Dimension##Eval_Type();          Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();      \
00121                         pDestination++;                                                                                                     \
00122                                                                                                                                             \
00123                         pPointNormalU --; pPointNormalU--;  pPointNormalV --; pPointNormalV --;                                             \
00124                                                                                                                                             \
00125                         pNormal[0] = (pPointNormalV[1]*pPointNormalU[2] - pPointNormalV[2]*pPointNormalU[1]);                               \
00126                         pNormal[1] = (pPointNormalV[2]*pPointNormalU[0] - pPointNormalV[0]*pPointNormalU[2]);                               \
00127                         pNormal[2] = (pPointNormalV[0]*pPointNormalU[1] - pPointNormalV[1]*pPointNormalU[0]);                               \
00128                                                                                                                                             \
00129                         Normal_Code();                                                                                                      \
00130                         Dimension_Code();                                                                                                   \
00131                                                                                                                                             \
00132                         pNormal += N_Dimension; pPointNormalU += N_Dimension;  pPointNormalV += N_Dimension;                                \
00133 //_____________________________________________________________________________ 
00134 
00135 //_____________________________________________________________________________
00136 #define Compute_Normal_Table( Normal_Eval_Type, Rational )                                                      \
00137                                                                                                                 \
00138                         Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();                  \
00139                         Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                   \
00140                                                                                                                 \
00141                         Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();                  \
00142                         Increment_Control_Point_Pointers(); pPointNormalU++; pPointNormalV++;                   \
00143                                                                                                                 \
00144                         Compute_##Rational##_Point_NormalUV_Dimension##Normal_Eval_Type();                  \
00145                                                                                                                 \
00146                         pPointNormalU --; pPointNormalU --;  pPointNormalV --; pPointNormalV --;                \
00147                                                                                                                 \
00148                         pNormal[0] =  (pPointNormalV[1]*pPointNormalU[2] - pPointNormalV[2]*pPointNormalU[1]);  \
00149                         pNormal[1] =  (pPointNormalV[2]*pPointNormalU[0] - pPointNormalV[0]*pPointNormalU[2]);  \
00150                         pNormal[2] =  (pPointNormalV[0]*pPointNormalU[1] - pPointNormalV[1]*pPointNormalU[0]);  \
00151                                                                                                                 \
00152                         Normal_Code();                                                                          \
00153                                                                                                                 \
00154                         pNormal += N_Dimension; pPointNormalU += N_Dimension;  pPointNormalV += N_Dimension;    \
00155 //_____________________________________________________________________________ 
00156 
00157 
00158 //_____________________________________________________________________________
00159 #define Set_Cap_Normal()                                                                        \
00160         Normal[0] = (pTangentV[1]*pTangentU[2] - pTangentV[2]*pTangentU[1]);                    \
00161         Normal[1] = (pTangentV[2]*pTangentU[0] - pTangentV[0]*pTangentU[2]);                    \
00162         Normal[2] = (pTangentV[0]*pTangentU[1] - pTangentV[1]*pTangentU[0]);                    \
00163                                                                                                 \
00164         do{                                                                                     \
00165             pNormal[0] = Normal[0];   pNormal[1] = Normal[1];   pNormal[2] = Normal[2];         \
00166             pNormal += Increment;                                                               \
00167         }while(--Count);                                                                        \
00168 //_____________________________________________________________________________
00169 
00170 
00171 
00172 //_____________________________________________________________________________
00173 #define Compute_Point( Eval_Type , Rational )                               \
00174                                                                             \
00175                         Compute_##Rational##_Point_Dimension##Eval_Type();\
00176                         pDestination++; Increment_Control_Point_Pointers(); \
00177                                                                             \
00178                         Compute_##Rational##_Point_Dimension##Eval_Type();\
00179                         pDestination++; Increment_Control_Point_Pointers(); \
00180                                                                             \
00181                         Compute_##Rational##_Point_Dimension##Eval_Type();\
00182                         pDestination++;                                     \
00183                                                                             \
00184                         Dimension_Code();                                   \
00185 //_____________________________________________________________________________ 
00186 
00187 //_____________________________________________________________________________
00188 #define Compute_Cap_U_Normal()                                                          \
00189                                                                                         \
00190     Go_Down = mDestination_Point_Count_X * N_Dimension;                                 \
00191     NormalV[0]=NormalU[0] = NormalV[1]=NormalU[1] = NormalV[2]=NormalU[2] = 0.0;        \
00192                                                                                         \
00193     pNormal  = mNormal_Array+ Go_Down - N_Dimension*2;                                  \
00194     pNormal2 = mNormal_Array+ N_Dimension;                                              \
00195     Count_Y = mDestination_Point_Count_Y;                                               \
00196                                                                                         \
00197     do{                                                                                 \
00198         NormalU[0]+=pNormal[0];   NormalU[1]+=pNormal[1];   NormalU[2]+=pNormal[2];     \
00199         NormalV[0]+=pNormal2[0];  NormalV[1]+=pNormal2[1];  NormalV[2]+=pNormal2[2];    \
00200                                                                                         \
00201         pNormal += Go_Down; pNormal2+= Go_Down;                                         \
00202     }while(--Count_Y);                                                                  \
00203                                                                                         \
00204     pNormal  = mNormal_Array+ Go_Down - N_Dimension;                                    \
00205     pNormal2 = mNormal_Array;                                                           \
00206     Count_Y = mDestination_Point_Count_Y;                                               \
00207     do{                                                                                 \
00208         pNormal[0] = NormalU[0];   pNormal[1] = NormalU[1];   pNormal[2] = NormalU[2];  \
00209         pNormal2[0] = NormalV[0];  pNormal2[1] = NormalV[1];  pNormal2[2] = NormalV[2]; \
00210                                                                                         \
00211         pNormal += Go_Down;  pNormal2+= Go_Down;                                        \
00212     }while(--Count_Y);                                                                  \
00213 //_____________________________________________________________________________
00214 
00215 
00216 //_____________________________________________________________________________
00217 #define Compute_Cap_V_Normal()                                                          \
00218                                                                                         \
00219     Go_Down = mDestination_Point_Count_X * N_Dimension;                                 \
00220     NormalV[0]=NormalU[0] = NormalV[1]=NormalU[1] = NormalV[2]=NormalU[2] = 0.0;        \
00221                                                                                         \
00222     pNormal  = mNormal_Array+ Go_Down * (mDestination_Point_Count_Y-2);                 \
00223     pNormal2 = mNormal_Array+ Go_Down;                                                  \
00224     Count_X = mDestination_Point_Count_X;                                               \
00225     do{                                                                                 \
00226         NormalU[0]+=pNormal[0];   NormalU[1]+=pNormal[1];   NormalU[2]+=pNormal[2];     \
00227         NormalV[0]+=pNormal2[0];  NormalV[1]+=pNormal2[1];  NormalV[2]+=pNormal2[2];    \
00228                                                                                         \
00229         pNormal += N_Dimension; pNormal2+= N_Dimension;                                 \
00230     }while(--Count_X);                                                                  \
00231                                                                                         \
00232     pNormal2 = mNormal_Array;                                                           \
00233     Count_X  = mDestination_Point_Count_X;                                              \
00234     do{                                                                                 \
00235         pNormal[0] = NormalU[0];   pNormal[1] = NormalU[1];   pNormal[2] = NormalU[2];  \
00236         pNormal2[0] = NormalV[0];  pNormal2[1] = NormalV[1];  pNormal2[2] = NormalV[2]; \
00237                                                                                         \
00238         pNormal += N_Dimension;  pNormal2+= N_Dimension;                                \
00239     }while(--Count_X);                                                                  \
00240 //_____________________________________________________________________________
00241 
00242 
00243 
00244 //_____________________________________________________________________________
00245 #define Compute_Cap_U_Normal_Fast()                                                     \
00246                                                                                         \
00247     Go_Down = mDestination_Point_Count_X * N_Dimension;                                 \
00248                                                                                         \
00249     kUInt Go_NStep_V_Down = Go_Down * N_Step_V;                                     \
00250                                                                                         \
00251     NormalV[0]=NormalU[0] = NormalV[1]=NormalU[1] = NormalV[2]=NormalU[2] = 0.0;        \
00252                                                                                         \
00253     pNormal  = mNormal_Array+ Go_Down - (N_Dimension*2);                                \
00254     pNormal2 = mNormal_Array+ N_Dimension;                                              \
00255     Count_Y  = (mDestination_Point_Count_Y/N_Step_V);                                   \
00256     do{                                                                                 \
00257         NormalU[0]+=pNormal[0];   NormalU[1]+=pNormal[1];   NormalU[2]+=pNormal[2];     \
00258         NormalV[0]+=pNormal2[0];  NormalV[1]+=pNormal2[1];  NormalV[2]+=pNormal2[2];    \
00259                                                                                         \
00260         pNormal += Go_NStep_V_Down; pNormal2+= Go_NStep_V_Down;                         \
00261     }while(--Count_Y);                                                                  \
00262                                                                                         \
00263     pNormal  = mNormal_Array+ Go_Down - N_Dimension;                                    \
00264     pNormal2 = mNormal_Array;                                                           \
00265     Count_Y = mDestination_Point_Count_Y;                                               \
00266     do{                                                                                 \
00267         pNormal[0] = NormalU[0];   pNormal[1] = NormalU[1];   pNormal[2] = NormalU[2];  \
00268         pNormal2[0] = NormalV[0];  pNormal2[1] = NormalV[1];  pNormal2[2] = NormalV[2]; \
00269                                                                                         \
00270         pNormal += Go_Down;  pNormal2+= Go_Down;                                        \
00271     }while(--Count_Y);                                                                  \
00272 //_____________________________________________________________________________
00273 
00274 
00275 //_____________________________________________________________________________
00276 #define Compute_Cap_V_Normal_Fast()                                                     \
00277                                                                                         \
00278     kUInt Go_Right = N_Dimension*N_Step_U;                                              \
00279     Go_Down = mDestination_Point_Count_X * N_Dimension;                                 \
00280     NormalV[0]=NormalU[0] = NormalV[1]=NormalU[1] = NormalV[2]=NormalU[2] = 0.0;        \
00281                                                                                         \
00282     pNormal  = mNormal_Array+ Go_Down * (mDestination_Point_Count_Y-2);                 \
00283     pNormal2 = mNormal_Array+ Go_Down;                                                  \
00284     Count_X  = (mDestination_Point_Count_X/N_Step_U);                                   \
00285     do{                                                                                 \
00286         NormalU[0]+=pNormal[0];   NormalU[1]+=pNormal[1];   NormalU[2]+=pNormal[2];     \
00287         NormalV[0]+=pNormal2[0];  NormalV[1]+=pNormal2[1];  NormalV[2]+=pNormal2[2];    \
00288                                                                                         \
00289         pNormal += Go_Right;    pNormal2+= Go_Right;                                    \
00290     }while(--Count_X);                                                                  \
00291                                                                                         \
00292     pNormal  = mNormal_Array+ Go_Down * (mDestination_Point_Count_Y-1);                 \
00293     pNormal2 = mNormal_Array;                                                           \
00294     Count_X  = mDestination_Point_Count_X;                                              \
00295     do{                                                                                 \
00296         pNormal[0] = NormalU[0];   pNormal[1] = NormalU[1];   pNormal[2] = NormalU[2];  \
00297         pNormal2[0] = NormalV[0];  pNormal2[1] = NormalV[1];  pNormal2[2] = NormalV[2]; \
00298                                                                                         \
00299         pNormal += N_Dimension;  pNormal2+= N_Dimension;                                \
00300     }while(--Count_X);                                                                  \
00301 //_____________________________________________________________________________
00302 
00303 
00304 
00305 
00306 
00308 //_____________________________________________________________________________
00309 #define Compute_UNR_Point_Dimension_With_pBij_V0_U0()                           \
00310                     *pDestination =                                             \
00311                         pBij[0]  * (*pPoint00) + pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02)+   \
00312                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12)+   \
00313                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22);   \
00314 //_____________________________________________________________________________
00315 
00316 
00317 //_____________________________________________________________________________
00318 #define Compute_UNR_Point_Dimension_With_pBij_V0()                              \
00319                     *pDestination =                                             \
00320                         pBij[0]  * (*pPoint00) + pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02) +  pBij[3]  * (*pPoint03) +    \
00321                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) +    \
00322                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23) ;    \
00323 //_____________________________________________________________________________
00324 
00325 
00326 //_____________________________________________________________________________
00327 #define Compute_UNR_Point_Dimension_With_pBij_U0()                              \
00328                     *pDestination =                                             \
00329                         pBij[0]  * (*pPoint00) + pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02) +  \
00330                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  \
00331                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  \
00332                         pBij[12] * (*pPoint30) + pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) ;  \
00333 //_____________________________________________________________________________
00334 
00335 
00336 //_____________________________________________________________________________
00337 #define Compute_UNR_Point_Dimension_With_pBij_U1()                                  \
00338                     *pDestination =                                             \
00339                         pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02) +  pBij[3]  * (*pPoint03) + \
00340                         pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) + \
00341                         pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23) + \
00342                         pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) +  pBij[15] * (*pPoint33) ; \
00343 //_____________________________________________________________________________
00344   
00345 
00346 //_____________________________________________________________________________
00347 #define Compute_UNR_Point_Dimension_With_pBij_V0_U1()                           \
00348                     *pDestination =                                             \
00349                         pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02) +  pBij[3]  * (*pPoint03) + \
00350                         pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) + \
00351                         pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23);  \
00352 //_____________________________________________________________________________
00353 
00354 
00355 //_____________________________________________________________________________
00356 #define Compute_UNR_Point_Dimension_With_pBij_V1()                              \
00357                     *pDestination =                                             \
00358                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) +    \
00359                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23) +    \
00360                         pBij[12] * (*pPoint30) + pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) +  pBij[15] * (*pPoint33) ;    \
00361 //_____________________________________________________________________________
00362 
00363 
00364 //_____________________________________________________________________________
00365 #define Compute_UNR_Point_Dimension_With_pBij_V1_U1()                               \
00366                     *pDestination =                                                 \
00367                         pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) + \
00368                         pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23) + \
00369                         pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) +  pBij[15] * (*pPoint33) ; \
00370 //_____________________________________________________________________________
00371 
00372 
00373 
00374 //_____________________________________________________________________________
00375 #define Compute_UNR_Point_Dimension_With_pBij_V1_U0()                           \
00376                     *pDestination =                                             \
00377                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  \
00378                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  \
00379                         pBij[12] * (*pPoint30) + pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) ;  \
00380 //_____________________________________________________________________________
00381 
00382 
00383 
00384 //_____________________________________________________________________________
00385 #define Compute_UNR_Point_Dimension_With_pBij()                                 \
00386                     *pDestination =                                             \
00387                         pBij[0]  * (*pPoint00) + pBij[1]  * (*pPoint01) + pBij[2]  * (*pPoint02) +  pBij[3]  * (*pPoint03) +    \
00388                         pBij[4]  * (*pPoint10) + pBij[5]  * (*pPoint11) + pBij[6]  * (*pPoint12) +  pBij[7]  * (*pPoint13) +    \
00389                         pBij[8]  * (*pPoint20) + pBij[9]  * (*pPoint21) + pBij[10] * (*pPoint22) +  pBij[11] * (*pPoint23) +    \
00390                         pBij[12] * (*pPoint30) + pBij[13] * (*pPoint31) + pBij[14] * (*pPoint32) +  pBij[15] * (*pPoint33) ;    \
00391 //_____________________________________________________________________________
00392 
00393 
00394 
00395 
00396 //_____________________________________________________________________________
00397 #define Compute_UNR_Point_Dimension()                                                                               \
00398                     *pDestination =                                                                                 \
00399                         Bij11 * (*pPoint00) + Bij21 * (*pPoint01) + Bij31 * (*pPoint02) +  Bij41 * (*pPoint03) +    \
00400                         Bij12 * (*pPoint10) + Bij22 * (*pPoint11) + Bij32 * (*pPoint12) +  Bij42 * (*pPoint13) +    \
00401                         Bij13 * (*pPoint20) + Bij23 * (*pPoint21) + Bij33 * (*pPoint22) +  Bij43 * (*pPoint23) +    \
00402                         Bij14 * (*pPoint30) + Bij24 * (*pPoint31) + Bij34 * (*pPoint32) +  Bij44 * (*pPoint33) ;    \
00403 //_____________________________________________________________________________
00404 
00405 
00406 
00407 //_____________________________________________________________________________
00408 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V0_U0()                                   \
00409                     *pPointNormalU =                                                                    \
00410                         pBdij[0]  * (*pPoint00) + pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) +   \
00411                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) +   \
00412                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) ;   \
00413                                                                                                         \
00414                     *pPointNormalV =                                                                    \
00415                         pBidj[0]  * (*pPoint00) + pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) +   \
00416                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) +   \
00417                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) ;   \
00418 //_____________________________________________________________________________
00419 
00420 //_____________________________________________________________________________
00421 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_U0()                                      \
00422                     *pPointNormalU =                                                                    \
00423                         pBdij[0]  * (*pPoint00) + pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) +   \
00424                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) +   \
00425                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) +   \
00426                         pBdij[12] * (*pPoint30) + pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) ;   \
00427                                                                                                         \
00428                     *pPointNormalV =                                                                    \
00429                         pBidj[0]  * (*pPoint00) + pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) +   \
00430                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) +   \
00431                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) +   \
00432                         pBidj[12] * (*pPoint30) + pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) ;   \
00433 //_____________________________________________________________________________
00434 
00435 //_____________________________________________________________________________
00436 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_U1()                                      \
00437                     *pPointNormalU =                                                                    \
00438                         pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) + pBdij[3]  * (*pPoint03) +   \
00439                         pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) +   \
00440                         pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23) +   \
00441                         pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) + pBdij[15] * (*pPoint33) ;   \
00442                                                                                                         \
00443                     *pPointNormalV =                                                                    \
00444                         pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) + pBidj[3]  * (*pPoint03) +   \
00445                         pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) +   \
00446                         pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23) +   \
00447                         pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) + pBidj[15] * (*pPoint33) ;   \
00448 //_____________________________________________________________________________
00449 
00450 
00451 
00452 //_____________________________________________________________________________
00453 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V1_U0()                                   \
00454                     *pPointNormalU =                                                                    \
00455                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) +   \
00456                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) +   \
00457                         pBdij[12] * (*pPoint30) + pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) ;   \
00458                                                                                                         \
00459                     *pPointNormalV =                                                                    \
00460                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) +   \
00461                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) +   \
00462                         pBidj[12] * (*pPoint30) + pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) ;   \
00463 //_____________________________________________________________________________
00464 
00465 
00466 //_____________________________________________________________________________
00467 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V1()                                                                      \
00468                     *pPointNormalU =                                                                                \
00469                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) + \
00470                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23) + \
00471                         pBdij[12] * (*pPoint30) + pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) + pBdij[15] * (*pPoint33) ; \
00472                                                                                                                     \
00473                     *pPointNormalV =                                                                                \
00474                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) + \
00475                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23) + \
00476                         pBidj[12] * (*pPoint30) + pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) + pBidj[15] * (*pPoint33) ; \
00477 //_____________________________________________________________________________
00478 
00479 
00480 //_____________________________________________________________________________
00481 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V1_U1()                                   \
00482                     *pPointNormalU =                                                                    \
00483                         pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) +   \
00484                         pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23) +   \
00485                         pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) + pBdij[15] * (*pPoint33) ;   \
00486                                                                                                         \
00487                     *pPointNormalV =                                                                    \
00488                         pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) +   \
00489                         pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23) +   \
00490                         pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) + pBidj[15] * (*pPoint33) ;   \
00491 //_____________________________________________________________________________
00492 
00493 
00494 
00495 //_____________________________________________________________________________
00496 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V0_U1()                                   \
00497                     *pPointNormalU =                                                                    \
00498                         pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) + pBdij[3]  * (*pPoint03) +   \
00499                         pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) +   \
00500                         pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23) ;   \
00501                                                                                                         \
00502                     *pPointNormalV =                                                                    \
00503                         pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) + pBidj[3]  * (*pPoint03) +   \
00504                         pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) +   \
00505                         pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23) ;   \
00506 //_____________________________________________________________________________
00507 
00508 
00509 
00510 //_____________________________________________________________________________
00511 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj_V0()                                      \
00512                     *pPointNormalU =                                                                    \
00513                         pBdij[0]  * (*pPoint00) + pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) + pBdij[3]  * (*pPoint03) + \
00514                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) + \
00515                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23);  \
00516                                                                                                                     \
00517                     *pPointNormalV =                                                                                \
00518                         pBidj[0]  * (*pPoint00) + pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) + pBidj[3]  * (*pPoint03) + \
00519                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) + \
00520                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23);  \
00521 //_____________________________________________________________________________
00522 
00523 //_____________________________________________________________________________
00524 #define Compute_UNR_Point_NormalUV_Dimension_With_pBdij_pBidj()                                                                     \
00525                     *pPointNormalU =                                                                                \
00526                         pBdij[0]  * (*pPoint00) + pBdij[1]  * (*pPoint01) + pBdij[2]  * (*pPoint02) + pBdij[3]  * (*pPoint03) + \
00527                         pBdij[4]  * (*pPoint10) + pBdij[5]  * (*pPoint11) + pBdij[6]  * (*pPoint12) + pBdij[7]  * (*pPoint13) + \
00528                         pBdij[8]  * (*pPoint20) + pBdij[9]  * (*pPoint21) + pBdij[10] * (*pPoint22) + pBdij[11] * (*pPoint23) + \
00529                         pBdij[12] * (*pPoint30) + pBdij[13] * (*pPoint31) + pBdij[14] * (*pPoint32) + pBdij[15] * (*pPoint33) ; \
00530                                                                                                                     \
00531                     *pPointNormalV =                                                                                \
00532                         pBidj[0]  * (*pPoint00) + pBidj[1]  * (*pPoint01) + pBidj[2]  * (*pPoint02) + pBidj[3]  * (*pPoint03) + \
00533                         pBidj[4]  * (*pPoint10) + pBidj[5]  * (*pPoint11) + pBidj[6]  * (*pPoint12) + pBidj[7]  * (*pPoint13) + \
00534                         pBidj[8]  * (*pPoint20) + pBidj[9]  * (*pPoint21) + pBidj[10] * (*pPoint22) + pBidj[11] * (*pPoint23) + \
00535                         pBidj[12] * (*pPoint30) + pBidj[13] * (*pPoint31) + pBidj[14] * (*pPoint32) + pBidj[15] * (*pPoint33) ; \
00536 //_____________________________________________________________________________
00537 
00538 
00539 
00540 //_____________________________________________________________________________
00541 #define Compute_UNR_Point_NormalUV_Dimension()                                                                      \
00542                     *pPointNormalU =                                                                                \
00543                         Bdij11 * (*pPoint00) + Bdij21 * (*pPoint01) + Bdij31 * (*pPoint02) + Bdij41 * (*pPoint03) + \
00544                         Bdij12 * (*pPoint10) + Bdij22 * (*pPoint11) + Bdij32 * (*pPoint12) + Bdij42 * (*pPoint13) + \
00545                         Bdij13 * (*pPoint20) + Bdij23 * (*pPoint21) + Bdij33 * (*pPoint22) + Bdij43 * (*pPoint23) + \
00546                         Bdij14 * (*pPoint30) + Bdij24 * (*pPoint31) + Bdij34 * (*pPoint32) + Bdij44 * (*pPoint33) ; \
00547                                                                                                                     \
00548                     *pPointNormalV =                                                                                \
00549                         Bidj11 * (*pPoint00) + Bidj21 * (*pPoint01) + Bidj31 * (*pPoint02) +  Bidj41 * (*pPoint03) +\
00550                         Bidj12 * (*pPoint10) + Bidj22 * (*pPoint11) + Bidj32 * (*pPoint12) +  Bidj42 * (*pPoint13) +\
00551                         Bidj13 * (*pPoint20) + Bidj23 * (*pPoint21) + Bidj33 * (*pPoint22) +  Bidj43 * (*pPoint23) +\
00552                         Bidj14 * (*pPoint30) + Bidj24 * (*pPoint31) + Bidj34 * (*pPoint32) +  Bidj44 * (*pPoint33) ;\
00553 //_____________________________________________________________________________
00554 
00555 
00556 //_____________________________________________________________________________
00557 #define Compute_Normal_Point_Dimension( PosiX, PosiY, Dimension )               \
00558                 *pPointNormalU =                                                \
00559                         Bdij11 * GetData( ClipX(PosiX+0), ClipY( PosiY+0 ), Dimension ) + Bdij21 * GetData( ClipX(PosiX+1), ClipY( PosiY+0 ), Dimension ) + Bdij31 * GetData( ClipX(PosiX+2), ClipY( PosiY+0 ), Dimension )  +  Bdij41 * GetData( ClipX(PosiX+3), ClipY( PosiY+0 ), Dimension ) +   \
00560                         Bdij12 * GetData( ClipX(PosiX+0), ClipY( PosiY+1 ), Dimension ) + Bdij22 * GetData( ClipX(PosiX+1), ClipY( PosiY+1 ), Dimension ) + Bdij32 * GetData( ClipX(PosiX+2), ClipY( PosiY+1 ), Dimension )  +  Bdij42 * GetData( ClipX(PosiX+3), ClipY( PosiY+1 ), Dimension ) +   \
00561                         Bdij13 * GetData( ClipX(PosiX+0), ClipY( PosiY+2 ), Dimension ) + Bdij23 * GetData( ClipX(PosiX+1), ClipY( PosiY+2 ), Dimension ) + Bdij33 * GetData( ClipX(PosiX+2), ClipY( PosiY+2 ), Dimension )  +  Bdij43 * GetData( ClipX(PosiX+3), ClipY( PosiY+2 ), Dimension ) +   \
00562                         Bdij14 * GetData( ClipX(PosiX+0), ClipY( PosiY+3 ), Dimension ) + Bdij24 * GetData( ClipX(PosiX+1), ClipY( PosiY+3 ), Dimension ) + Bdij34 * GetData( ClipX(PosiX+2), ClipY( PosiY+3 ), Dimension )  +  Bdij44 * GetData( ClipX(PosiX+3), ClipY( PosiY+3 ), Dimension );    \
00563                                                                                                                                                                                                                                                                                                     \
00564                 *pPointNormalV =                                                                                                                                                                                                                                                                    \
00565                         Bidj11 * GetData( ClipX(PosiX+0), ClipY( PosiY+0 ), Dimension ) + Bidj21 * GetData( ClipX(PosiX+1), ClipY( PosiY+0 ), Dimension ) + Bidj31 * GetData( ClipX(PosiX+2), ClipY( PosiY+0 ), Dimension )  +  Bidj41 * GetData( ClipX(PosiX+3), ClipY( PosiY+0 ), Dimension ) +   \
00566                         Bidj12 * GetData( ClipX(PosiX+0), ClipY( PosiY+1 ), Dimension ) + Bidj22 * GetData( ClipX(PosiX+1), ClipY( PosiY+1 ), Dimension ) + Bidj32 * GetData( ClipX(PosiX+2), ClipY( PosiY+1 ), Dimension )  +  Bidj42 * GetData( ClipX(PosiX+3), ClipY( PosiY+1 ), Dimension ) +   \
00567                         Bidj13 * GetData( ClipX(PosiX+0), ClipY( PosiY+2 ), Dimension ) + Bidj23 * GetData( ClipX(PosiX+1), ClipY( PosiY+2 ), Dimension ) + Bidj33 * GetData( ClipX(PosiX+2), ClipY( PosiY+2 ), Dimension )  +  Bidj43 * GetData( ClipX(PosiX+3), ClipY( PosiY+2 ), Dimension ) +   \
00568                         Bidj14 * GetData( ClipX(PosiX+0), ClipY( PosiY+3 ), Dimension ) + Bidj24 * GetData( ClipX(PosiX+1), ClipY( PosiY+3 ), Dimension ) + Bidj34 * GetData( ClipX(PosiX+2), ClipY( PosiY+3 ), Dimension )  +  Bidj44 * GetData( ClipX(PosiX+3), ClipY( PosiY+3 ), Dimension );    
00569 //_____________________________________________________________________________
00570 
00571 //_____________________________________________________________________________
00572 #define Compute_Point_Dimension( PosiX, PosiY, Dimension )              \
00573                 *pDestination =                                         \
00574                         Bij11 * GetData( ClipX(PosiX+0), ClipY( PosiY+0 ), Dimension ) + Bij21 * GetData( ClipX(PosiX+1), ClipY( PosiY+0 ), Dimension ) + Bij31 * GetData( ClipX(PosiX+2), ClipY( PosiY+0 ), Dimension )  +  Bij41 * GetData( ClipX(PosiX+3), ClipY( PosiY+0 ), Dimension ) +   \
00575                         Bij12 * GetData( ClipX(PosiX+0), ClipY( PosiY+1 ), Dimension ) + Bij22 * GetData( ClipX(PosiX+1), ClipY( PosiY+1 ), Dimension ) + Bij32 * GetData( ClipX(PosiX+2), ClipY( PosiY+1 ), Dimension )  +  Bij42 * GetData( ClipX(PosiX+3), ClipY( PosiY+1 ), Dimension ) +   \
00576                         Bij13 * GetData( ClipX(PosiX+0), ClipY( PosiY+2 ), Dimension ) + Bij23 * GetData( ClipX(PosiX+1), ClipY( PosiY+2 ), Dimension ) + Bij33 * GetData( ClipX(PosiX+2), ClipY( PosiY+2 ), Dimension )  +  Bij43 * GetData( ClipX(PosiX+3), ClipY( PosiY+2 ), Dimension ) +   \
00577                         Bij14 * GetData( ClipX(PosiX+0), ClipY( PosiY+3 ), Dimension ) + Bij24 * GetData( ClipX(PosiX+1), ClipY( PosiY+3 ), Dimension ) + Bij34 * GetData( ClipX(PosiX+2), ClipY( PosiY+3 ), Dimension )  +  Bij44 * GetData( ClipX(PosiX+3), ClipY( PosiY+3 ), Dimension );    \
00578 //_____________________________________________________________________________
00579 
00580 
00581 //_____________________________________________________________________________
00582 #define Set_Blending_Parameters( Matrix, d )                            \
00583                 AB ##d ##1 = Matrix[0];  BB ##d ##1 = Matrix[1];  CB ##d ##1 = Matrix[2];  DB ##d ##1 = Matrix[3];\
00584                 AB ##d ##2 = Matrix[4];  BB ##d ##2 = Matrix[5];  CB ##d ##2 = Matrix[6];  DB ##d ##2 = Matrix[7];\
00585                 AB ##d ##3 = Matrix[8];  BB ##d ##3 = Matrix[9];  CB ##d ##3 = Matrix[10]; DB ##d ##3 = Matrix[11];\
00586                 AB ##d ##4 = Matrix[12]; BB ##d ##4 = Matrix[13]; CB ##d ##4 = Matrix[14]; DB ##d ##4 = Matrix[15];\
00587 //_____________________________________________________________________________
00588 
00589 //_____________________________________________________________________________
00590 #define Set_Blending_Tangent_Parameters( d )                            \
00591                 BdB ##d ##1 = 3.0*AB ##d ##1; CdB ##d ##1 = 2.0*BB ##d ##1;  DdB ##d ##1 = CB ##d ##1;\
00592                 BdB ##d ##2 = 3.0*AB ##d ##2; CdB ##d ##2 = 2.0*BB ##d ##2;  DdB ##d ##2 = CB ##d ##2;\
00593                 BdB ##d ##3 = 3.0*AB ##d ##3; CdB ##d ##3 = 2.0*BB ##d ##3;  DdB ##d ##3 = CB ##d ##3;\
00594                 BdB ##d ##4 = 3.0*AB ##d ##4; CdB ##d ##4 = 2.0*BB ##d ##4;  DdB ##d ##4 = CB ##d ##4;\
00595 //_____________________________________________________________________________
00596 
00597 
00598 //_____________________________________________________________________________
00599 #define Compute_Bi_Blending_Function()      \
00600         Bi1 = ABi1 * u3 + BBi1 * u2 + CBi1 * u + DBi1;\
00601         Bi2 = ABi2 * u3 + BBi2 * u2 + CBi2 * u + DBi2;\
00602         Bi3 = ABi3 * u3 + BBi3 * u2 + CBi3 * u + DBi3;\
00603         Bi4 = ABi4 * u3 + BBi4 * u2 + CBi4 * u + DBi4;\
00604 //_____________________________________________________________________________
00605 
00606 //_____________________________________________________________________________
00607 #define Compute_dBi_Blending_Function()     \
00608         dBi1 = BdBi1 * u2 + CdBi1 * u + DdBi1;\
00609         dBi2 = BdBi2 * u2 + CdBi2 * u + DdBi2;\
00610         dBi3 = BdBi3 * u2 + CdBi3 * u + DdBi3;\
00611         dBi4 = BdBi4 * u2 + CdBi4 * u + DdBi4;\
00612 //_____________________________________________________________________________
00613 
00614 
00615 //_____________________________________________________________________________
00616 #define Compute_Bj_Blending_Function()      \
00617         Bj1 = ABj1 * v3 + BBj1 * v2 + CBj1 * v + DBj1;\
00618         Bj2 = ABj2 * v3 + BBj2 * v2 + CBj2 * v + DBj2;\
00619         Bj3 = ABj3 * v3 + BBj3 * v2 + CBj3 * v + DBj3;\
00620         Bj4 = ABj4 * v3 + BBj4 * v2 + CBj4 * v + DBj4;\
00621 //_____________________________________________________________________________
00622 
00623 //_____________________________________________________________________________
00624 #define Compute_dBj_Blending_Function()     \
00625         dBj1 = BdBj1 * v2 + CdBj1 * v + DdBj1;\
00626         dBj2 = BdBj2 * v2 + CdBj2 * v + DdBj2;\
00627         dBj3 = BdBj3 * v2 + CdBj3 * v + DdBj3;\
00628         dBj4 = BdBj4 * v2 + CdBj4 * v + DdBj4;\
00629 //_____________________________________________________________________________
00630 
00631 
00632 
00633 //_____________________________________________________________________________
00634 #define Compute_Bij_Polynome_Function()                                                         \
00635                     Bij11 = Bi1 * Bj1; Bij12 = Bi1 * Bj2; Bij13 = Bi1 * Bj3; Bij14 = Bi1 * Bj4; \
00636                     Bij21 = Bi2 * Bj1; Bij22 = Bi2 * Bj2; Bij23 = Bi2 * Bj3; Bij24 = Bi2 * Bj4; \
00637                     Bij31 = Bi3 * Bj1; Bij32 = Bi3 * Bj2; Bij33 = Bi3 * Bj3; Bij34 = Bi3 * Bj4; \
00638                     Bij41 = Bi4 * Bj1; Bij42 = Bi4 * Bj2; Bij43 = Bi4 * Bj3; Bij44 = Bi4 * Bj4; \
00639 //_____________________________________________________________________________
00640 
00641 
00642 //_____________________________________________________________________________
00643 #define Compute_Bdij_Polynome_Function()                                                                \
00644                     Bdij11 = dBi1 * Bj1; Bdij12 = dBi1 * Bj2; Bdij13 = dBi1 * Bj3; Bdij14 = dBi1 * Bj4; \
00645                     Bdij21 = dBi2 * Bj1; Bdij22 = dBi2 * Bj2; Bdij23 = dBi2 * Bj3; Bdij24 = dBi2 * Bj4; \
00646                     Bdij31 = dBi3 * Bj1; Bdij32 = dBi3 * Bj2; Bdij33 = dBi3 * Bj3; Bdij34 = dBi3 * Bj4; \
00647                     Bdij41 = dBi4 * Bj1; Bdij42 = dBi4 * Bj2; Bdij43 = dBi4 * Bj3; Bdij44 = dBi4 * Bj4; \
00648 //_____________________________________________________________________________
00649 
00650 
00651 //_____________________________________________________________________________
00652 #define Compute_Bidj_Polynome_Function()                                                                \
00653                     Bidj11 = Bi1 * dBj1; Bidj12 = Bi1 * dBj2; Bidj13 = Bi1 * dBj3; Bidj14 = Bi1 * dBj4; \
00654                     Bidj21 = Bi2 * dBj1; Bidj22 = Bi2 * dBj2; Bidj23 = Bi2 * dBj3; Bidj24 = Bi2 * dBj4; \
00655                     Bidj31 = Bi3 * dBj1; Bidj32 = Bi3 * dBj2; Bidj33 = Bi3 * dBj3; Bidj34 = Bi3 * dBj4; \
00656                     Bidj41 = Bi4 * dBj1; Bidj42 = Bi4 * dBj2; Bidj43 = Bi4 * dBj3; Bidj44 = Bi4 * dBj4; \
00657 //_____________________________________________________________________________
00658 
00659 
00660 //_____________________________________________________________________________
00661 #define Compute_Bdidj_Polynome_Function()                                                               \
00662                     Compute_Bidj_Polynome_Function();                                                   \
00663                     Compute_Bdij_Polynome_Function();                                                   \
00664 //_____________________________________________________________________________
00665 
00666 
00667 
00668 /* Pointer Macro */
00669 
00670 //_____________________________________________________________________________
00671 #define Wrap_Around_Control_Point_Pointers_U()                                          \
00672                 if( pPoint03 >= pLimit_Point_Line ){Sub_Control_Point_Pointers_Column( 3, Line_Source_Length ); Wrap_Flag_U |= 1;}\
00673                 if( pPoint02 >= pLimit_Point_Line ){Sub_Control_Point_Pointers_Column( 2, Line_Source_Length ); Wrap_Flag_U |= 2;}\
00674                 if( pPoint01 >= pLimit_Point_Line ){Sub_Control_Point_Pointers_Column( 1, Line_Source_Length ); Wrap_Flag_U |= 4;}\
00675 //_____________________________________________________________________________
00676 
00677 
00678 //_____________________________________________________________________________
00679 #define Backp_Up_Wrap_Around_Control_Pointer_U()                                \
00680                                                                                 \
00681             switch(Wrap_Flag_U){                                                \
00682             case 7: Add_Control_Point_Pointers_Column( 1, Line_Source_Length ); \
00683             case 3: Add_Control_Point_Pointers_Column( 2, Line_Source_Length ); \
00684             case 1: Add_Control_Point_Pointers_Column( 3, Line_Source_Length ); \
00685 /*//break;                                                                      \
00686 //          case 0: break;                                                      \
00687 //          default : K_ASSERT_MSG_NOW("Something wrong : Wrap_Flag_U");        \
00688 */                                                                              \
00689             }                                                                   \
00690                                                                                 \
00691             Wrap_Flag_U = 0;                                                    \
00692 //_____________________________________________________________________________
00693 
00694 
00695 //_____________________________________________________________________________
00696 #define Set_Control_Point_Pointers( pArray, Count_X, Count_Y, N_Dimension)                                      \
00697                                                                                                                 \
00698                     pPoint00 = &pArray[ (Count_X + (Count_Y * mSource_Point_Count_X) ) * N_Dimension ];         \
00699                     pPoint01 = pPoint00 + N_Dimension;                                                          \
00700                     pPoint02 = pPoint01 + N_Dimension;                                                          \
00701                     pPoint03 = pPoint02 + N_Dimension;                                                          \
00702                                                                                                                 \
00703                     pPoint10 = pPoint00 + Line_Source_Length;                                                   \
00704                     pPoint11 = pPoint10 + N_Dimension;                                                          \
00705                     pPoint12 = pPoint11 + N_Dimension;                                                          \
00706                     pPoint13 = pPoint12 + N_Dimension;                                                          \
00707                                                                                                                 \
00708                     pPoint20 = pPoint10 + Line_Source_Length;                                                   \
00709                     pPoint21 = pPoint20 + N_Dimension;                                                          \
00710                     pPoint22 = pPoint21 + N_Dimension;                                                          \
00711                     pPoint23 = pPoint22 + N_Dimension;                                                          \
00712                                                                                                                 \
00713                     pPoint30 = pPoint20 + Line_Source_Length;                                                   \
00714                     pPoint31 = pPoint30 + N_Dimension;                                                          \
00715                     pPoint32 = pPoint31 + N_Dimension;                                                          \
00716                     pPoint33 = pPoint32 + N_Dimension;                                                          \
00717 //_____________________________________________________________________________
00718 
00719 
00720 //_____________________________________________________________________________
00721 #define Increment_Control_Point_Pointers()                              \
00722                     pPoint00++; pPoint01++; pPoint02++; pPoint03++;     \
00723                     pPoint10++; pPoint11++; pPoint12++; pPoint13++;     \
00724                     pPoint20++; pPoint21++; pPoint22++; pPoint23++;     \
00725                     pPoint30++; pPoint31++; pPoint32++; pPoint33++;     \
00726 //_____________________________________________________________________________
00727 
00728 //_____________________________________________________________________________
00729 #define Decrement_Control_Point_Pointers_By_2()                                                                     \
00730                     pPoint00--;pPoint00--;  pPoint01--;pPoint01--;  pPoint02--;pPoint02--;  pPoint03--;pPoint03--;  \
00731                     pPoint10--;pPoint10--;  pPoint11--;pPoint11--;  pPoint12--;pPoint12--;  pPoint13--;pPoint13--;  \
00732                     pPoint20--;pPoint20--;  pPoint21--;pPoint21--;  pPoint22--;pPoint22--;  pPoint23--;pPoint23--;  \
00733                     pPoint30--;pPoint30--;  pPoint31--;pPoint31--;  pPoint32--;pPoint32--;  pPoint33--;pPoint33--;  \
00734 //_____________________________________________________________________________
00735 
00736 
00737 //_____________________________________________________________________________
00738 #define Sub_Control_Point_Pointers(a)                                               \
00739                     Sub_Control_Point_Pointers_Row(0,a);                            \
00740                     Sub_Control_Point_Pointers_Row(1,a);                            \
00741                     Sub_Control_Point_Pointers_Row(2,a);                            \
00742                     Sub_Control_Point_Pointers_Row(3,a);                            \
00743 //_____________________________________________________________________________
00744 
00745 
00746 //_____________________________________________________________________________
00747 #define Add_Control_Point_Pointers(a)                                               \
00748                     Add_Control_Point_Pointers_Row(0,a);                            \
00749                     Add_Control_Point_Pointers_Row(1,a);                            \
00750                     Add_Control_Point_Pointers_Row(2,a);                            \
00751                     Add_Control_Point_Pointers_Row(3,a);                            \
00752 //_____________________________________________________________________________
00753 
00754 //_____________________________________________________________________________
00755 #define Add_Control_Point_Pointers_Column(i,a)                                      \
00756                     pPoint0 ##i +=a;                                                \
00757                     pPoint1 ##i +=a;                                                \
00758                     pPoint2 ##i +=a;                                                \
00759                     pPoint3 ##i +=a;                                                \
00760 //_____________________________________________________________________________
00761 
00762 //_____________________________________________________________________________
00763 #define Add_Control_Point_Pointers_Row(j,a)                                         \
00764                     pPoint ##j ## 0 +=a;                                            \
00765                     pPoint ##j ## 1 +=a;                                            \
00766                     pPoint ##j ## 2 +=a;                                            \
00767                     pPoint ##j ## 3 +=a;                                            \
00768 //_____________________________________________________________________________
00769 
00770 //_____________________________________________________________________________
00771 #define Sub_Control_Point_Pointers_Column(i,a)                                      \
00772                     pPoint0 ## i -=a;                                               \
00773                     pPoint1 ## i -=a;                                               \
00774                     pPoint2 ## i -=a;                                               \
00775                     pPoint3 ## i -=a;                                               \
00776 //_____________________________________________________________________________
00777 
00778 //_____________________________________________________________________________
00779 #define Sub_Control_Point_Pointers_Row(j,a)                                         \
00780                     pPoint ##j ##0 -=a;                                             \
00781                     pPoint ##j ##1 -=a;                                             \
00782                     pPoint ##j ##2 -=a;                                             \
00783                     pPoint ##j ##3 -=a;                                             \
00784 //_____________________________________________________________________________
00785 
00786 
00787 /* Blending Factor Macro */
00788 
00789 //_____________________________________________________________________________
00790 #define BuildCVs()                                                                                  \
00791         double *lCVs[16];                                                                           \
00792             lCVs[0] = pPoint00; lCVs[1] = pPoint01; lCVs[2] = pPoint02; lCVs[3] = pPoint03;         \
00793             lCVs[4] = pPoint10; lCVs[5] = pPoint11; lCVs[6] = pPoint12; lCVs[7] = pPoint13;         \
00794             lCVs[8] = pPoint20; lCVs[9] = pPoint21; lCVs[10] = pPoint22; lCVs[11] = pPoint23;       \
00795             lCVs[12] = pPoint30; lCVs[13] = pPoint31; lCVs[14] = pPoint32; lCVs[15] = pPoint33;     \
00796 //_____________________________________________________________________________
00797 
00798 //_____________________________________________________________________________
00799 #define BuildWeigths()                                                                              \
00800         double lWeights[16];                                                                        \
00801             lWeights[0] = pPoint00[0]; lWeights[1] = pPoint01[0]; lWeights[2] = pPoint02[0]; lWeights[3] = pPoint03[0];     \
00802             lWeights[4] = pPoint10[0]; lWeights[5] = pPoint11[0]; lWeights[6] = pPoint12[0]; lWeights[7] = pPoint13[0];     \
00803             lWeights[8] = pPoint20[0]; lWeights[9] = pPoint21[0]; lWeights[10] = pPoint22[0]; lWeights[11] = pPoint23[0];   \
00804             lWeights[12] = pPoint30[0]; lWeights[13] = pPoint31[0]; lWeights[14] = pPoint32[0]; lWeights[15] = pPoint33[0]; \
00805 //_____________________________________________________________________________
00806 
00807 #include <fbxfilesdk_nsend.h>
00808 
00809 #endif /* this must be the last line of this file */
00810 
00811