00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 #include <ctype.h>
00042 
00043 typedef float Vector[3];
00044 
00045 
00046 #define VTK_LIST_INSERT(root, node) list_insert ((List **)&root, (List *)node)
00047 #define VTK_LIST_FIND(root, name)   list_find   ((List **)&root, name)
00048 #define VTK_LIST_DELETE(root, node) list_delete ((List **)&root, (List *)node)
00049 #define VTK_LIST_KILL(root)         list_kill   ((List **)&root)
00050 
00051 #define VTK_LIST_FIELDS  \
00052     char name[80];   \
00053     void *next;
00054 
00055 
00056 typedef unsigned char  byte;
00057 typedef unsigned short word;
00058 typedef unsigned int  dword;
00059 
00060 typedef struct {
00061    VTK_LIST_FIELDS
00062 } List;
00063 
00064 
00065 typedef struct {
00066     int a, b, c;
00067 } Face;
00068 
00069 
00070 typedef struct {
00071     float red, green, blue;
00072 } Colour;
00073 
00074 
00075 
00076 typedef struct {
00077     VTK_LIST_FIELDS
00078 
00079     Vector pos;            
00080     Colour col;            
00081     vtkLight *aLight;
00082 } OmniLight;
00083 
00084 
00085 
00086 typedef struct {
00087     VTK_LIST_FIELDS
00088 
00089     Vector pos;            
00090     Vector target;         
00091     Colour col;            
00092     float  hotspot;        
00093     float  falloff;        
00094     int    shadow_flag;    
00095     vtkLight *aLight;
00096 } SpotLight;
00097 
00098 
00099 
00100 typedef struct {
00101     VTK_LIST_FIELDS
00102 
00103     Vector pos;            
00104     Vector target;         
00105     float  bank;           
00106     float  lens;           
00107     vtkCamera *aCamera;
00108 } Camera;
00109 
00110 
00111 
00112 typedef struct {
00113     VTK_LIST_FIELDS
00114 
00115     int  external;         
00116 } Material;
00117 
00118 
00119 
00120 typedef struct {
00121     VTK_LIST_FIELDS
00122 
00123     Vector center;         
00124     Vector lengths;        
00125 } Summary;
00126 
00127 
00128 
00129 typedef struct {
00130     VTK_LIST_FIELDS
00131 
00132     Colour ambient;
00133     Colour diffuse;
00134     Colour specular;
00135     float  shininess;
00136     float  transparency;
00137     float  reflection;
00138     int    self_illum;
00139     char   tex_map[40];
00140     float  tex_strength;
00141     char   bump_map[40];
00142     float  bump_strength;
00143     vtkProperty *aProperty;
00144 } MatProp;
00145 
00146 
00147 
00148 class vtkActor;
00149 class vtkPolyDataMapper;
00150 class vtkPolyDataNormals;
00151 class vtkStripper;
00152 class vtkPoints;
00153 class vtkCellArray;
00154 class vtkPolyData;
00155 
00156 
00157 typedef struct {
00158     VTK_LIST_FIELDS
00159 
00160     int  vertices;         
00161     Vector *vertex;        
00162 
00163     int  faces;            
00164     Face *face;            
00165     Material **mtl;        
00166 
00167     int hidden;            
00168     int shadow;            
00169     vtkActor *anActor;
00170     vtkPolyDataMapper *aMapper;
00171     vtkPolyDataNormals *aNormals;
00172     vtkStripper *aStripper;
00173     vtkPoints *aPoints;
00174     vtkCellArray *aCellArray;
00175     vtkPolyData *aPolyData;
00176  
00177 } Mesh;
00178 
00179 
00180 typedef struct {
00181     dword start;
00182     dword end;
00183     dword length;
00184     word  tag;
00185 } Chunk;
00186 
00187 
00188 typedef struct {
00189     byte red;
00190     byte green;
00191     byte blue;
00192 } Colour_24;
00193 
00194 
00195