00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PRISMS_H__
00021 #define __PRISMS_H__
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027
00028 #if !defined(TRUE) || ((TRUE) != 1)
00029 #define TRUE (1)
00030 #endif
00031
00032 #if !defined(FALSE) || ((FALSE) != 0)
00033 #define FALSE (0)
00034 #endif
00035
00036
00037
00038
00039
00040 #define ANY 0
00041 #define ASCII 0x100
00042 #define BPOLY 0x1
00043 #define POLY (BPOLY | ASCII)
00044 #define BPATCH 0x20
00045 #define PATCH (BPATCH | ASCII)
00046 #define DRAW 0x80
00047 #define BCHAN 0x200
00048 #define CHAN (BCHAN | ASCII)
00049
00050
00051
00052
00053
00054 #define BPOLY_CODE 0x62706F6C
00055 #define BPATCH_CODE 0x62706174
00056 #define BCHAN_CODE 0x6E616863
00057
00058
00059
00060
00061 #define XINDEX 0
00062 #define YINDEX 1
00063 #define ZINDEX 2
00064 #define WINDEX 3
00065
00066
00067 #define RINDEX 0
00068 #define GINDEX 1
00069 #define BINDEX 2
00070 #define TINDEX 3
00071
00072
00073 #define TXTU 0
00074 #define TXTV 1
00075
00076
00077
00078 #ifndef WIN32
00079 typedef float POINT[4];
00080 #endif
00081
00082 typedef float VECTOR[3];
00083 typedef float COLOR[4];
00084 typedef float TEXTURE[2];
00085 typedef float Mat33[3][3];
00086 typedef float Mat44[4][4];
00087 typedef unsigned char CHARCOLOR[4];
00088 typedef float BoundingBox[3][2];
00089
00090
00091
00092 #if !defined(MBSD)
00093 typedef struct {
00094 float x;
00095 float y;
00096 float z;
00097 float w;
00098 } Point, *PointPointer;
00099 #endif
00100
00101 typedef struct {
00102 float x;
00103 float y;
00104 float z;
00105 } Vector, *VectorPointer;
00106
00107 typedef struct {
00108 float r;
00109 float g;
00110 float b;
00111 float t;
00112 } Color, *ColorPointer;
00113
00114 #ifndef SESI_LITTLE_ENDIAN
00115 typedef struct {
00116 unsigned char t;
00117 unsigned char b;
00118 unsigned char g;
00119 unsigned char r;
00120 } CharColor, *CharColorPointer;
00121 #else
00122 typedef struct {
00123 unsigned char r;
00124 unsigned char g;
00125 unsigned char b;
00126 unsigned char t;
00127 } CharColor, *CharColorPointer;
00128 #endif
00129
00130 typedef struct {
00131 float u;
00132 float v;
00133 } Txtr, *TxtrPointer;
00134
00135 typedef struct {
00136 float _00, _01, _02,
00137 _10, _11, _12,
00138 _20, _21, _22;
00139 } MatStruct33, *MatStruct33Pointer;
00140
00141 typedef struct {
00142 float _00, _01, _02, _03,
00143 _10, _11, _12, _13,
00144 _20, _21, _22, _23,
00145 _30, _31, _32, _33;
00146 } MatStruct44, *MatStruct44Pointer;
00147
00148 #ifdef SYSTEM5
00149
00150 #ifndef bcopy
00151 #define bcopy(a, b, c) memcpy((b), (a), (c))
00152 #endif
00153
00154 #ifndef bzero
00155 #define bzero(a, b) memset((a), 0, (b))
00156 #endif
00157
00158 #define index strchr
00159 #define rindex strrchr
00160
00161 #if !defined(__STRING_H__) && !defined(WIN32)
00162 extern char *strchr(const char *, int);
00163 extern char *strrchr(const char *, int);
00164 #endif
00165
00166 #endif
00167
00168 #ifdef BSD42
00169 #define strchr index
00170 #define strrchr rindex
00171
00172 extern char *index(), *rindex();
00173 #endif
00174
00175 #ifdef __cplusplus
00176 }
00177 #endif
00178
00179 #endif