Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Beta/3D/Model.hpp

Go to the documentation of this file.
00001 #ifndef  __J2K__MODEL_HPP__
00002 #define  __J2K__MODEL_HPP__
00003 
00004 #include <j2k/Fred/3d/transfor.hpp>
00005 
00006   typedef realtype    float;
00007 
00008   #define SUCCESS     0
00009 
00010   #define HOR_CLOSE   1
00011   #define HOR_OPEN    0
00012 
00013   #define VERT_CLOSE  1
00014   #define VERT_OPEN   0
00015 
00016   #define VOLUME      1
00017   #define SURFACE     0
00018 
00019   #define Sign(val)  ( (val) < 0 ) ? (-1) : ( ( (val) > 0 ) ? (1) : (0) )
00020 
00021   #define NEGATIF     -1
00022   #define POSITIF      1
00023   #define NEUTRAL      0
00024 
00025   #define ON           1
00026   #define OFF          0
00027 
00028   typedef struct Generate_t {
00029      unsigned_ptype : 1,
00030      pvert          : 1,
00031      phor           : 1,
00032      ponaxis        : 2;
00033   } GenerateType;
00034 
00035 /* Graphe Model */
00036 
00037 typedef struct
00038       { int x, y;  } Pixel;
00039 
00040 typedef struct
00041       { realtype x, y;  } Sommet2D;
00042 
00043 typedef struct
00044       { realtype x, y, z;  } Sommet3D;
00045 
00046 typedef struct
00047       { realtype x, y, z, w;  } Sommet3DH;
00048 
00049 #define W_DEFAULT 1
00050 
00051 typedef struct
00052       { Sommet3D  a, b; } Vector3D;
00053 
00054 typedef struct
00055       { UINT  sini, sfin; } Arc;
00056 
00057 typedef struct
00058       { UINT  a1, a2, a3; } FaceT;
00059 
00060 typedef struct
00061       { UINT  a1, a2, a3, a4; } FaceC;
00062 
00063 #define __2D  0
00064 #define __3D  1
00065 
00066 #define _X_   0
00067 #define _Y_   1
00068 #define _Z_   2
00069 #define _W_   3
00070 
00071 __J2K__EXTERN_C
00072 
00073    realtype Norme( realtype* v, char mode );
00074 
00075 __J2K__END_C
00076 
00077 /* Modeleur Prof to Prof */
00078 
00079   #define MOD_PROF_TO_PROF_ERROR_MEMORY                 1
00080   #define MOD_PROF_TO_PROF_ERROR_MSG                    2
00081   #define MOD_PROF_TO_PROF_ERROR_BAD_DATA_CARDINAL      3
00082   #define MOD_PROF_TO_PROF_ERROR_BAD_TRANS_PAR          4
00083 
00084   #define _cardinamod_prof_to_prof_mess                 5
00085 
00086 __J2K__EXTERN_C
00087 
00088   int ModeleurProfToProf (
00089       Sommet3D*      profil,    /* La table des profils   */
00090       Sommet3D*      profil1,   /* La table des profils   */
00091       UINT           NbSommet,  /* Occurence de la table  */
00092       Sommet3D**     sommet,    /* Les sommets crées      */
00093       UINT*          nbnew,
00094       GenerateType*  type,
00095       Vector3D       trans,     /* Vecteur de translation */
00096       UINT           pas        /* Nombre de profils      */
00097   );
00098 
00099   char* GetModelProfToProfErrorMsg( int num );
00100 
00101 __J2K__END_C
00102 
00103 /*---------------------------------------------------------------------------
00104 - Le pas represente le nombre de profil désirés, y compris le profil initial.
00105 - L'angle d'iteration est calculé par angle/pas.
00106 ---------------------------------------------------------------------------*/
00107 
00108 /* Modeleurs de Rotation */
00109 
00110  #define MOD_ROT_ERROR_MEMORY                  1
00111  #define MOD_ROT_ERROR_MSG                     2
00112  #define MOD_ROT_ERROR_BAD_DATA_CARDINAL       3
00113  #define MOD_ROT_ERROR_BAD_DATA_OUT_AXIS       4
00114  #define MOD_ROT_ERROR_BAD_DATA_ON_AXIS        5
00115  #define MOD_ROT_ERROR_BAD_DATA_INTER          6
00116  #define MOD_ROT_ERROR_BAD_ROTATE_PAR          7
00117  #define MOD_ROT_ERROR_BAD_PROFIL_COMBINATION  8
00118 
00119  #define _cardinamod_rot_mess                  9
00120 
00121  #define EXTR_BOTH           3
00122  #define EXTR_SUP            2
00123  #define EXTR_INF            1
00124  #define EXTR_NONE           0
00125 
00126  #define COMPLETE_ROTATE   360
00127  #define HALF_ROTATE       180
00128  #define QUATER_ROTATE      90
00129 
00130 __J2K__EXTERN_C
00131 
00132 /*
00133 - Le pas represente le nombre de profil désirés, y compris le profil initial.
00134 - L'angle d'iteration est calculé par angle/pas.
00135 */
00136 
00137 int ModeleurRotationZ(
00138    Sommet3D*      profil,    /* La table des profils. */
00139    Sommet3D*      profil1,   /* La table des profils. */
00140    UINT           NbSommet,  /* Occurence de la table.*/
00141    Sommet3D**     sommet,    /* Les sommets crées.    */
00142    UINT*          nbnew,
00143    GenerateType*  type,
00144    double         angle,     /* Angle de rotation.    */
00145    UINT           pas        /* Nombre de profils     */
00146 );
00147 
00148 int CheckingProfilRotationZ(
00149    Sommet3D*      profil,    /* La table des profils. */
00150    UINT           NbSommet,  /* Occurence de la table.*/
00151    char*          extr       /* Sommets sur l'axe?    */
00152 );
00153 
00154 UINT ModRotGetCardSommet( 
00155    UINT           nbp,       /* Cardinal sommet profil */
00156    double*        angle,     /* Angle de rotation.     */
00157    UINT           pas,       /* Nombre de profils      */
00158    char           extr       /* Sommets sur l'axe?     */
00159 ); 
00160 
00161 char* GetModelRotatErrorMsg( int num );
00162 
00163 int IsOnAxe ( double a, double b );
00164 
00165 __J2K__END_C
00166 
00167 /* Modeleur de Translation */
00168 
00169  #define MOD_TRAN_ERROR_MEMORY                 1
00170  #define MOD_TRAN_ERROR_MSG                    2
00171  #define MOD_TRAN_ERROR_BAD_DATA_CARDINAL      3
00172  #define MOD_TRAN_ERROR_BAD_TRANS_PAR          4
00173 
00174  #define _cardinamod_trans_mess 5
00175 
00176 __J2K__EXTERN_C
00177 
00178 int ModeleurTranslation(
00179     Sommet3D*      profil,    /* La table des profils.  */
00180     UINT           NbSommet,  /* Occurence de la table. */
00181     Sommet3D**     sommet,    /* Les sommets cr_es.     */
00182     UINT*          nbnew,
00183     GenerateType*  type,
00184     Vector3D       trans,     /* vecteur de translation.*/
00185     UINT           pas        /* Nombre de profils      */
00186 );
00187 
00188 char* GetModelTransErrorMsg( int num );
00189 
00190 __J2K__END_C
00191 
00192 /*---------------------------------------------------------------------------
00193 - Le pas represente le nombre de profil desires, y compris le profil initial.
00194 - L'angle d'iteration est calcu par angle/pas.
00195 */
00196 
00197 /* Modeleur Vector */
00198 
00199  #define MOD_VEC_ERROR_MEMORY                 1
00200  #define MOD_VEC_ERROR_MSG                    2
00201  #define MOD_VEC_ERROR_BAD_DATA_CARDINAL      3
00202  #define MOD_VEC_ERROR_BAD_TRANS_PAR          4
00203 
00204  #define _cardinamod_vec_mess                 5
00205 
00206 __J2K__EXTERN_C
00207 
00208 int ModeleurVector(
00209      Sommet3D*      profil,     /* La table des profils. */
00210      UINT           NbSommet,   /* Occurence de la table.*/
00211      Sommet3D**     sommet,     /* Les sommets crées.    */
00212      UINT*          nbnew,
00213      GenerateType*  type,
00214      Vector3D*      trans,      /* vecteur de translation.*/
00215      UINT           nbvec       /* Nombre de profils     */
00216 );
00217 
00218 char* GetModelVectorErrorMsg( int num );
00219 
00220 __J2K__END_C
00221 
00222 /*---------------------------------------------------------------------------
00223 - Le pas represente le nombre de profil désirés, y compris le profil initial.
00224 - L'angle d'iteration est calculé par angle/pas.
00225 */

Generated on Sun Oct 14 18:46:08 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001