~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to render/ri.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*___________________________________________________________________________
 
2
**
 
3
** Based on Renderman Interface version 3.2
 
4
**
 
5
** Renderman Interface is Copyright (c) 1988 Pixar. All Rights reserved.
 
6
**
 
7
**___________________________________________________________________________
 
8
*/
 
9
 
 
10
//? Is ri.h included already?
 
11
#ifndef RI_H_INCLUDED 
 
12
//{
 
13
#define RI_H_INCLUDED 1
 
14
 
 
15
#include        "float.h"
 
16
 
 
17
#define _qShareName     CORE
 
18
#ifdef  WIN32
 
19
#  ifdef        AQSIS_STATIC_LINK
 
20
 
 
21
#    define  _qShare
 
22
#    define     _qShareC
 
23
#    define     _qShareM
 
24
 
 
25
#    undef _qShareName
 
26
 
 
27
#  else // AQSIS_DYNAMIC_LINK
 
28
 
 
29
#    define _qExportM __declspec(dllexport)
 
30
#    define _qImportM __declspec(dllimport)
 
31
 
 
32
#    define _qExportC
 
33
#    define _qImportC
 
34
 
 
35
#    define _qExport __declspec(dllexport)
 
36
#    define _qImport __declspec(dllimport)
 
37
 
 
38
#    undef  _qShare
 
39
#    undef      _qShareC
 
40
#    undef      _qShareM
 
41
 
 
42
#    ifdef _qBUILDING
 
43
#      if _qBUILDING == _qShareName
 
44
#        define _qShare _qExport
 
45
#        define _qShareM _qExportM
 
46
#        define _qShareC _qExportC
 
47
#      else
 
48
#        define _qShare _qImport
 
49
#        define _qShareM _qImportM
 
50
#        define _qShareC _qImportC
 
51
#      endif
 
52
#    else
 
53
#      define   _qShare _qImport
 
54
#      define _qShareM _qImportM
 
55
#      define _qShareC _qImportC
 
56
#    endif // _qBUILDING
 
57
 
 
58
#    undef _qShareName
 
59
 
 
60
#  endif        // AQSIS_DYNAMIC_LINK
 
61
 
 
62
#else   // !WIN32
 
63
 
 
64
#  define  _qShare
 
65
#  define       _qShareC
 
66
#  define       _qShareM
 
67
 
 
68
#  undef _qShareName
 
69
 
 
70
#endif // WIN32
 
71
 
 
72
#ifdef  __cplusplus
 
73
extern  "C"
 
74
{
 
75
#endif
 
76
 
 
77
 
 
78
    /*
 
79
     *          RenderMan Interface Standard Include File
 
80
     */
 
81
 
 
82
    /* Definitions of Abstract Types Used in RI */
 
83
 
 
84
    typedef     short   RtBoolean;
 
85
    typedef     int             RtInt;
 
86
    typedef     float   RtFloat;
 
87
 
 
88
    typedef     char*   RtToken;
 
89
 
 
90
    typedef     RtFloat RtColor[ 3 ];
 
91
    typedef     RtFloat RtPoint[ 3 ];
 
92
    typedef     RtFloat RtMatrix[ 4 ][ 4 ];
 
93
    typedef     RtFloat RtBasis[ 4 ][ 4 ];
 
94
    typedef     RtFloat RtBound[ 6 ];
 
95
    typedef     char*   RtString;
 
96
 
 
97
    typedef     void*   RtPointer;
 
98
    typedef     void    RtVoid;
 
99
 
 
100
    typedef     RtFloat ( *RtFilterFunc ) ( RtFloat, RtFloat, RtFloat, RtFloat );
 
101
    typedef     RtFloat ( *RtFloatFunc ) ();
 
102
    typedef     RtVoid  ( *RtFunc ) ();
 
103
    typedef     RtVoid  ( *RtErrorFunc ) ( RtInt code, RtInt severity, RtString message );
 
104
    typedef     RtErrorFunc     RtErrorHandler;
 
105
 
 
106
    typedef     RtVoid  ( *RtProcSubdivFunc ) ( RtPointer, RtFloat );
 
107
    typedef     RtVoid  ( *RtProcFreeFunc ) ( RtPointer );
 
108
    typedef     RtVoid  ( *RtArchiveCallback ) ( RtToken, char *, ... );
 
109
 
 
110
    typedef     RtPointer       RtObjectHandle;
 
111
    typedef     RtPointer       RtLightHandle;
 
112
    typedef     RtPointer       RtContextHandle;
 
113
 
 
114
    /* Extern Declarations for Predefined RI Data Structures */
 
115
 
 
116
#define RI_FALSE        0
 
117
#define RI_TRUE         1
 
118
#define RI_INFINITY     FLT_MAX
 
119
#define RI_EPSILON      FLT_EPSILON
 
120
#define RI_NULL         ((RtToken)0)
 
121
 
 
122
#define RI_FLOATMIN     FLT_MIN
 
123
#define RI_FLOATMAX     FLT_MAX
 
124
 
 
125
#define RI_PI           3.14159265359f
 
126
#define RI_PIO2         RI_PI/2
 
127
 
 
128
#define RI_SHADER_EXTENSION     ".slx"
 
129
 
 
130
    _qShare     extern  RtToken RI_FRAMEBUFFER, RI_FILE;
 
131
    _qShare     extern  RtToken RI_RGB, RI_RGBA, RI_RGBZ, RI_RGBAZ, RI_A, RI_Z, RI_AZ;
 
132
    _qShare     extern  RtToken RI_MERGE, RI_ORIGIN;
 
133
    _qShare     extern  RtToken RI_PERSPECTIVE, RI_ORTHOGRAPHIC;
 
134
    _qShare     extern  RtToken RI_HIDDEN, RI_PAINT;
 
135
    _qShare     extern  RtToken RI_CONSTANT, RI_SMOOTH;
 
136
    _qShare     extern  RtToken RI_FLATNESS, RI_FOV;
 
137
 
 
138
    _qShare     extern  RtToken RI_AMBIENTLIGHT, RI_POINTLIGHT,
 
139
    RI_DISTANTLIGHT, RI_SPOTLIGHT;
 
140
    _qShare     extern  RtToken RI_INTENSITY, RI_LIGHTCOLOR, RI_FROM, RI_TO,
 
141
    RI_CONEANGLE, RI_CONEDELTAANGLE,
 
142
    RI_BEAMDISTRIBUTION;
 
143
    _qShare     extern  RtToken RI_MATTE, RI_METAL, RI_PLASTIC, RI_SHINYMETAL, RI_PAINTEDPLASTIC;
 
144
    _qShare     extern  RtToken RI_KA, RI_KD, RI_KS, RI_ROUGHNESS, RI_KR,
 
145
    RI_TEXTURENAME, RI_SPECULARCOLOR;
 
146
    _qShare     extern  RtToken RI_DEPTHCUE, RI_FOG, RI_BUMPY;
 
147
    _qShare     extern  RtToken RI_MINDISTANCE, RI_MAXDISTANCE, RI_BACKGROUND,
 
148
    RI_DISTANCE, RI_AMPLITUDE;
 
149
 
 
150
    _qShare     extern  RtToken RI_RASTER, RI_SCREEN, RI_CAMERA, RI_WORLD,
 
151
    RI_OBJECT;
 
152
    _qShare     extern  RtToken RI_INSIDE, RI_OUTSIDE, RI_LH, RI_RH;
 
153
    //__declspec(dllimport) RtToken RI_P;
 
154
    _qShare     extern  RtToken RI_P, RI_PZ, RI_PW, RI_N, RI_NP, RI_CS, RI_OS,
 
155
    RI_S, RI_T, RI_ST;
 
156
    _qShare     extern  RtToken RI_BILINEAR, RI_BICUBIC;
 
157
    _qShare     extern  RtToken RI_LINEAR, RI_CUBIC;
 
158
    _qShare     extern  RtToken RI_PRIMITIVE, RI_INTERSECTION, RI_UNION,
 
159
    RI_DIFFERENCE;
 
160
    _qShare     extern  RtToken RI_WRAP, RI_NOWRAP, RI_PERIODIC, RI_NONPERIODIC, RI_CLAMP,
 
161
    RI_BLACK;
 
162
    _qShare     extern  RtToken RI_IGNORE, RI_PRINT, RI_ABORT, RI_HANDLER;
 
163
    _qShare     extern  RtToken RI_IDENTIFIER, RI_NAME;
 
164
    _qShare     extern  RtToken RI_COMMENT, RI_STRUCTURE, RI_VERBATIM;
 
165
    _qShare     extern  RtToken RI_WIDTH, RI_CONSTANTWIDTH;
 
166
 
 
167
    _qShare     extern  RtToken RI_CURRENT, RI_SHADER, RI_EYE, RI_NDC;
 
168
 
 
169
    _qShare     extern  RtBasis RiBezierBasis, RiBSplineBasis, RiCatmullRomBasis,
 
170
    RiHermiteBasis, RiPowerBasis;
 
171
 
 
172
#define RI_BEZIERSTEP           ((RtInt)3)
 
173
#define RI_BSPLINESTEP          ((RtInt)1)
 
174
#define RI_CATMULLROMSTEP       ((RtInt)1)
 
175
#define RI_HERMITESTEP          ((RtInt)2)
 
176
#define RI_POWERSTEP            ((RtInt)4)
 
177
 
 
178
    _qShare     extern  RtInt   RiLastError;
 
179
 
 
180
    /* Declarations of All of the RenderMan Interface Subroutines */
 
181
 
 
182
#define PARAMETERLIST   RtInt count, RtToken tokens[], RtPointer values[]
 
183
 
 
184
        // Include the automatically generated procedure declarations. 
 
185
        // Generated from api.xml, using apiheader.xsl
 
186
 
 
187
        #include        "ri.inl"
 
188
 
 
189
    // Specific to Aqsis
 
190
 
 
191
    typedef     RtVoid  ( *RtProgressFunc ) ( RtFloat PercentComplete, RtInt FrameNo );
 
192
 
 
193
    _qShare     RtBoolean       BasisFromName( RtBasis * b, const char * strName );
 
194
    _qShare     RtVoid  RiProgressHandler( RtProgressFunc handler );
 
195
    _qShare     RtFunc  RiPreRenderFunction( RtFunc function );
 
196
    _qShare     RtFunc  RiPreWorldFunction( RtFunc function );
 
197
 
 
198
#ifdef  __cplusplus
 
199
}
 
200
#endif
 
201
 
 
202
/*
 
203
  Error Codes
 
204
  
 
205
   1 - 10         System and File Errors
 
206
  11 - 20         Program Limitations
 
207
  21 - 40         State Errors
 
208
  41 - 60         Parameter and Protocol Errors
 
209
  61 - 80         Execution Errors
 
210
*/
 
211
#define RIE_NOERROR     ((RtInt)0)
 
212
 
 
213
#define RIE_NOMEM       ((RtInt)1)      /* Out of memory */
 
214
#define RIE_SYSTEM      ((RtInt)2)      /* Miscellaneous system error */
 
215
#define RIE_NOFILE      ((RtInt)3)      /* File nonexistent */
 
216
#define RIE_BADFILE     ((RtInt)4)      /* Bad file format */
 
217
#define RIE_VERSION     ((RtInt)5)      /* File version mismatch */
 
218
#define RIE_DISKFULL    ((RtInt)6)      /* Target disk is full */
 
219
 
 
220
#define RIE_INCAPABLE   ((RtInt)11)     /* Optional RI feature */
 
221
#define RIE_UNIMPLEMENT ((RtInt)12)     /* Unimplemented feature */
 
222
#define RIE_LIMIT       ((RtInt)13)     /* Arbitrary program limit */
 
223
#define RIE_BUG         ((RtInt)14)     /* Probably a bug in renderer */
 
224
 
 
225
#define RIE_NOTSTARTED  ((RtInt)23)     /* RiBegin not called */
 
226
#define RIE_NESTING     ((RtInt)24)     /* Bad begin-end nesting */
 
227
#define RIE_NOTOPTIONS  ((RtInt)25)     /* Invalid state for options */
 
228
#define RIE_NOTATTRIBS  ((RtInt)26)     /* Invalid state for attribs */
 
229
#define RIE_NOTPRIMS    ((RtInt)27)     /* Invalid state for primitives */
 
230
#define RIE_ILLSTATE    ((RtInt)28)     /* Other invalid state */
 
231
#define RIE_BADMOTION   ((RtInt)29)     /* Badly formed motion block */
 
232
#define RIE_BADSOLID    ((RtInt)30)     /* Badly formed solid block */
 
233
 
 
234
#define RIE_BADTOKEN    ((RtInt)41)     /* Invalid token for request */
 
235
#define RIE_RANGE       ((RtInt)42)     /* Parameter out of range */
 
236
#define RIE_CONSISTENCY ((RtInt)43)     /* Parameters inconsistent */
 
237
#define RIE_BADHANDLE   ((RtInt)44)     /* Bad object/light handle */
 
238
#define RIE_NOSHADER    ((RtInt)45)     /* Can't load requested shader */
 
239
#define RIE_MISSINGDATA ((RtInt)46)     /* Required parameters not provided */
 
240
#define RIE_SYNTAX      ((RtInt)47)     /* Declare type syntax error */
 
241
 
 
242
#define RIE_MATH        ((RtInt)61)     /* Zerodivide, noninvert matrix, etc. */
 
243
 
 
244
/* Error severity levels */
 
245
#define RIE_INFO        ((RtInt)0)      /* Rendering stats and other info */
 
246
#define RIE_WARNING     ((RtInt)1)      /* Something seems wrong, maybe okay */
 
247
#define RIE_ERROR       ((RtInt)2)      /* Problem. Results may be wrong */
 
248
#define RIE_SEVERE      ((RtInt)3)      /* So bad you should probably abort */
 
249
 
 
250
 
 
251
//}  // End of #ifdef RI_H_INCLUDED
 
252
#endif
 
253