00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __vtkType_h
00016 #define __vtkType_h
00017
00018 #include "vtkConfigure.h"
00019
00020
00021
00022
00023
00024 #define VTK_VOID 0
00025 #define VTK_BIT 1
00026 #define VTK_CHAR 2
00027 #define VTK_SIGNED_CHAR 15
00028 #define VTK_UNSIGNED_CHAR 3
00029 #define VTK_SHORT 4
00030 #define VTK_UNSIGNED_SHORT 5
00031 #define VTK_INT 6
00032 #define VTK_UNSIGNED_INT 7
00033 #define VTK_LONG 8
00034 #define VTK_UNSIGNED_LONG 9
00035 #define VTK_FLOAT 10
00036 #define VTK_DOUBLE 11
00037 #define VTK_ID_TYPE 12
00038
00039
00040
00041 #define VTK_STRING 13
00042 #define VTK_OPAQUE 14
00043
00044
00045 #define VTK_LONG_LONG 16
00046 #define VTK_UNSIGNED_LONG_LONG 17
00047
00048
00049 #define VTK___INT64 18
00050
00051
00052
00053 #define VTK_UNSIGNED___INT64 19
00054
00055
00056 #define VTK_VARIANT 20
00057 #define VTK_OBJECT 21
00058
00059
00060
00061
00062
00063 #define VTK_POLY_DATA 0
00064 #define VTK_STRUCTURED_POINTS 1
00065 #define VTK_STRUCTURED_GRID 2
00066 #define VTK_RECTILINEAR_GRID 3
00067 #define VTK_UNSTRUCTURED_GRID 4
00068 #define VTK_PIECEWISE_FUNCTION 5
00069 #define VTK_IMAGE_DATA 6
00070 #define VTK_DATA_OBJECT 7
00071 #define VTK_DATA_SET 8
00072 #define VTK_POINT_SET 9
00073 #define VTK_UNIFORM_GRID 10
00074 #define VTK_COMPOSITE_DATA_SET 11
00075 #define VTK_MULTIGROUP_DATA_SET 12
00076 #define VTK_MULTIBLOCK_DATA_SET 13
00077 #define VTK_HIERARCHICAL_DATA_SET 14
00078 #define VTK_HIERARCHICAL_BOX_DATA_SET 15
00079 #define VTK_GENERIC_DATA_SET 16
00080 #define VTK_HYPER_OCTREE 17
00081 #define VTK_TEMPORAL_DATA_SET 18
00082 #define VTK_TABLE 19
00083 #define VTK_GRAPH 20
00084 #define VTK_TREE 21
00085 #define VTK_SELECTION 22
00086 #define VTK_DIRECTED_GRAPH 23
00087 #define VTK_UNDIRECTED_GRAPH 24
00088 #define VTK_MULTIPIECE_DATA_SET 25
00089 #define VTK_DIRECTED_ACYCLIC_GRAPH 26
00090
00091
00092
00093 #if defined(__cplusplus)
00094 # define VTK_TYPE_CAST(T, V) static_cast< T >(V)
00095 #else
00096 # define VTK_TYPE_CAST(T, V) ((T)(V))
00097 #endif
00098
00099
00100
00101 #define VTK_BIT_MIN 0
00102 #define VTK_BIT_MAX 1
00103 #if VTK_TYPE_CHAR_IS_SIGNED
00104 # define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0x80)
00105 # define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0x7f)
00106 #else
00107 # define VTK_CHAR_MIN VTK_TYPE_CAST(char, 0u)
00108 # define VTK_CHAR_MAX VTK_TYPE_CAST(char, 0xffu)
00109 #endif
00110 #define VTK_SIGNED_CHAR_MIN VTK_TYPE_CAST(signed char, 0x80)
00111 #define VTK_SIGNED_CHAR_MAX VTK_TYPE_CAST(signed char, 0x7f)
00112 #define VTK_UNSIGNED_CHAR_MIN VTK_TYPE_CAST(unsigned char, 0u)
00113 #define VTK_UNSIGNED_CHAR_MAX VTK_TYPE_CAST(unsigned char, 0xffu)
00114 #define VTK_SHORT_MIN VTK_TYPE_CAST(short, 0x8000)
00115 #define VTK_SHORT_MAX VTK_TYPE_CAST(short, 0x7fff)
00116 #define VTK_UNSIGNED_SHORT_MIN VTK_TYPE_CAST(unsigned short, 0u)
00117 #define VTK_UNSIGNED_SHORT_MAX VTK_TYPE_CAST(unsigned short, 0xffffu)
00118 #define VTK_INT_MIN VTK_TYPE_CAST(int, ~(~0u >> 1))
00119 #define VTK_INT_MAX VTK_TYPE_CAST(int, ~0u >> 1)
00120 #define VTK_UNSIGNED_INT_MIN VTK_TYPE_CAST(unsigned int, 0)
00121 #define VTK_UNSIGNED_INT_MAX VTK_TYPE_CAST(unsigned int, ~0u)
00122 #define VTK_LONG_MIN VTK_TYPE_CAST(long, ~(~0ul >> 1))
00123 #define VTK_LONG_MAX VTK_TYPE_CAST(long, ~0ul >> 1)
00124 #define VTK_UNSIGNED_LONG_MIN VTK_TYPE_CAST(unsigned long, 0ul)
00125 #define VTK_UNSIGNED_LONG_MAX VTK_TYPE_CAST(unsigned long, ~0ul)
00126 #define VTK_FLOAT_MIN VTK_TYPE_CAST(float, -1.0e+38f)
00127 #define VTK_FLOAT_MAX VTK_TYPE_CAST(float, 1.0e+38f)
00128 #define VTK_DOUBLE_MIN VTK_TYPE_CAST(double, -1.0e+299)
00129 #define VTK_DOUBLE_MAX VTK_TYPE_CAST(double, 1.0e+299)
00130 #if defined(VTK_SIZEOF_LONG_LONG)
00131 # define VTK_LONG_LONG_MIN VTK_TYPE_CAST(long long, ~(~0ull >> 1))
00132 # define VTK_LONG_LONG_MAX VTK_TYPE_CAST(long long, ~0ull >> 1)
00133 # define VTK_UNSIGNED_LONG_LONG_MIN VTK_TYPE_CAST(unsigned long long, 0ull)
00134 # define VTK_UNSIGNED_LONG_LONG_MAX VTK_TYPE_CAST(unsigned long long, ~0ull)
00135 #endif
00136 #if defined(VTK_SIZEOF___INT64)
00137 # define VTK___INT64_MIN VTK_TYPE_CAST(__int64, ~(~0ui64 >> 1))
00138 # define VTK___INT64_MAX VTK_TYPE_CAST(__int64, ~0ui64 >> 1)
00139 # define VTK_UNSIGNED___INT64_MIN VTK_TYPE_CAST(unsigned __int64, 0ui64)
00140 # define VTK_UNSIGNED___INT64_MAX VTK_TYPE_CAST(unsigned __int64, ~0ui64)
00141 #endif
00142
00143
00144 #define VTK_LARGE_INTEGER VTK_INT_MAX
00145 #define VTK_LARGE_FLOAT VTK_FLOAT_MAX
00146
00147
00148
00149
00150
00151
00152 #if VTK_SIZEOF_CHAR == 1
00153 typedef unsigned char vtkTypeUInt8;
00154 typedef signed char vtkTypeInt8;
00155 # define VTK_TYPE_UINT8 VTK_UNSIGNED_CHAR
00156 # if VTK_TYPE_CHAR_IS_SIGNED
00157 # define VTK_TYPE_INT8 VTK_CHAR
00158 # else
00159 # define VTK_TYPE_INT8 VTK_SIGNED_CHAR
00160 # endif
00161 #else
00162 # error "No native data type can represent an 8-bit integer."
00163 #endif
00164
00165
00166 #if VTK_SIZEOF_SHORT == 2
00167 typedef unsigned short vtkTypeUInt16;
00168 typedef signed short vtkTypeInt16;
00169 # define VTK_TYPE_UINT16 VTK_UNSIGNED_SHORT
00170 # define VTK_TYPE_INT16 VTK_SHORT
00171 #elif VTK_SIZEOF_INT == 2
00172 typedef unsigned int vtkTypeUInt16;
00173 typedef signed int vtkTypeInt16;
00174 # define VTK_TYPE_UINT16 VTK_UNSIGNED_INT
00175 # define VTK_TYPE_INT16 VTK_INT
00176 #else
00177 # error "No native data type can represent a 16-bit integer."
00178 #endif
00179
00180
00181 #if VTK_SIZEOF_INT == 4
00182 typedef unsigned int vtkTypeUInt32;
00183 typedef signed int vtkTypeInt32;
00184 # define VTK_TYPE_UINT32 VTK_UNSIGNED_INT
00185 # define VTK_TYPE_INT32 VTK_INT
00186 #elif VTK_SIZEOF_LONG == 4
00187 typedef unsigned long vtkTypeUInt32;
00188 typedef signed long vtkTypeInt32;
00189 # define VTK_TYPE_UINT32 VTK_UNSIGNED_LONG
00190 # define VTK_TYPE_INT32 VTK_LONG
00191 #else
00192 # error "No native data type can represent a 32-bit integer."
00193 #endif
00194
00195
00196 #if defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8
00197 typedef unsigned long long vtkTypeUInt64;
00198 typedef signed long long vtkTypeInt64;
00199 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG_LONG
00200 # define VTK_TYPE_INT64 VTK_LONG_LONG
00201 #elif VTK_SIZEOF_LONG == 8
00202 typedef unsigned long vtkTypeUInt64;
00203 typedef signed long vtkTypeInt64;
00204 # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG
00205 # define VTK_TYPE_INT64 VTK_LONG
00206 #elif defined(VTK_TYPE_USE___INT64) && VTK_SIZEOF___INT64 == 8
00207 typedef unsigned __int64 vtkTypeUInt64;
00208 typedef signed __int64 vtkTypeInt64;
00209 # define VTK_TYPE_UINT64 VTK_UNSIGNED___INT64
00210 # define VTK_TYPE_INT64 VTK___INT64
00211 #else
00212 # error "No native data type can represent a 64-bit integer."
00213 #endif
00214
00215
00216 #if VTK_SIZEOF_FLOAT == 4
00217 typedef float vtkTypeFloat32;
00218 # define VTK_TYPE_FLOAT32 VTK_FLOAT
00219 #else
00220 # error "No native data type can represent a 32-bit floating point value."
00221 #endif
00222
00223
00224 #if VTK_SIZEOF_DOUBLE == 8
00225 typedef double vtkTypeFloat64;
00226 # define VTK_TYPE_FLOAT64 VTK_DOUBLE
00227 #else
00228 # error "No native data type can represent a 64-bit floating point value."
00229 #endif
00230
00231
00232
00233 #define VTK_HAS_ID_TYPE
00234 #ifdef VTK_USE_64BIT_IDS
00235 # if defined(VTK_SIZEOF_LONG) && VTK_SIZEOF_LONG == 8 && 0
00236 typedef long vtkIdType;
00237 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG
00238 # define VTK_LARGE_ID VTK_LONG_MAX
00239 # elif defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8
00240 typedef long long vtkIdType;
00241 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG_LONG
00242 # define VTK_LARGE_ID VTK_LONG_LONG_MAX
00243 # elif defined(VTK_TYPE_USE___INT64) && VTK_SIZEOF___INT64 == 8
00244 typedef __int64 vtkIdType;
00245 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF___INT64
00246 # define VTK_LARGE_ID VTK___INT64_MAX
00247 # else
00248 # error "VTK_USE_64BIT_IDS is ON but no 64-bit integer type is available."
00249 # endif
00250 #else
00251 typedef int vtkIdType;
00252 # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_INT
00253 # define VTK_LARGE_ID VTK_INT_MAX
00254 #endif
00255
00256
00257
00258
00259
00260 #define vtkFloatingPointType vtkFloatingPointType
00261 typedef double vtkFloatingPointType;
00262
00263 #endif