00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef LUX_API_H
00024 #define LUX_API_H 1
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030 typedef char *LuxToken;
00031 typedef char *LuxPointer;
00032 #define LUX_NULL NULL
00033
00034
00035 void luxIdentity();
00036 void luxTranslate(float dx, float dy, float dz);
00037 void luxRotate(float angle, float ax, float ay, float az);
00038 void luxScale(float sx, float sy, float sz);
00039 void luxLookAt(float ex, float ey, float ez, float lx, float ly, float lz, float ux, float uy, float uz);
00040 void luxConcatTransform(float transform[16]);
00041 void luxTransform(float transform[16]);
00042 void luxCoordinateSystem(const char *);
00043 void luxCoordSysTransform(const char *);
00044 void luxPixelFilter(const char *name, ...);
00045 void luxPixelFilterV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00046 void luxFilm(const char *name, ...);
00047 void luxFilmV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00048 void luxSampler(const char *name, ...);
00049 void luxSamplerV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00050 void luxAccelerator(const char *name, ...);
00051 void luxAcceleratorV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00052 void luxSurfaceIntegrator(const char *name, ...);
00053 void luxSurfaceIntegratorV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00054 void luxVolumeIntegrator(const char *name, ...);
00055 void luxVolumeIntegratorV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00056 void luxCamera(const char *name, ...);
00057 void luxCameraV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00058 void luxWorldBegin();
00059 void luxAttributeBegin();
00060 void luxAttributeEnd();
00061 void luxTransformBegin();
00062 void luxTransformEnd();
00063 void luxTexture(const char *name, const char *type, const char *texname, ...);
00064 void luxTextureV(const char *name, const char *type, const char *texname, int n, LuxToken tokens[], LuxPointer params[]);
00065 void luxMaterial(const char *name, ...);
00066 void luxMaterialV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00067 void luxMakeNamedMaterial(const char *name, ...);
00068 void luxMakeNamedMaterialV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00069 void luxNamedMaterial(const char *name, ...);
00070 void luxNamedMaterialV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00071 void luxLightSource(const char *name, ...);
00072 void luxLightSourceV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00073 void luxAreaLightSource(const char *name, ...);
00074 void luxAreaLightSourceV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00075 void luxPortalShape(const char *name, ...);
00076 void luxPortalShapeV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00077 void luxShape(const char *name, ...);
00078 void luxShapeV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00079 void luxReverseOrientation();
00080 void luxVolume(const char *name, ...);
00081 void luxVolumeV(const char *name, int n, LuxToken tokens[], LuxPointer params[]);
00082 void luxObjectBegin(const char *name);
00083 void luxObjectEnd();
00084 void luxObjectInstance(const char *name);
00085 void luxWorldEnd();
00086
00087
00088 void luxStart();
00089 void luxPause();
00090 void luxExit();
00091 void luxWait();
00092
00093
00094 int luxAddThread();
00095 void luxRemoveThread();
00096
00097
00098 void luxUpdateFramebuffer();
00099 unsigned char* luxFramebuffer();
00100
00101
00102 void luxAddServer(const char * name);
00103 void luxUpdateFilmFromNetwork();
00104 void luxSetNetworkServerUpdateInterval(int updateInterval);
00105 int luxGetNetworkServerUpdateInterval();
00106
00107
00108 double luxStatistics(const char *statName);
00109
00110
00111 void luxEnableDebugMode();
00112
00113
00114 extern int luxLastError;
00115 typedef void (*LuxErrorHandler)(int code, int severity, const char *msg);
00116 extern void luxErrorHandler(LuxErrorHandler handler);
00117 extern void luxErrorAbort(int code, int severity, const char *message);
00118 extern void luxErrorIgnore(int code, int severity, const char *message);
00119 extern void luxErrorPrint(int code, int severity, const char *message);
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131 #define LUX_NOERROR 0
00132
00133 #define LUX_NOMEM 1
00134 #define LUX_SYSTEM 2
00135 #define LUX_NOFILE 3
00136 #define LUX_BADFILE 4
00137 #define LUX_BADVERSION 5
00138 #define LUX_DISKFULL 6
00139
00140 #define LUX_UNIMPLEMENT 12
00141 #define LUX_LIMIT 13
00142 #define LUX_BUG 14
00143
00144 #define LUX_NOTSTARTED 23
00145 #define LUX_NESTING 24
00146 #define LUX_NOTOPTIONS 25
00147 #define LUX_NOTATTRIBS 26
00148 #define LUX_NOTPRIMS 27
00149 #define LUX_ILLSTATE 28
00150 #define LUX_BADMOTION 29
00151 #define LUX_BADSOLID 30
00152
00153 #define LUX_BADTOKEN 41
00154 #define LUX_RANGE 42
00155 #define LUX_CONSISTENCY 43
00156 #define LUX_BADHANDLE 44
00157 #define LUX_NOPLUGIN 45
00158 #define LUX_MISSINGDATA 46
00159 #define LUX_SYNTAX 47
00160
00161 #define LUX_MATH 61
00162
00163
00164
00165 #define LUX_INFO 0
00166 #define LUX_WARNING 1
00167 #define LUX_ERROR 2
00168 #define LUX_SEVERE 3
00169
00170 #ifdef __cplusplus
00171 }
00172 #endif
00173
00174 #endif