00001 /* 00002 * Copyright (c) 1998 by Tech Soft 3D, LLC. 00003 * The information contained herein is confidential and proprietary to 00004 * Tech Soft 3D, LLC., and considered a trade secret as defined under 00005 * civil and criminal statutes. Tech Soft 3D shall pursue its civil 00006 * and criminal remedies in the event of unauthorized use or misappropriation 00007 * of its trade secrets. Use of this information by anyone other than 00008 * authorized employees of Tech Soft 3D, LLC. is granted only under a 00009 * written non-disclosure agreement, expressly prescribing the scope and 00010 * manner of such use. 00011 * 00012 * $Id: metafile_8h-source.html,v 1.29 2008-03-10 07:09:28 stage Exp $ 00013 */ 00014 00015 /* Note: always add exactly 0.01 to the version number for a normal 00016 * version-number 'bump'. We *were* adding 0.1 in the normal 00017 * case, but that was going to cause the numbers to run out too 00018 * soon. 00019 */ 00020 #define METAFILE_VERSION 1.25f /* (the code assumes 2 fractional digits) */ 00021 00022 #define DEFAULT_POINT_ARRAY_SIZE 100 00023 #define DEFAULT_INT_ARRAY_SIZE 100 00024 #define DEFAULT_BYTE_ARRAY_SIZE 1000 00025 #define DEFAULT_FLOAT_ARRAY_SIZE 100 00026 00027 struct HT_Read_In_Progress { 00028 HT_Read_In_Progress *next; 00029 00030 # define RIP_OUTERMOST 0 00031 # define RIP_SEGMENT 1 00032 # define RIP_FRONT 2 00033 # define RIP_RENUMBER 3 00034 # define RIP_GEOMETRY 4 00035 # define RIP_FACE 5 00036 # define RIP_EDGE 6 00037 # define RIP_VERTEX 7 00038 # define RIP_LOD 8 00039 # define RIP_TRIM 9 00040 # define RIP_PRIORITY 10 00041 int type; 00042 }; 00043 00044 #define BIG_SLEN 32768 00045 #define SMALL_SLEN 32768 00046 00047 struct HT_Read_Metafile_Data { 00048 HT_Read_In_Progress *read_in_progress, 00049 outermost_read_in_progress; 00050 00051 int version; 00052 00053 int restore_state; 00054 00055 HT_Key new_key; 00056 HT_Key last_key; 00057 00058 HT_Name open_segment; 00059 HT_Name metafile_root; 00060 00061 HT_File_Data *file_data; 00062 00063 HT_Point default_point_array0[DEFAULT_POINT_ARRAY_SIZE]; 00064 int point_array_allocated0; 00065 int point_array_count0; 00066 HT_Point *point_array0; 00067 00068 int default_int_array0[DEFAULT_INT_ARRAY_SIZE]; 00069 int int_array_allocated0; 00070 int int_array_count0; 00071 int *int_array0; 00072 00073 int default_int_array1[DEFAULT_INT_ARRAY_SIZE]; 00074 int int_array_allocated1; 00075 int int_array_count1; 00076 int *int_array1; 00077 00078 char default_byte_array0[DEFAULT_BYTE_ARRAY_SIZE]; 00079 int byte_array_allocated0; 00080 int byte_array_count0; 00081 char *byte_array0; 00082 00083 float default_float_array0[DEFAULT_FLOAT_ARRAY_SIZE]; 00084 int float_array_allocated0; 00085 int float_array_count0; 00086 float *float_array0; 00087 00088 HT_Plane default_plane_array0[DEFAULT_POINT_ARRAY_SIZE]; 00089 int plane_array_allocated0; 00090 int plane_array_count0; 00091 HT_Plane *plane_array0; 00092 00093 /* a mesh uses a point-array slot; array_count == rows * columns */ 00094 int mesh_rows0; 00095 int mesh_columns0; 00096 00097 /* put these in here so they're on the heap */ 00098 char big_temp[BIG_SLEN], 00099 big_s[BIG_SLEN], 00100 small_s0[SMALL_SLEN], 00101 small_s1[SMALL_SLEN], 00102 small_s2[SMALL_SLEN]; 00103 00104 /* and put these in here to forestall compiler complaints about 00105 * unused variables. Usage is purely local to Parse_Command. 00106 */ 00107 float a0[4][4]; 00108 HT_Point *p0, *p1, *p2; 00109 int i0, i1, i2, i3; 00110 long l0, l1; 00111 float f0, f1, f2, f3, f4, f5; 00112 HT_Point c0, c1, c2; 00113 void **image_rows; 00114 int width, height; 00115 };