home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / ri / ri.h < prev    next >
C/C++ Source or Header  |  1992-12-02  |  29KB  |  684 lines

  1. /*
  2.  * rihydra.h - temporary Hydra version of PRMan ri.h
  3.  * Derived from edit 1.27 of PRMan ri.h, should evenutally be reconciled
  4.  * with PRMan and one version should serve both PRMan and Hydra.
  5.  */
  6.  
  7. /*-______________________________________________________________________
  8. ** 
  9. ** Copyright (c) 1988 Pixar.  All rights reserved.  This program or
  10. ** documentation contains proprietary confidential information and trade
  11. ** secrets of Pixar.  Reverse engineering of object code is prohibited.
  12. ** Use of copyright notice is precautionary and does not imply
  13. ** publication.
  14. ** 
  15. **                      RESTRICTED RIGHTS NOTICE
  16. ** 
  17. ** Use, duplication, or disclosure by the Government is subject to
  18. ** restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
  19. ** Technical Data and Computer Software clause at 252.227-7013.
  20. ** 
  21. ** Pixar
  22. ** 3240 Kerner Blvd.
  23. ** San Rafael, CA  94901
  24. ** 
  25. ** ______________________________________________________________________
  26. */
  27.  
  28. /*
  29.  *    RenderMan Interface Standard Include File
  30.  */
  31.  
  32. #ifndef RI_H
  33. #define RI_H
  34.  
  35.  
  36.     /* Definitions of Abstract Types used in RI */
  37.  
  38. typedef short     RtBoolean;
  39. typedef long     RtInt;
  40. typedef float     RtFloat;
  41.  
  42. typedef char    *RtToken;
  43.  
  44. typedef RtFloat     RtColor[3];
  45. typedef RtFloat     RtPoint[3];
  46. typedef RtFloat     RtMatrix[4][4];
  47. typedef RtFloat     RtBasis[4][4];
  48. typedef RtFloat     RtBound[6];
  49. typedef char    *RtString;
  50.  
  51. /*
  52.  * RtPointer should be void *, but too many C compilers
  53.  * handle this incorrectly, or are incapable of dealing
  54.  * with the use of RtPointer in subsequent typedefs.
  55.  */
  56. #ifdef    __STDC__
  57. typedef void     *RtPointer;
  58. #define RtVoid   void
  59. #else    /* __STDC__ */
  60. typedef char     *RtPointer;
  61. typedef int      RtVoid;
  62. #endif    /* __STDC__ */
  63. typedef    RtFloat    (*RtFloatFunc)();
  64. typedef RtVoid    (*RtFunc)();
  65.  
  66. #ifndef RtConst
  67. #define RtConst
  68. #endif
  69.  
  70. typedef RtPointer RtObjectHandle;
  71. typedef RtPointer RtLightHandle;
  72.  
  73.     /* Extern Declarations for Predefined RI Data Structures */
  74.  
  75. #define RI_FALSE    0
  76. #define RI_TRUE        (! RI_FALSE)
  77. #define RI_INFINITY    1.0e38
  78. #define RI_EPSILON    1.0e-10
  79.  
  80. #define RI_NULL        ((RtToken)0)
  81.  
  82. extern RtToken    RI_FRAMEBUFFER, RI_FILE;
  83. extern RtToken    RI_RGB, RI_RGBA, RI_RGBZ, RI_RGBAZ, RI_A, RI_Z, RI_AZ;
  84. extern RtToken    RI_PERSPECTIVE, RI_ORTHOGRAPHIC;
  85. extern RtToken    RI_HIDDEN, RI_PAINT;
  86. extern RtToken    RI_CONSTANT, RI_SMOOTH;
  87. extern RtToken  RI_ORIGIN, RI_FLATNESS, RI_TRIMDEVIATION, RI_FOV;
  88.  
  89. extern RtToken    RI_AMBIENTLIGHT, RI_POINTLIGHT, RI_DISTANTLIGHT, RI_SPOTLIGHT;
  90. extern RtToken    RI_INTENSITY, RI_LIGHTCOLOR, RI_FROM, RI_TO, RI_CONEANGLE,
  91.         RI_CONEDELTAANGLE, RI_BEAMDISTRIBUTION;
  92. extern RtToken    RI_MATTE, RI_METAL, RI_SHINYMETAL;
  93. extern RtToken    RI_PLASTIC, RI_PAINTEDPLASTIC;
  94. extern RtToken    RI_KA, RI_KD, RI_KS, RI_ROUGHNESS, RI_SPECULARCOLOR;
  95. extern RtToken    RI_KR, RI_TEXTURENAME;
  96. extern RtToken    RI_DEPTHCUE, RI_FOG, RI_BUMPY;
  97. extern RtToken    RI_MINDISTANCE, RI_MAXDISTANCE, RI_BACKGROUND, RI_DISTANCE;
  98. extern RtToken    RI_AMPLITUDE;
  99.  
  100. extern RtToken    RI_RASTER, RI_SCREEN, RI_CAMERA, RI_WORLD, RI_OBJECT;
  101. extern RtToken    RI_INSIDE, RI_OUTSIDE, RI_LH, RI_RH;
  102. extern RtToken    RI_P, RI_PZ, RI_PW, RI_N, RI_NP, RI_CS, RI_OS,
  103.         RI_S, RI_T, RI_ST;
  104. extern RtToken    RI_BILINEAR, RI_BICUBIC;
  105. extern RtToken    RI_PRIMITIVE, RI_INTERSECTION, RI_UNION, RI_DIFFERENCE;
  106. extern RtToken    RI_PERIODIC, RI_NONPERIODIC, RI_CLAMP, RI_BLACK;
  107. extern RtToken    RI_IGNORE, RI_PRINT, RI_ABORT, RI_HANDLER;
  108. extern RtToken    RI_COMMENT, RI_STRUCTURE;
  109. extern RtToken    RI_IDENTIFIER, RI_NAME, RI_SHADINGGROUP;
  110.  
  111. /* BEGIN HYDRA AND RMAN 4.0 TOKENS */
  112. extern RtToken    RI_LOCAL, RI_DEFAULTRENDERER, RI_DRAFT, RI_SERVER,
  113.         RI_FILEPATH, RI_FILEPOINTER, RI_TYPE, RI_FORMAT,
  114.         RI_ASCIIFILE, RI_BINARYFILE, RI_COORDINATESYSTEM,
  115.         RI_RENDERER, RI_QUERY, RI_OPEN, RI_CLOSE, RI_READ, RI_WRITE,
  116.         RI_PARAMETER, RI_STORAGECLASS, RI_TESSELATION, RI_DEFER,
  117.         RI_DIMENSION, RI_MACRO, RI_MACRO, RI_FLUSH, RI_UNBUFFERED,
  118.         RI_SYNCHRONOUS, RI_ASYNCHRONOUS, RI_WAIT, RI_SPACE,
  119.         RI_AMBIDEXTROUS, RI_NONE, RI_LINEAR, RI_CUBIC,
  120.         RI_IMAGE, RI_LIGHTSOURCE, RI_ADDRESS, RI_TOKEN,
  121.         RI_ALPHAPRECISION, RI_ATTRIBUTE, RI_COLORDIMENSIONS,
  122.         RI_COLORPRECISION, RI_COMMAND, RI_COMPRESSION, RI_CONTEXT,
  123.         RI_DECLARATION, RI_DETAILLEVEL, RI_DISPLACEMENT, RI_DISPLAY,
  124.         RI_GEOMETRICFIDELITY, RI_GEOMETRY, RI_HIDER, RI_IMAGER,
  125.         RI_INCLUDE, RI_LIGHT, RI_LZW, RI_NULLPOINTER, RI_OPENIMAGE,
  126.         RI_OPTION, RI_PATCH, RI_PICKSET, RI_PIXELASPECTRATIO,
  127.         RI_POLYGON, RI_QUADRIC, RI_RESOLUTION, RI_RESOURCE,
  128.         RI_SHADER, RI_SURFACE, RI_TRANSFORMATION, RI_UTILITY,
  129.         RI_VERSION, RI_VOLUME, RI_WINDOWID, RI_ZPRECISION,
  130.         RI_UNIFORM, RI_VARYING, RI_VERTEX, RI_COLOR, RI_FLOAT,
  131.         RI_INTEGER, RI_POINT, RI_STRING, RI_NOSURFACE,
  132.         RI_BOX, RI_TRIANGLE, RI_CATMULLROM, RI_GAUSSIAN, RI_SINC,
  133.         RI_BEZIER, RI_BSPLINE, RI_CATMULLROM, RI_HERMITE, RI_POWER,
  134.         RI_NOIMAGER, RI_NOAREALIGHT, RI_NOVOLUME, RI_NODISPLACEMENT,
  135.         RI_NOHIDER, RI_DEFAULTSURFACE, RI_BOUND, RI_RESIZE, RI_DENSITY,
  136.         RI_PICK, RI_NOTRANSFORMATION, RI_SKETCH, RI_PARAMETRIC,
  137.         RI_SHOWNXNYNZ, RI_IMAGEFILE, RI_TEXTURE, RI_DRAWING,
  138.         RI_ARCHIVE, RI_ARCHIVEFILE, RI_FASTEST, RI_HIGHESTQUALITY,
  139.         RI_POINTS, RI_GEOMETRICAPPROXIMATION, RI_LINES, RI_POLYGONS,
  140.         RI_DEVIATION, RI_MODE, RI_NOHUE, RI_LOCK, RI_CLIPPING,
  141.         RI_PICKING, RI_PICKTAG, RI_POINTER, RI_PICKABLE,
  142.         RI_SHADING, RI_AVERAGE, RI_TILING, RI_LIGHTING, RI_CULL,
  143.         RI_FLASH, RI_ZBUFFER, RI_INFO, RI_PRMAN;
  144. /* END NEW TOKENS */
  145.  
  146. extern RtConst RtBasis RiBezierBasis, RiBSplineBasis, RiCatmullRomBasis,
  147.         RiHermiteBasis, RiPowerBasis;
  148.  
  149. #define RI_BEZIERSTEP        ((RtInt)3)
  150. #define RI_BSPLINESTEP        ((RtInt)1)
  151. #define RI_CATMULLROMSTEP    ((RtInt)1)
  152. #define RI_HERMITESTEP        ((RtInt)2)
  153. #define RI_POWERSTEP        ((RtInt)4)
  154.  
  155. extern RtInt    RiLastError;
  156.  
  157.  
  158.     /* Declarations of All the RenderMan Interface Subroutines */
  159. /*
  160.  * TODO - reconcile Hydra prototypes with PRMan
  161.  */
  162. #define use_hydra_prototypes    1
  163.  
  164. #if defined(__STDC__)
  165.  
  166. extern RtFloat    RiGaussianFilter(RtFloat x, RtFloat y,
  167.             RtFloat xwidth, RtFloat ywidth);
  168. extern RtFloat    RiBoxFilter(RtFloat x, RtFloat y,
  169.             RtFloat xwidth, RtFloat ywidth);
  170. extern RtFloat    RiTriangleFilter(RtFloat x, RtFloat y,
  171.             RtFloat xwidth, RtFloat ywidth);
  172. extern RtFloat    RiCatmullRomFilter(RtFloat x, RtFloat y,
  173.             RtFloat xwidth, RtFloat ywidth);
  174. extern RtFloat    RiSincFilter(RtFloat x, RtFloat y,
  175.             RtFloat xwidth, RtFloat ywidth);
  176. extern RtFloat    RiBesselFilter(RtFloat x, RtFloat y,
  177.             RtFloat xwidth, RtFloat ywidth);
  178. #ifdef use_hydra_prototypes
  179. RtVoid RiErrorAbort(RtInt type, RtInt severity, char *message,
  180.         RtToken routine, RtToken context);
  181. RtVoid RiErrorDefault(RtInt type, RtInt severity, char *message,
  182.         RtToken routine, RtToken context);
  183. RtVoid RiErrorIgnore(RtInt type, RtInt severity, char *message,
  184.         RtToken routine, RtToken context);
  185. RtVoid RiErrorPrint(RtInt type, RtInt severity, char *message,
  186.         RtToken routine, RtToken context);
  187. #else
  188. extern RtVoid    RiErrorDefault(RtInt code, RtInt severity, char *msg);
  189. extern RtVoid    RiErrorIgnore(RtInt code, RtInt severity, char *msg);
  190. extern RtVoid    RiErrorPrint(RtInt code, RtInt severity, char *msg);
  191. extern RtVoid    RiErrorAbort(RtInt code, RtInt severity, char *msg);
  192. #endif
  193.  
  194. RtToken
  195.     RiDeclare(char *name, char *declaration);
  196.  
  197. extern RtVoid
  198. #ifndef use_hydra_prototypes
  199.     RiBegin(RtToken name),
  200. #endif
  201.     RiEnd(void),
  202.     RiFrameBegin(RtInt frame),
  203.     RiFrameEnd(void),
  204.     RiWorldBegin(void),
  205.     RiWorldEnd(void);
  206.  
  207. extern RtVoid
  208.     RiFormat(RtInt xres, RtInt yres, RtFloat aspect),
  209.     RiFrameAspectRatio(RtFloat aspect),
  210.     RiScreenWindow(RtFloat left, RtFloat right, RtFloat top, RtFloat bot),
  211.     RiCropWindow(RtFloat xmin, RtFloat xmax, RtFloat ymin, RtFloat ymax),
  212.     RiProjection(RtToken name, ...),
  213.     RiProjectionV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  214.     RiClipping(RtFloat hither, RtFloat yon),
  215.     RiDepthOfField(RtFloat fstop, RtFloat focallength, RtFloat focaldistance),
  216.     RiShutter(RtFloat min, RtFloat max);
  217.  
  218. extern RtVoid
  219.     RiPixelVariance(RtFloat variation),
  220.     RiPixelSamples(RtFloat xsamples, RtFloat ysamples),
  221.     RiPixelFilter(RtFloatFunc filterfunc, RtFloat xwidth, RtFloat ywidth),
  222.     RiExposure(RtFloat gain, RtFloat gamma),
  223.     RiImager(RtToken name, ...),
  224.     RiImagerV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  225. #ifdef use_hydra_prototypes
  226.     RiQuantize(RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ampl);
  227. RtToken RiDisplay(char *image, RtToken type, RtToken mode, ...);
  228. RtToken RiDisplayV(char *image, RtToken type, RtToken mode, RtInt parameterCount,
  229.     RtToken *tokens, RtPointer *valuePointers);
  230. #else
  231.     RiQuantize(RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ampl),
  232.     RiDisplay(char *name, RtToken type, RtToken mode, ...),
  233.     RiDisplayV(char *name, RtToken type, RtToken mode,
  234.             RtInt n, RtToken tokens[], RtPointer parms[]);
  235. #endif
  236.  
  237. extern RtVoid
  238.     RiHider(RtToken type, ...),
  239.     RiHiderV(RtToken type, RtInt n, RtToken tokens[], RtPointer parms[]),
  240.     RiColorSamples(RtInt n, RtFloat nRGB[], RtFloat RGBn[]),
  241.     RiRelativeDetail(RtFloat relativedetail),
  242.     RiOption(RtToken name, ...),
  243.     RiOptionV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]);
  244.  
  245. extern RtVoid
  246.     RiAttributeBegin(void),
  247.     RiAttributeEnd(void),
  248.     RiColor(RtColor color),
  249.     RiOpacity(RtColor color),
  250.     RiTextureCoordinates(RtFloat s1, RtFloat t1, RtFloat s2, RtFloat t2,
  251.                 RtFloat s3, RtFloat t3, RtFloat s4, RtFloat t4);
  252.  
  253. #ifdef use_hydra_prototypes
  254. RtToken RiLightSource(char *lightSource, RtToken light, ...);
  255. RtToken RiLightSourceV(char *lightSource, RtToken light, RtInt parameterCount,
  256.     RtToken *tokens, RtPointer *valuePointers);
  257. RtToken RiAreaLightSource(char *lightSource, RtToken light, ...);
  258. RtToken RiAreaLightSourceV(char *lightSource, RtToken light, RtInt parameterCount,
  259.     RtToken *tokens, RtPointer *valuePointers);
  260. #else
  261. extern RtLightHandle
  262.     RiLightSource(RtToken name, ...),
  263.     RiLightSourceV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  264.     RiAreaLightSource(RtToken name, ...),
  265.     RiAreaLightSourceV(RtToken name,
  266.                 RtInt n, RtToken tokens[], RtPointer parms[]);
  267. #endif
  268. extern RtVoid
  269. #ifdef use_hydra_prototypes
  270.     RiIlluminate(RtToken lightSource, RtBoolean on),
  271. #else
  272.     RiIlluminate(RtLightHandle light, RtBoolean onoff),
  273. #endif
  274.     RiSurface(RtToken name, ...),
  275.     RiSurfaceV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  276.     RiAtmosphere(RtToken name, ...),
  277.     RiAtmosphereV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  278.     RiInterior(RtToken name, ...),
  279.     RiInteriorV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  280.     RiExterior(RtToken name, ...),
  281.     RiExteriorV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  282.     RiShadingRate(RtFloat size),
  283.     RiShadingInterpolation(RtToken type),
  284.     RiMatte(RtBoolean onoff);
  285.  
  286. extern RtVoid
  287.     RiBound(RtBound bound),
  288.     RiDetail(RtBound bound),
  289.     RiDetailRange(RtFloat minvis, RtFloat lowtran, RtFloat uptran,
  290.             RtFloat maxvis),
  291. #ifndef use_hydra_prototypes    /* if (3.1 spec) */
  292.     RiGeometricApproximation(RtToken type, RtFloat value),
  293. #endif
  294.     RiOrientation(RtToken orientation),
  295.     RiReverseOrientation(void),
  296.     RiSides(RtInt sides);
  297.  
  298. extern RtVoid
  299.     RiIdentity(void),
  300.     RiTransform(RtMatrix transform),
  301.     RiConcatTransform(RtMatrix transform),
  302.     RiPerspective(RtFloat fov),
  303.     RiTranslate(RtFloat dx, RtFloat dy, RtFloat dz),
  304.     RiRotate(RtFloat angle, RtFloat dx, RtFloat dy, RtFloat dz),
  305.     RiScale(RtFloat sx, RtFloat sy, RtFloat sz),
  306.     RiSkew(RtFloat angle, RtFloat dx1, RtFloat dy1, RtFloat dz1,
  307.         RtFloat dx2, RtFloat dy2, RtFloat dz2),
  308.     RiDeformation(RtToken name, ...),
  309.     RiDeformationV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  310.     RiDisplacement(RtToken name, ...),
  311. #ifdef use_hydra_prototypes
  312.     RiDisplacementV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]);
  313. RtToken RiCoordinateSystem(char *space);
  314. #else
  315.     RiDisplacementV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]),
  316.     RiCoordinateSystem(RtToken space);
  317. #endif
  318. extern RtPoint
  319.     *RiTransformPoints(RtToken fromspace, RtToken tospace, RtInt n,
  320.                RtPoint points[]);
  321. extern RtVoid
  322.     RiTransformBegin(void),
  323.     RiTransformEnd(void);
  324.  
  325. extern RtVoid
  326.     RiAttribute(RtToken name, ...),
  327.     RiAttributeV(RtToken name, RtInt n, RtToken tokens[], RtPointer parms[]);
  328.  
  329. extern RtVoid
  330.     RiPolygon(RtInt nverts, ...),
  331.     RiPolygonV(RtInt nverts, RtInt n, RtToken tokens[], RtPointer parms[]),
  332.     RiGeneralPolygon(RtInt nloops, RtInt nverts[], ...),
  333.     RiGeneralPolygonV(RtInt nloops, RtInt nverts[],
  334.                 RtInt n, RtToken tokens[], RtPointer parms[]),
  335.     RiPointsPolygons(RtInt npolys, RtInt nverts[], RtInt verts[], ...),
  336.     RiPointsPolygonsV(RtInt npolys, RtInt nverts[], RtInt verts[],
  337.                 RtInt n, RtToken tokens[], RtPointer parms[]),
  338.     RiPointsGeneralPolygons(RtInt npolys, RtInt nloops[], RtInt nverts[],
  339.                 RtInt verts[], ...),
  340.     RiPointsGeneralPolygonsV(RtInt npolys, RtInt nloops[], RtInt nverts[],
  341.             RtInt verts[], RtInt n, RtToken tokens[], RtPointer parms[]),
  342.     RiBasis(RtBasis ubasis, RtInt ustep, RtBasis vbasis, RtInt vstep),
  343.     RiPatch(RtToken type, ...),
  344.     RiPatchV(RtToken type, RtInt n, RtToken tokens[], RtPointer parms[]),
  345.     RiPatchMesh(RtToken type, RtInt nu, RtToken uwrap,
  346.             RtInt nv, RtToken vwrap, ...),
  347.     RiPatchMeshV(RtToken type, RtInt nu, RtToken uwrap,
  348.             RtInt nv, RtToken vwrap,
  349.             RtInt n, RtToken tokens[], RtPointer parms[]),
  350.     RiNuPatch(RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin, RtFloat umax,
  351.             RtInt nv, RtInt vorder, RtFloat vknot[], RtFloat vmin,
  352.             RtFloat vmax, ...),
  353.     RiNuPatchV(RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin,
  354.             RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[],
  355.             RtFloat vmin, RtFloat vmax,
  356.             RtInt n, RtToken tokens[], RtPointer parms[]),
  357.     RiTrimCurve(RtInt nloops, RtInt ncurves[], RtInt order[], RtFloat knot[],
  358.             RtFloat min[], RtFloat max[], RtInt n[],
  359.             RtFloat u[], RtFloat v[], RtFloat w[]);
  360.  
  361. extern RtVoid
  362.     RiSphere(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax, ...),
  363.     RiSphereV(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
  364.             RtInt n, RtToken tokens[], RtPointer parms[]),
  365.     RiCone(RtFloat height, RtFloat radius, RtFloat tmax, ...),
  366.     RiConeV(RtFloat height, RtFloat radius, RtFloat tmax,
  367.             RtInt n, RtToken tokens[], RtPointer parms[]),
  368.     RiCylinder(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax, ...),
  369.     RiCylinderV(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
  370.             RtInt n, RtToken tokens[], RtPointer parms[]),
  371.     RiHyperboloid(RtPoint point1, RtPoint point2, RtFloat tmax, ...),
  372.     RiHyperboloidV(RtPoint point1, RtPoint point2, RtFloat tmax,
  373.             RtInt n, RtToken tokens[], RtPointer parms[]),
  374.     RiParaboloid(RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat tmax, ...),
  375.     RiParaboloidV(RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat tmax,
  376.             RtInt n, RtToken tokens[], RtPointer parms[]),
  377.     RiDisk(RtFloat height, RtFloat radius, RtFloat tmax, ...),
  378.     RiDiskV(RtFloat height, RtFloat radius, RtFloat tmax,
  379.             RtInt n, RtToken tokens[], RtPointer parms[]),
  380.     RiTorus(RtFloat majrad, RtFloat minrad, RtFloat phimin, RtFloat phimax,
  381.             RtFloat tmax, ...),
  382.     RiTorusV(RtFloat majrad, RtFloat minrad, RtFloat phimin, RtFloat phimax,
  383.             RtFloat tmax, RtInt n, RtToken tokens[], RtPointer parms[]),
  384.     RiProcedural(RtPointer data, RtBound bound,
  385.             RtFunc subdivfunc, RtFunc freefunc),
  386.     RiGeometry(RtToken type, ...),
  387.     RiGeometryV(RtToken type, RtInt n, RtToken tokens[], RtPointer parms[]);
  388.  
  389. extern RtVoid
  390.     RiSolidBegin(RtToken operation),
  391.     RiSolidEnd(void) ;
  392. #ifdef use_hydra_prototypes
  393. RtToken RiObjectBegin(RtToken handle);
  394. #else
  395. extern RtObjectHandle
  396.     RiObjectBegin(void);
  397. #endif
  398. extern RtVoid
  399.     RiObjectEnd(void),
  400. #ifdef use_hydra_prototypes
  401.     RiObjectInstance(RtToken handle),
  402. #else
  403.     RiObjectInstance(RtObjectHandle handle),
  404. #endif
  405.     RiMotionBegin(RtInt n, ...),
  406.     RiMotionBeginV(RtInt n, RtFloat times[]),
  407.     RiMotionEnd(void) ;
  408.  
  409. #ifdef use_hydra_prototypes
  410. RtToken RiMakeBumpV(RtToken image, char *map, RtToken sWrap, RtToken tWrap,
  411.         RtFloatFunc filterFunction, RtFloat sWidth, RtFloat tWidth,
  412.         RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  413. RtToken RiMakeCubeFaceEnvironmentV(RtToken plusXImage, RtToken minusXImage,
  414.                RtToken plusYImage, RtToken minusYImage,
  415.                RtToken plusZImage, RtToken minusZImage,
  416.                char *map, RtFloat fieldOfView,
  417.                RtFloatFunc filterFunction, RtFloat sWidth,
  418.                RtFloat tWidth, RtInt parameterCount,
  419.                RtToken *tokens, RtPointer *valuePointers);
  420. RtToken RiMakeLatLongEnvironmentV(RtToken image, char *map, RtFloatFunc filterFunction,
  421.     RtFloat sWidth, RtFloat tWidth, RtInt parameterCount, RtToken *tokens,
  422.               RtPointer *valuePointers);
  423. RtToken RiMakeShadowV(RtToken image, char *map, RtInt parameterCount,
  424.           RtToken *tokens, RtPointer *valuePointers);
  425. RtToken RiMakeTextureV(RtToken image, char *map, RtToken sWrap, RtToken tWrap,
  426.            RtFloatFunc filterFunction, RtFloat sWidth, RtFloat tWidth,
  427.            RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  428. RtToken RiMakeBump(RtToken image, char *map, RtToken sWrap, RtToken tWrap,
  429.        RtFloatFunc filterFunction, RtFloat sWidth, RtFloat tWidth, ...);
  430. RtToken RiMakeCubeFaceEnvironment(RtToken plusXImage, RtToken minusXImage,
  431.               RtToken plusYImage, RtToken minusYImage,
  432.               RtToken plusZImage, RtToken minusZImage,
  433.               char *map, RtFloat fieldOfView,
  434.               RtFloatFunc filterFunction, RtFloat sWidth,
  435.               RtFloat tWidth, ...);
  436. RtToken RiMakeLatLongEnvironment(RtToken image, char *map,
  437.              RtFloatFunc filterFunction, RtFloat sWidth,
  438.              RtFloat tWidth, ...);
  439. RtToken RiMakeShadow(RtToken image, char *map, ...);
  440. RtToken RiMakeTexture(RtToken image, char *map, RtToken sWrap, RtToken tWrap,
  441.         RtFloatFunc filterFunction, RtFloat sWidth, RtFloat tWidth, ...);
  442. #else
  443. extern RtVoid
  444.     RiMakeTexture(char *pic, char *tex, RtToken swrap, RtToken twrap,
  445.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat twidth, ...),
  446.     RiMakeTextureV(char *pic, char *tex, RtToken swrap, RtToken twrap,
  447.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat twidth,
  448.         RtInt n, RtToken tokens[], RtPointer parms[]),
  449.     RiMakeBump(char *pic, char *tex, RtToken swrap, RtToken twrap,
  450.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat twidth, ...),
  451.     RiMakeBumpV(char *pic, char *tex, RtToken swrap, RtToken twrap,
  452.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat twidth,
  453.         RtInt n, RtToken tokens[], RtPointer parms[]),
  454.     RiMakeLatLongEnvironment(char *pic, char *tex, RtFloatFunc filterfunc,
  455.         RtFloat swidth, RtFloat twidth, ...),
  456.     RiMakeLatLongEnvironmentV(char *pic, char *tex, RtFloatFunc filterfunc,
  457.         RtFloat swidth, RtFloat twidth,
  458.         RtInt n, RtToken tokens[], RtPointer parms[]),
  459.     RiMakeCubeFaceEnvironment(char *px, char *nx, char *py, char *ny,
  460.         char *pz, char *nz, char *tex, RtFloat fov,
  461.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat ywidth, ...),
  462.     RiMakeCubeFaceEnvironmentV(char *px, char *nx, char *py, char *ny,
  463.         char *pz, char *nz, char *tex, RtFloat fov,
  464.         RtFloatFunc filterfunc, RtFloat swidth, RtFloat ywidth,
  465.         RtInt n, RtToken tokens[], RtPointer parms[]),
  466.     RiMakeShadow(char *pic, char *tex, ...),
  467.     RiMakeShadowV(char *pic, char *tex,
  468.         RtInt n, RtToken tokens[], RtPointer parms[]);
  469. #endif
  470.  
  471. #ifdef    __cplusplus
  472. typedef  RtVoid (*_cplus_fcn_int_int_char_token_token)(RtInt, RtInt,
  473.                 char *,RtToken, RtToken);
  474.  
  475. extern RtVoid
  476.     RiErrorHandler(_cplus_fcn_int_int_char_token_token);
  477. #else
  478. extern RtVoid
  479.     RiErrorHandler(RtVoid (*handler)(RtInt, RtInt, char *,
  480.             RtToken, RtToken));
  481. #endif
  482. extern RtVoid
  483.     RiErrorHandler(RtVoid (*handler)(RtInt, RtInt, char *, RtToken, RtToken));
  484.  
  485. extern RtVoid
  486.     RiArchiveRecord(RtToken type, char *format, ...);
  487.  
  488. /* OBSOLETE call: see RiErrorHandler */
  489. extern RtVoid
  490.     RiErrorMode(RtToken mode, RtFunc handler);
  491.  
  492. #ifdef use_hydra_prototypes
  493. /* Prototypes for functions in Hydra and not (yet) in PRMan */
  494. RtVoid RiAbortError(RtToken routineName, RtToken type , RtInt severity , RtToken context , char message[ ]);
  495. RtToken RiBegin(RtString name, ...);
  496. RtToken RiBeginV(RtString name, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  497. RtVoid RiCardV(RtPoint inp, RtPoint outp, RtInt n, RtToken tokens[], RtPointer parms[]);
  498. RtVoid RiCard(RtPoint inp, RtPoint outp, ...);
  499. RtVoid RiCircle(RtFloat radius, RtFloat thetaMaximum, ...);
  500. RtVoid RiCircleV(RtFloat radius, RtFloat thetaMaximum, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  501. RtToken RiContext(RtToken contextName, ...);
  502. RtVoid RiCoordSysTransform(RtToken space);
  503. RtToken RiCreateHandle(char *handle, RtToken type);
  504. RtVoid RiFreeHandle(RtToken handle, RtToken type);
  505. RtVoid RiCurve(RtToken spline, RtInt controlPointCount, RtToken wrap, ...);
  506. RtVoid RiCurveV(RtToken spline, RtInt controlPointCount, RtToken wrap, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  507. RtVoid RiDetailLevel(RtToken token,...);
  508. RtVoid RiDetailLevelV(RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  509. RtVoid RiDrawing(RtToken shaderName, ...);
  510. RtVoid RiDrawingV(RtToken shaderName, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  511. RtVoid RiFreeParameter(RtToken dictionary, RtToken key, RtToken handle);
  512. RtVoid RiFreeResource(RtToken dictionary, RtToken resource);
  513. RtVoid RiGeometricApproximation(RtToken type, ...);
  514. RtVoid RiGeometricApproximationV(RtToken type, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  515. RtVoid RiGeometricRepresentation(RtToken type);
  516. RtVoid RiIgnoreError(RtToken routineName, RtToken type , RtInt severity , RtToken context , char message[ ]);
  517. RtVoid RiLine(RtInt nvertices, ...);
  518. RtVoid RiLineV(RtInt nvertices, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  519. RtVoid RiLineStyle(RtFloat width, RtInt n, RtFloat *pattern, RtToken cap, RtToken join);
  520. RtToken RiMacroBegin(char *name, ...);
  521. RtToken RiMacroBeginV(char *macro, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  522. RtVoid RiMacroEnd(void);
  523. RtVoid RiMacroInstance(char *name, ...);
  524. RtVoid RiMacroInstanceV(RtToken macro, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  525. RtVoid RiNuCurve(RtInt controlPointCount, RtInt order, RtFloat *knots, RtFloat minimum, RtFloat maximum, ...);
  526. RtVoid RiNuCurveV(RtInt controlPointCount, RtInt order, RtFloat *knots, RtFloat minimum, RtFloat maximum, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  527. RtToken RiParameter(RtToken dictionary, RtToken key, char *parameter, ...);
  528. RtToken RiParameterV(RtToken dictName, RtToken key, char *parameter, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  529. RtVoid RiPointsLines(RtInt nlines, RtInt *nvertices, RtInt *vertices, ...);
  530. RtVoid RiPointsLinesV(RtInt nlines, RtInt *nvertices, RtInt *vertices, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  531. RtVoid RiPreemptBegin(void);
  532. RtVoid RiPreemptEnd(void);
  533. RtVoid RiPrintError(RtToken routineName, RtToken type , RtInt severity , RtToken context , char message[ ]);
  534. RtVoid RiReadArchive(char *name, RtVoid (*callback)(RtToken, char *, char *), ...);
  535. RtVoid RiReadArchiveV(char *name, RtVoid (*callback)(RtToken, char *, char *), RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  536. RtToken RiResource(char *resource, RtToken type, ...);
  537. RtToken RiResourceV(char *resource, RtToken type, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  538. RtVoid RiShaderClose(RtToken resource);
  539. RtBoolean RiShaderOpen(RtToken resource,RtInt parameterCount,RtToken *tokens,RtPointer *valuePointers);
  540. RtVoid RiShaderQuery(RtToken resource,RtInt parameterCount,RtToken *tokens,RtPointer *valuePointers);
  541. RtVoid RiShaderRead(RtToken resource, RtInt byteCount, unsigned char *data);
  542. RtVoid RiShaderWrite(RtToken resource, RtInt byteCount, unsigned char *data);
  543. RtVoid RiShadingInterval(RtFloat interval);
  544. RtVoid RiSynchronize(RtToken mode);
  545. RtVoid RiVersion(RtFloat version);
  546. #endif
  547.  
  548. #else    /* __STDC__ */
  549.  
  550. extern RtFloat    RiGaussianFilter(), RiBoxFilter(),
  551.         RiTriangleFilter(), RiCatmullRomFilter(),
  552.         RiSincFilter(), RiBesselFilter();
  553. extern RtVoid    RiErrorIgnore();
  554. extern RtVoid    RiErrorPrint();
  555. extern RtVoid    RiErrorAbort();
  556.  
  557. extern RtToken    RiDeclare();
  558.  
  559. extern RtVoid    RiBegin(), RiEnd(),
  560.         RiFrameBegin(), RiFrameEnd(),
  561.         RiWorldBegin(), RiWorldEnd();
  562.  
  563. extern RtVoid    RiFormat(), RiFrameAspectRatio(), RiScreenWindow(),
  564.         RiCropWindow(), RiProjection(), RiProjectionV(),
  565.         RiClipping(), RiDepthOfField(), RiShutter();
  566.  
  567. extern RtVoid    RiPixelVariance(), RiPixelSamples(), RiPixelFilter(),
  568.         RiExposure(), RiImager(), RiImagerV(),
  569.         RiQuantize(), RiDisplay(), RiDisplayV();
  570.  
  571. extern RtVoid    RiHider(), RiHiderV(), RiColorSamples(), RiRelativeDetail(),
  572.         RiOption(), RiOptionV();
  573.  
  574. extern RtVoid    RiAttributeBegin(), RiAttributeEnd(),
  575.         RiColor(), RiOpacity(), RiTextureCoordinates();
  576.  
  577. extern RtLightHandle RiLightSource(), RiLightSourceV(),
  578.              RiAreaLightSource(), RiAreaLightSourceV();
  579. extern RtVoid    RiIlluminate(),
  580.         RiSurface(), RiSurfaceV(), RiAtmosphere(), RiAtmosphereV(),
  581.         RiInterior(), RiInteriorV(), RiExterior(), RiExteriorV(),
  582.         RiShadingRate(), RiShadingInterpolation(), RiMatte();
  583.  
  584. extern RtVoid    RiBound(), RiDetail(), RiDetailRange(),
  585.         RiGeometricApproximation(),
  586.         RiOrientation(), RiReverseOrientation(), RiSides();
  587.  
  588. extern RtVoid    RiIdentity(), RiTransform(), RiConcatTransform(),
  589.         RiPerspective(), RiTranslate(), RiRotate(), RiScale(), RiSkew(),
  590.         RiDeformation(), RiDeformationV(),
  591.         RiDisplacement(), RiDisplacementV(), RiCoordinateSystem();
  592. extern RtPoint    *RiTransformPoints();
  593. extern RtVoid    RiTransformBegin(), RiTransformEnd();
  594.  
  595. extern RtVoid    RiAttribute(), RiAttributeV();
  596.  
  597. extern RtVoid    RiPolygon(), RiPolygonV(),
  598.         RiGeneralPolygon(), RiGeneralPolygonV(),
  599.         RiPointsPolygons(), RiPointsPolygonsV(),
  600.         RiPointsGeneralPolygons(), RiPointsGeneralPolygonsV(),
  601.         RiBasis(), RiPatch(), RiPatchV(), RiPatchMesh(), RiPatchMeshV(),
  602.         RiNuPatch(), RiNuPatchV(), RiTrimCurve();
  603.  
  604. extern RtVoid    RiSphere(), RiSphereV(), RiCone(), RiConeV(),
  605.         RiCylinder(), RiCylinderV(), RiHyperboloid(), RiHyperboloidV(),
  606.         RiParaboloid(), RiParaboloidV(), RiDisk(), RiDiskV(),
  607.         RiTorus(), RiTorusV(),
  608.         RiProcedural(), RiGeometry(), RiGeometryV();
  609.  
  610. extern RtVoid    RiSolidBegin(), RiSolidEnd() ;
  611. extern RtObjectHandle    RiObjectBegin();
  612. extern RtVoid    RiObjectEnd(), RiObjectInstance(),
  613.         RiMotionBegin(), RiMotionBeginV(), RiMotionEnd() ;
  614.  
  615. extern RtVoid    RiMakeTexture(), RiMakeTextureV(), RiMakeBump(), RiMakeBumpV(),
  616.         RiMakeLatLongEnvironment(), RiMakeLatLongEnvironmentV(),
  617.         RiMakeCubeFaceEnvironment(), RiMakeCubeFaceEnvironmentV(),
  618.         RiMakeShadow(), RiMakeShadowV();
  619.  
  620. extern RtVoid    RiErrorHandler();
  621.  
  622. extern RtVoid    RiArchiveRecord();
  623.  
  624. RtVoid        RiReadArchive(char *name, RtFunc callback, ...),
  625.         RiReadArchiveV(char *name, RtFunc callback, RtInt parameterCount, RtToken *tokens, RtPointer *valuePointers);
  626.  
  627. /* OBSOLETE call: see RiErrorHandler */
  628. extern RtVoid    RiErrorMode() ;
  629.  
  630. #endif    /* __STDC__ */
  631.  
  632.  
  633. /*
  634.     Error Codes
  635.  
  636.      1 - 10        System and File Errors
  637.     11 - 20        Program Limitations
  638.     21 - 40        State Errors
  639.     41 - 60        Parameter and Protocol Errors
  640.     61 - 80        Execution Errors
  641. */
  642.  
  643.  
  644. #define RIE_NOERROR    ((RtInt)0)
  645.  
  646. #define RIE_NOMEM    ((RtInt)1)    /* Out of memory */
  647. #define RIE_SYSTEM    ((RtInt)2)    /* Miscellaneous system error */
  648. #define RIE_NOFILE    ((RtInt)3)    /* File nonexistent */
  649. #define RIE_BADFILE    ((RtInt)4)    /* Bad file format */
  650. #define RIE_VERSION    ((RtInt)5)    /* File version mismatch */
  651.  
  652. #define RIE_INCAPABLE    ((RtInt)11)    /* Optional RI feature */
  653. #define RIE_UNIMPLEMENT    ((RtInt)12)    /* Unimplemented feature */
  654. #define RIE_LIMIT    ((RtInt)13)    /* Arbitrary program limit */
  655. #define RIE_BUG        ((RtInt)14)    /* Probably a bug in renderer */
  656.  
  657. #define RIE_NOTSTARTED    ((RtInt)23)    /* RiBegin not called */
  658. #define RIE_NESTING    ((RtInt)24)    /* Bad begin-end nesting */
  659. #define RIE_NOTOPTIONS    ((RtInt)25)    /* Invalid state for options */
  660. #define RIE_NOTATTRIBS    ((RtInt)26)    /* Invalid state for attribs */
  661. #define RIE_NOTPRIMS    ((RtInt)27)    /* Invalid state for primitives */
  662. #define RIE_ILLSTATE    ((RtInt)28)    /* Other invalid state */
  663. #define RIE_BADMOTION    ((RtInt)29)    /* Badly formed motion block */
  664. #define RIE_BADSOLID    ((RtInt)30)    /* Badly formed solid block */
  665.  
  666. #define RIE_BADTOKEN    ((RtInt)41)    /* Invalid token for request */
  667. #define RIE_RANGE    ((RtInt)42)    /* Parameter out of range */
  668. #define RIE_CONSISTENCY    ((RtInt)43)    /* Parameters inconsistent */
  669. #define RIE_BADHANDLE    ((RtInt)44)    /* Bad object/light handle */
  670. #define RIE_NOSHADER    ((RtInt)45)    /* Can't load requested shader */
  671. #define RIE_MISSINGDATA    ((RtInt)46)    /* Required parameters not provided */
  672. #define RIE_SYNTAX    ((RtInt)47)    /* Declare type syntax error */
  673.  
  674. #define RIE_MATH    ((RtInt)61)    /* Zerodivide, noninvert matrix, etc. */
  675.  
  676.     /* Error severity levels */
  677.  
  678. #define RIE_INFO    ((RtInt)0)    /* Rendering stats and other info */
  679. #define RIE_WARNING    ((RtInt)1)    /* Something seems wrong, maybe okay */
  680. #define RIE_ERROR    ((RtInt)2)    /* Problem. Results may be wrong */
  681. #define RIE_SEVERE    ((RtInt)3)    /* So bad you should probably abort */
  682.  
  683. #endif /* RI_H */
  684.