Main Page   Namespace List   Alphabetical List   Data Structures   File List   Data Fields   Globals  

structure.h

Go to the documentation of this file.
00001 
00002 //                        structure.h                                   //
00003 //                       -------------                                  //
00004 //    begin                : Tue Nov 4 2003                             //
00005 //    copyright            : (C) 2003 by cbaudry (CEA/DSM/SPP)          //
00006 //    email                : cedric.baudry@tremplin-utc.fr              //
00008 
00010 //                                                                        //
00011 //   This program is free software; you can redistribute it and/or modify //
00012 //   it under the terms of the GNU General Public License as published by //
00013 //   the Free Software Foundation, version 2 of the License               //
00014 //                                                                        //
00016 
00017 #pragma once
00018 
00020 typedef int INDEX_POINT;
00022 typedef int INDEX_COLOR;
00024 typedef int INDEX_FACE;
00026 typedef int INDEX_OBJECT;
00027 
00028 
00032 class vec4d
00033 {
00034 public :
00035   double x;
00036   double y;
00037   double z;
00038   double w;
00039 };
00040 
00041 
00045 class vec2i
00046 {
00047 public:
00048     int x,y;
00049 };
00050 
00055 typedef float vec4f[4];
00056 
00062 class Transfo
00063 {
00064 public :
00065   double tx;               /* translation */
00066   double ty;
00067   double tz;
00068   double thetax;           /* rotation */
00069   double thetay;
00070   double thetaz;
00071 };
00072 
00076 class Rgb
00077 {
00078 public :
00079   double r;        /* red */
00080   double g;        /* green */
00081   double b;        /* blue */
00082 };
00083 
00087 typedef struct
00088 {
00089   int nbpt;               /* number of points in the face */
00090   INDEX_POINT *tabpt;     /* table of the index of points being in the face */
00091   vec4d n;                /* face normal */
00092   INDEX_COLOR icol;       /* color index */
00093 }
00094 FACE;
00095 
00099 typedef struct
00100 {
00101   int nbface;             /* number of faces being in the object */
00102   INDEX_FACE *tabface;    /* table of the index of faces being in the object */
00103 }
00104 OBJECT;
00105 
00109 typedef struct
00110 {
00111   int nbobj;              /* number of objects being in the super volume */
00112   INDEX_OBJECT *tabobj;   /* table of the index of objects being in the super volume */
00113   int visible;            /* visible property initialised to 1 (everything visible) */
00114   Transfo transfo;        /* translation and rotation of the super volume */
00115   char * name;
00116 }
00117 SVOLUME;
00118 
00122 typedef struct
00123 {
00124   int nbsv;        /* number of super volumes */
00125   SVOLUME *tabsv;  /* table of super volumes */
00126   int nbobj;       /* number of objects */
00127   OBJECT *tabobj;  /* table of the objects */
00128   int nbface;      /* number of faces */
00129   FACE *tabface;   /* table of the faces */
00130   int nbpt;        /* number of points */
00131   vec4d *tabpt;    /* table of coordinates of the points */
00132   int nbcol;       /* number of colors */
00133   Rgb *tabcol;     /* table of the colors */
00134 }
00135 SCENE;
00136 

Generated on Wed Feb 18 16:32:51 2004 for POVAMA by doxygen1.2.18