1
// This library is free software; you can redistribute it and/or
2
// modify it under the terms of the GNU Lesser General Public
3
// License as published by the Free Software Foundation; either
4
// version 2.1 of the License, or (at your option) any later version.
6
// This library is distributed in the hope that it will be useful,
7
// but WITHOUT ANY WARRANTY; without even the implied warranty of
8
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9
// General Public License for more details.
11
// You should have received a copy of the GNU General Public
12
// License along with this library; if not, write to the Free Software
13
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
START_NAMESPACE( libri2rib )
26
static CqContext context;
27
END_NAMESPACE( libri2rib )
29
using libri2rib::context;
30
using libri2rib::CqPLStore;
31
using libri2rib::CqError;
34
RtFloat RiGaussianFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
38
RtFloat RiBoxFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
42
RtFloat RiTriangleFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
46
RtFloat RiCatmullRomFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
50
RtFloat RiSincFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
54
RtFloat RiDiskFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
58
RtFloat RiBesselFilter ( RtFloat x, RtFloat y, RtFloat xwidth, RtFloat ywidth )
64
RtBasis RiBezierBasis = { { -1, 3, -3, 1},
69
RtBasis RiBSplineBasis = { { -1.0 / 6, 3.0 / 6, -3.0 / 6, 1.0 / 6},
70
{ 3.0 / 6, -6.0 / 6, 3.0 / 6, 0.0 / 6},
71
{ -3.0 / 6, 0.0 / 6, 3.0 / 6, 0.0 / 6},
72
{ 1.0 / 6, 4.0 / 6, 1.0 / 6, 0.0 / 6} };
74
RtBasis RiCatmullRomBasis = { { -1.0 / 2, 3.0 / 2, -3.0 / 2, 1.0 / 2},
75
{ 2.0 / 2, -5.0 / 2, 4.0 / 2, -1.0 / 2},
76
{ -1.0 / 2, 0.0 / 2, 1.0 / 2, 0.0 / 2},
77
{ 0.0 / 2, 2.0 / 2, 0.0 / 2, 0.0 / 2} };
79
RtBasis RiHermiteBasis = { { 2, 1, -2, 1},
84
RtBasis RiPowerBasis = { {1, 0, 0, 0},
90
RtVoid RiProcDelayedReadArchive ( RtPointer data, RtFloat detail )
92
RtVoid RiProcRunProgram ( RtPointer data, RtFloat detail )
94
RtVoid RiProcDynamicLoad ( RtPointer data, RtFloat detail )
100
RtContextHandle RiGetContext ( void )
104
return context.getContext();
106
catch ( CqError & r )
113
RtVoid RiContext ( RtContextHandle ch )
117
context.switchTo( ch );
119
catch ( CqError & r )
125
RtToken RiDeclare ( const char *name, const char *declaration )
129
return context.current().RiDeclare( name, declaration );
131
catch ( CqError & r )
138
RtVoid RiBegin ( RtToken name )
142
context.addContext( name );
143
context.current().RiBegin( name );
145
catch ( CqError & r )
151
RtVoid RiEnd ( void )
155
context.current().RiEnd();
156
context.removeCurrent();
158
catch ( CqError & r )
164
RtVoid RiFrameBegin ( RtInt frame )
168
context.current().RiFrameBegin( frame );
170
catch ( CqError & r )
176
RtVoid RiFrameEnd ( void )
180
context.current().RiFrameEnd();
182
catch ( CqError & r )
188
RtVoid RiWorldBegin ( void )
192
context.current().RiWorldBegin();
194
catch ( CqError & r )
200
RtVoid RiWorldEnd ( void )
204
context.current().RiWorldEnd();
206
catch ( CqError & r )
212
RtVoid RiFormat ( RtInt xres, RtInt yres, RtFloat aspect )
216
context.current().RiFormat( xres, yres, aspect );
218
catch ( CqError & r )
224
RtVoid RiFrameAspectRatio ( RtFloat aspect )
228
context.current().RiFrameAspectRatio( aspect );
230
catch ( CqError & r )
236
RtVoid RiScreenWindow ( RtFloat left, RtFloat right, RtFloat bot, RtFloat top )
240
context.current().RiScreenWindow( left, right, bot, top );
242
catch ( CqError & r )
248
RtVoid RiCropWindow ( RtFloat xmin, RtFloat xmax, RtFloat ymin, RtFloat ymax )
252
context.current().RiCropWindow( xmin, xmax, ymin, ymax );
254
catch ( CqError & r )
260
RtVoid RiProjection ( const char *name, ... )
265
va_start( args, name );
266
CqPLStore pls( args );
269
RiProjectionV( name, pls.n, pls.tokens(), pls.parms() );
271
catch ( CqError & r )
277
RtVoid RiProjectionV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
281
context.current().RiProjectionV( name, n, tokens, parms );
283
catch ( CqError & r )
289
RtVoid RiClipping ( RtFloat hither, RtFloat yon )
293
context.current().RiClipping( hither, yon );
295
catch ( CqError & r )
301
RtVoid RiClippingPlane ( RtFloat x, RtFloat y, RtFloat z,
302
RtFloat nx, RtFloat ny, RtFloat nz )
306
context.current().RiClippingPlane( x, y, z, nx, ny, nz );
308
catch ( CqError & r )
314
RtVoid RiDepthOfField ( RtFloat fstop, RtFloat focallength, RtFloat focaldistance )
318
context.current().RiDepthOfField ( fstop, focallength, focaldistance );
320
catch ( CqError & r )
326
RtVoid RiShutter ( RtFloat min, RtFloat max )
330
context.current().RiShutter( min, max );
332
catch ( CqError & r )
338
RtVoid RiPixelVariance ( RtFloat variation )
342
context.current().RiPixelVariance( variation );
344
catch ( CqError & r )
350
RtVoid RiPixelSamples ( RtFloat xsamples, RtFloat ysamples )
354
context.current().RiPixelSamples( xsamples, ysamples );
356
catch ( CqError & r )
362
RtVoid RiPixelFilter ( RtFilterFunc filterfunc, RtFloat xwidth, RtFloat ywidth )
366
context.current().RiPixelFilter( filterfunc, xwidth, ywidth );
368
catch ( CqError & r )
374
RtVoid RiExposure ( RtFloat gain, RtFloat gamma )
378
context.current().RiExposure( gain, gamma );
380
catch ( CqError & r )
386
RtVoid RiImager ( const char *name, ... )
391
va_start( args, name );
392
CqPLStore pls( args );
395
RiImagerV( name, pls.n, pls.tokens(), pls.parms() );
397
catch ( CqError & r )
403
RtVoid RiImagerV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
407
context.current().RiImagerV( name, n, tokens, parms );
409
catch ( CqError & r )
415
RtVoid RiQuantize ( RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ampl )
419
context.current().RiQuantize( type, one, min, max, ampl );
421
catch ( CqError & r )
427
RtVoid RiDisplay ( const char *name, RtToken type, RtToken mode, ... )
432
va_start( args, mode );
433
CqPLStore pls( args );
436
RiDisplayV( name, type, mode, pls.n, pls.tokens(), pls.parms() );
438
catch ( CqError & r )
444
RtVoid RiDisplayV ( const char *name, RtToken type, RtToken mode,
445
RtInt n, RtToken tokens[], RtPointer parms[] )
449
context.current().RiDisplayV( name, type, mode, n, tokens, parms );
451
catch ( CqError & r )
457
RtVoid RiHider ( const char *type, ... )
462
va_start( args, type );
463
CqPLStore pls( args );
466
RiHiderV( type, pls.n, pls.tokens(), pls.parms() );
468
catch ( CqError & r )
474
RtVoid RiHiderV ( const char *type, RtInt n, RtToken tokens[], RtPointer parms[] )
478
context.current().RiHiderV( type, n, tokens, parms );
480
catch ( CqError & r )
486
RtVoid RiColorSamples ( RtInt n, RtFloat nRGB[], RtFloat RGBn[] )
490
context.current().RiColorSamples( n, nRGB, RGBn );
492
catch ( CqError & r )
498
RtVoid RiRelativeDetail ( RtFloat relativedetail )
502
context.current().RiRelativeDetail( relativedetail );
504
catch ( CqError & r )
510
RtVoid RiOption ( const char *name, ... )
515
va_start( args, name );
516
CqPLStore pls( args );
519
RiOptionV( name, pls.n, pls.tokens(), pls.parms() );
521
catch ( CqError & r )
527
RtVoid RiOptionV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
531
if ( context.getContext() == ( RtContextHandle ) RI_NULL )
533
context.parseOption( name, n, tokens, parms );
537
context.current().RiOptionV( name, n, tokens, parms );
540
catch ( CqError & r )
546
RtVoid RiAttributeBegin ( void )
550
context.current().RiAttributeBegin();
552
catch ( CqError & r )
558
RtVoid RiAttributeEnd ( void )
562
context.current().RiAttributeEnd();
564
catch ( CqError & r )
570
RtVoid RiColor ( RtColor color )
574
context.current().RiColor( color );
576
catch ( CqError & r )
582
RtVoid RiOpacity ( RtColor color )
586
context.current().RiOpacity( color );
588
catch ( CqError & r )
594
RtVoid RiTextureCoordinates( RtFloat s1, RtFloat t1, RtFloat s2, RtFloat t2,
595
RtFloat s3, RtFloat t3, RtFloat s4, RtFloat t4 )
599
context.current().RiTextureCoordinates( s1, t1, s2, t2, s3, t3, s4, t4 );
601
catch ( CqError & r )
607
RtLightHandle RiLightSource ( const char *name, ... )
612
va_start( args, name );
613
CqPLStore pls( args );
616
return RiLightSourceV( name, pls.n, pls.tokens(), pls.parms() );
618
catch ( CqError & r )
625
RtLightHandle RiLightSourceV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
629
return context.current().RiLightSourceV( name, n, tokens, parms );
631
catch ( CqError & r )
638
RtLightHandle RiAreaLightSource ( const char *name, ... )
643
va_start( args, name );
644
CqPLStore pls( args );
647
return RiAreaLightSourceV( name, pls.n, pls.tokens(), pls.parms() );
649
catch ( CqError & r )
656
RtLightHandle RiAreaLightSourceV ( const char *name,
657
RtInt n, RtToken tokens[], RtPointer parms[] )
661
return context.current().RiAreaLightSourceV( name, n, tokens, parms );
663
catch ( CqError & r )
670
RtVoid RiIlluminate ( RtLightHandle light, RtBoolean onoff )
674
context.current().RiIlluminate( light, onoff );
676
catch ( CqError & r )
682
RtVoid RiSurface ( const char *name, ... )
687
va_start( args, name );
688
CqPLStore pls( args );
691
RiSurfaceV( name, pls.n, pls.tokens(), pls.parms() );
693
catch ( CqError & r )
699
RtVoid RiSurfaceV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
703
context.current().RiSurfaceV( name, n, tokens, parms );
705
catch ( CqError & r )
711
RtVoid RiAtmosphere ( const char *name, ... )
716
va_start( args, name );
717
CqPLStore pls( args );
720
RiAtmosphereV( name, pls.n, pls.tokens(), pls.parms() );
722
catch ( CqError & r )
728
RtVoid RiAtmosphereV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
732
context.current().RiAtmosphereV( name, n, tokens, parms );
734
catch ( CqError & r )
740
RtVoid RiInterior ( const char *name, ... )
745
va_start( args, name );
746
CqPLStore pls( args );
749
RiInteriorV( name, pls.n, pls.tokens(), pls.parms() );
751
catch ( CqError & r )
757
RtVoid RiInteriorV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
761
context.current().RiInteriorV( name, n, tokens, parms );
763
catch ( CqError & r )
769
RtVoid RiExterior ( const char *name, ... )
774
va_start( args, name );
775
CqPLStore pls( args );
778
RiExteriorV( name, pls.n, pls.tokens(), pls.parms() );
780
catch ( CqError & r )
786
RtVoid RiExteriorV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
790
context.current().RiExteriorV( name, n, tokens, parms );
792
catch ( CqError & r )
798
RtVoid RiShadingRate ( RtFloat size )
802
context.current().RiShadingRate( size );
804
catch ( CqError & r )
810
RtVoid RiShadingInterpolation ( RtToken type )
814
context.current().RiShadingInterpolation( type );
816
catch ( CqError & r )
822
RtVoid RiMatte ( RtBoolean onoff )
826
context.current().RiMatte( onoff );
828
catch ( CqError & r )
834
RtVoid RiBound ( RtBound bound )
838
context.current().RiBound( bound );
840
catch ( CqError & r )
846
RtVoid RiDetail ( RtBound bound )
850
context.current().RiDetail( bound );
852
catch ( CqError & r )
858
RtVoid RiDetailRange ( RtFloat minvis, RtFloat lowtran, RtFloat uptran, RtFloat maxvis )
862
context.current().RiDetailRange( minvis, lowtran, uptran, maxvis );
864
catch ( CqError & r )
870
RtVoid RiGeometricApproximation ( RtToken type, RtFloat value )
874
context.current().RiGeometricApproximation( type, value );
876
catch ( CqError & r )
882
RtVoid RiOrientation ( RtToken orientation )
886
context.current().RiOrientation( orientation );
888
catch ( CqError & r )
894
RtVoid RiReverseOrientation ( void )
898
context.current().RiReverseOrientation();
900
catch ( CqError & r )
906
RtVoid RiSides ( RtInt sides )
910
context.current().RiSides( sides );
912
catch ( CqError & r )
918
RtVoid RiIdentity ( void )
922
context.current().RiIdentity();
924
catch ( CqError & r )
930
RtVoid RiTransform ( RtMatrix transform )
934
context.current().RiTransform( transform );
936
catch ( CqError & r )
942
RtVoid RiConcatTransform ( RtMatrix transform )
946
context.current().RiConcatTransform( transform );
948
catch ( CqError & r )
954
RtVoid RiPerspective ( RtFloat fov )
958
context.current().RiPerspective( fov );
960
catch ( CqError & r )
966
RtVoid RiTranslate ( RtFloat dx, RtFloat dy, RtFloat dz )
970
context.current().RiTranslate( dx, dy, dz );
972
catch ( CqError & r )
978
RtVoid RiRotate ( RtFloat angle, RtFloat dx, RtFloat dy, RtFloat dz )
982
context.current().RiRotate( angle, dx, dy, dz );
984
catch ( CqError & r )
990
RtVoid RiScale ( RtFloat sx, RtFloat sy, RtFloat sz )
994
context.current().RiScale( sx, sy, sz );
996
catch ( CqError & r )
1002
RtVoid RiSkew ( RtFloat angle, RtFloat dx1, RtFloat dy1, RtFloat dz1,
1003
RtFloat dx2, RtFloat dy2, RtFloat dz2 )
1007
context.current().RiSkew( angle, dx1, dy1, dz1, dx2, dy2, dz2 );
1009
catch ( CqError & r )
1015
RtVoid RiDeformation ( const char *name, ... )
1020
va_start( args, name );
1021
CqPLStore pls( args );
1024
RiDeformationV( name, pls.n, pls.tokens(), pls.parms() );
1026
catch ( CqError & r )
1032
RtVoid RiDeformationV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
1036
context.current().RiDeformationV( name, n, tokens, parms );
1038
catch ( CqError & r )
1044
RtVoid RiDisplacement ( const char *name, ... )
1049
va_start( args, name );
1050
CqPLStore pls( args );
1053
RiDisplacementV( name, pls.n, pls.tokens(), pls.parms() );
1055
catch ( CqError & r )
1061
RtVoid RiDisplacementV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
1065
context.current().RiDisplacementV( name, n, tokens, parms );
1067
catch ( CqError & r )
1073
RtVoid RiCoordinateSystem ( RtToken space )
1077
context.current().RiCoordinateSystem( space );
1079
catch ( CqError & r )
1085
RtVoid RiCoordSysTransform ( RtToken space )
1089
context.current().RiCoordSysTransform( space );
1091
catch ( CqError & r )
1097
RtPoint * RiTransformPoints ( RtToken fromspace, RtToken tospace,
1098
RtInt n, RtPoint points[] )
1100
CqError r( RIE_UNIMPLEMENT, RIE_WARNING,
1101
"RiTransformPoints cannot be written to a RIB file.", TqFalse );
1103
return ( RtPoint * ) RI_NULL;
1106
RtVoid RiTransformBegin ( void )
1110
context.current().RiTransformBegin();
1112
catch ( CqError & r )
1118
RtVoid RiTransformEnd ( void )
1123
context.current().RiTransformEnd();
1125
catch ( CqError & r )
1131
RtVoid RiAttribute ( const char *name, ... )
1136
va_start( args, name );
1137
CqPLStore pls( args );
1140
RiAttributeV( name, pls.n, pls.tokens(), pls.parms() );
1142
catch ( CqError & r )
1148
RtVoid RiAttributeV ( const char *name, RtInt n, RtToken tokens[], RtPointer parms[] )
1152
context.current().RiAttributeV( name, n, tokens, parms );
1154
catch ( CqError & r )
1160
RtVoid RiPolygon ( RtInt nverts, ... )
1165
va_start( args, nverts );
1166
CqPLStore pls( args );
1169
RiPolygonV( nverts, pls.n, pls.tokens(), pls.parms() );
1171
catch ( CqError & r )
1177
RtVoid RiPolygonV ( RtInt nverts, RtInt n, RtToken tokens[], RtPointer parms[] )
1181
context.current().RiPolygonV( nverts, n, tokens, parms );
1183
catch ( CqError & r )
1189
RtVoid RiGeneralPolygon ( RtInt nloops, RtInt nverts[], ... )
1194
va_start( args, nverts );
1195
CqPLStore pls( args );
1198
RiGeneralPolygonV( nloops, nverts, pls.n, pls.tokens(), pls.parms() );
1200
catch ( CqError & r )
1206
RtVoid RiGeneralPolygonV ( RtInt nloops, RtInt nverts[],
1207
RtInt n, RtToken tokens[], RtPointer parms[] )
1211
context.current().RiGeneralPolygonV( nloops, nverts, n, tokens, parms );
1213
catch ( CqError & r )
1219
RtVoid RiPointsPolygons ( RtInt npolys, RtInt nverts[], RtInt verts[], ... )
1224
va_start( args, verts );
1225
CqPLStore pls( args );
1228
RiPointsPolygonsV( npolys, nverts, verts, pls.n, pls.tokens(), pls.parms() );
1230
catch ( CqError & r )
1237
RtVoid RiPointsPolygonsV ( RtInt npolys, RtInt nverts[], RtInt verts[],
1238
RtInt n, RtToken tokens[], RtPointer parms[] )
1242
context.current().RiPointsPolygonsV( npolys, nverts, verts, n, tokens, parms );
1244
catch ( CqError & r )
1250
RtVoid RiPointsGeneralPolygons ( RtInt npolys, RtInt nloops[], RtInt nverts[], RtInt verts[], ... )
1255
va_start( args, verts );
1256
CqPLStore pls( args );
1259
RiPointsGeneralPolygonsV( npolys, nloops, nverts, verts, pls.n, pls.tokens(), pls.parms() );
1261
catch ( CqError & r )
1267
RtVoid RiPointsGeneralPolygonsV ( RtInt npolys, RtInt nloops[], RtInt nverts[], RtInt verts[],
1268
RtInt n, RtToken tokens[], RtPointer parms[] )
1272
context.current().RiPointsGeneralPolygonsV( npolys, nloops, nverts, verts, n, tokens, parms );
1274
catch ( CqError & r )
1280
RtVoid RiBasis ( RtBasis ubasis, RtInt ustep, RtBasis vbasis, RtInt vstep )
1284
context.current().RiBasis( ubasis, ustep, vbasis, vstep );
1286
catch ( CqError & r )
1292
RtVoid RiPatch ( RtToken type, ... )
1297
va_start( args, type );
1298
CqPLStore pls( args );
1301
RiPatchV( type, pls.n, pls.tokens(), pls.parms() );
1303
catch ( CqError & r )
1309
RtVoid RiPatchV ( RtToken type, RtInt n, RtToken tokens[], RtPointer parms[] )
1313
context.current().RiPatchV( type, n, tokens, parms );
1315
catch ( CqError & r )
1321
RtVoid RiPatchMesh ( RtToken type, RtInt nu, RtToken uwrap, RtInt nv, RtToken vwrap, ... )
1326
va_start( args, vwrap );
1327
CqPLStore pls( args );
1330
RiPatchMeshV( type, nu, uwrap, nv, vwrap, pls.n, pls.tokens(), pls.parms() );
1332
catch ( CqError & r )
1338
RtVoid RiPatchMeshV ( RtToken type, RtInt nu, RtToken uwrap, RtInt nv, RtToken vwrap,
1339
RtInt n, RtToken tokens[], RtPointer parms[] )
1343
context.current().RiPatchMeshV( type, nu, uwrap, nv, vwrap, n, tokens, parms );
1345
catch ( CqError & r )
1351
RtVoid RiNuPatch ( RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin,
1352
RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[],
1353
RtFloat vmin, RtFloat vmax, ... )
1358
va_start( args, vmax );
1359
CqPLStore pls( args );
1362
RiNuPatchV( nu, uorder, uknot, umin,
1363
umax, nv, vorder, vknot,
1364
vmin, vmax, pls.n, pls.tokens(), pls.parms() );
1366
catch ( CqError & r )
1372
RtVoid RiNuPatchV ( RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin,
1373
RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[],
1374
RtFloat vmin, RtFloat vmax,
1375
RtInt n, RtToken tokens[], RtPointer parms[] )
1379
context.current().RiNuPatchV( nu, uorder, uknot, umin,
1380
umax, nv, vorder, vknot,
1381
vmin, vmax, n, tokens, parms );
1383
catch ( CqError & r )
1389
RtVoid RiTrimCurve ( RtInt nloops, RtInt ncurves[], RtInt order[],
1390
RtFloat knot[], RtFloat min[], RtFloat max[],
1391
RtInt n[], RtFloat u[], RtFloat v[], RtFloat w[] )
1395
context.current().RiTrimCurve( nloops, ncurves, order,
1399
catch ( CqError & r )
1405
RtVoid RiSphere ( RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax, ... )
1410
va_start( args, tmax );
1411
CqPLStore pls( args );
1414
RiSphereV( radius, zmin, zmax, tmax, pls.n, pls.tokens(), pls.parms() );
1416
catch ( CqError & r )
1422
RtVoid RiSphereV ( RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
1423
RtInt n, RtToken tokens[], RtPointer parms[] )
1427
context.current().RiSphereV( radius, zmin, zmax, tmax, n, tokens, parms );
1429
catch ( CqError & r )
1435
RtVoid RiCone ( RtFloat height, RtFloat radius, RtFloat tmax, ... )
1440
va_start( args, tmax );
1441
CqPLStore pls( args );
1444
RiConeV( height, radius, tmax, pls.n, pls.tokens(), pls.parms() );
1446
catch ( CqError & r )
1452
RtVoid RiConeV ( RtFloat height, RtFloat radius, RtFloat tmax,
1453
RtInt n, RtToken tokens[], RtPointer parms[] )
1457
context.current().RiConeV( height, radius, tmax, n, tokens, parms );
1459
catch ( CqError & r )
1465
RtVoid RiCylinder ( RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax, ... )
1470
va_start( args, tmax );
1471
CqPLStore pls( args );
1474
RiCylinderV( radius, zmin, zmax, tmax, pls.n, pls.tokens(), pls.parms() );
1476
catch ( CqError & r )
1482
RtVoid RiCylinderV ( RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat tmax,
1483
RtInt n, RtToken tokens[], RtPointer parms[] )
1487
context.current().RiCylinderV( radius, zmin, zmax, tmax, n, tokens, parms );
1489
catch ( CqError & r )
1495
RtVoid RiHyperboloid ( RtPoint point1, RtPoint point2, RtFloat tmax, ... )
1500
va_start( args, tmax );
1501
CqPLStore pls( args );
1504
RiHyperboloidV( point1, point2, tmax, pls.n, pls.tokens(), pls.parms() );
1506
catch ( CqError & r )
1512
RtVoid RiHyperboloidV ( RtPoint point1, RtPoint point2, RtFloat tmax,
1513
RtInt n, RtToken tokens[], RtPointer parms[] )
1517
context.current().RiHyperboloidV( point1, point2, tmax, n, tokens, parms );
1519
catch ( CqError & r )
1525
RtVoid RiParaboloid ( RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat tmax, ... )
1530
va_start( args, tmax );
1531
CqPLStore pls( args );
1534
RiParaboloidV( rmax, zmin, zmax, tmax, pls.n, pls.tokens(), pls.parms() );
1536
catch ( CqError & r )
1542
RtVoid RiParaboloidV ( RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat tmax,
1543
RtInt n, RtToken tokens[], RtPointer parms[] )
1547
context.current().RiParaboloidV( rmax, zmin, zmax, tmax, n, tokens, parms );
1549
catch ( CqError & r )
1555
RtVoid RiDisk ( RtFloat height, RtFloat radius, RtFloat tmax, ... )
1560
va_start( args, tmax );
1561
CqPLStore pls( args );
1564
RiDiskV( height, radius, tmax, pls.n, pls.tokens(), pls.parms() );
1566
catch ( CqError & r )
1572
RtVoid RiDiskV ( RtFloat height, RtFloat radius, RtFloat tmax,
1573
RtInt n, RtToken tokens[], RtPointer parms[] )
1577
context.current().RiDiskV( height, radius, tmax, n, tokens, parms );
1579
catch ( CqError & r )
1585
RtVoid RiTorus ( RtFloat majrad, RtFloat minrad, RtFloat phimin,
1586
RtFloat phimax, RtFloat tmax, ... )
1591
va_start( args, tmax );
1592
CqPLStore pls( args );
1595
RiTorusV( majrad, minrad, phimin, phimax, tmax, pls.n, pls.tokens(), pls.parms() );
1597
catch ( CqError & r )
1603
RtVoid RiTorusV ( RtFloat majrad, RtFloat minrad,
1604
RtFloat phimin, RtFloat phimax, RtFloat tmax,
1605
RtInt n, RtToken tokens[], RtPointer parms[] )
1609
context.current().RiTorusV( majrad, minrad, phimin, phimax, tmax, n, tokens, parms );
1611
catch ( CqError & r )
1617
RtVoid RiBlobby ( RtInt nleaf, RtInt ncode, RtInt code[],
1618
RtInt nflt, RtFloat flt[],
1619
RtInt nstr, RtToken str[], ... )
1624
va_start( args, str );
1625
CqPLStore pls( args );
1628
RiBlobbyV( nleaf, ncode, code, nflt, flt, nstr, str, pls.n, pls.tokens(), pls.parms() );
1630
catch ( CqError & r )
1636
RtVoid RiBlobbyV ( RtInt nleaf, RtInt ncode, RtInt code[],
1637
RtInt nflt, RtFloat flt[],
1638
RtInt nstr, RtToken str[],
1639
RtInt n, RtToken tokens[], RtPointer parms[] )
1643
context.current().RiBlobbyV( nleaf, ncode, code, nflt, flt, nstr, str, n, tokens, parms );
1645
catch ( CqError & r )
1651
RtVoid RiCurves ( RtToken type, RtInt ncurves,
1652
RtInt nvertices[], RtToken wrap, ... )
1657
va_start( args, wrap );
1658
CqPLStore pls( args );
1661
RiCurvesV( type, ncurves, nvertices, wrap, pls.n, pls.tokens(), pls.parms() );
1663
catch ( CqError & r )
1669
RtVoid RiCurvesV ( RtToken type, RtInt ncurves,
1670
RtInt nvertices[], RtToken wrap,
1671
RtInt n, RtToken tokens[], RtPointer parms[] )
1675
context.current().RiCurvesV( type, ncurves, nvertices, wrap, n, tokens, parms );
1677
catch ( CqError & r )
1683
RtVoid RiPoints( RtInt npoints, ... )
1688
va_start( args, npoints );
1689
CqPLStore pls( args );
1692
RiPointsV( npoints, pls.n, pls.tokens(), pls.parms() );
1694
catch ( CqError & r )
1700
RtVoid RiPointsV( RtInt npoints, RtInt n, RtToken tokens[], RtPointer parms[] )
1705
context.current().RiPointsV( npoints, n, tokens, parms );
1707
catch ( CqError & r )
1713
RtVoid RiSubdivisionMesh ( RtToken mask, RtInt nf, RtInt nverts[],
1715
RtInt ntags, RtToken tags[], RtInt numargs[],
1716
RtInt intargs[], RtFloat floatargs[], ... )
1721
va_start( args, floatargs );
1722
CqPLStore pls( args );
1725
RiSubdivisionMeshV( mask, nf, nverts, verts, ntags, tags, numargs,
1726
intargs, floatargs, pls.n, pls.tokens(), pls.parms() );
1728
catch ( CqError & r )
1734
RtVoid RiSubdivisionMeshV ( RtToken mask, RtInt nf, RtInt nverts[],
1736
RtInt ntags, RtToken tags[], RtInt numargs[],
1737
RtInt intargs[], RtFloat floatargs[],
1738
RtInt n, RtToken tokens[], RtPointer parms[] )
1742
context.current().RiSubdivisionMeshV( mask, nf, nverts, verts,
1743
ntags, tags, numargs, intargs, floatargs,
1746
catch ( CqError & r )
1752
RtVoid RiProcedural ( RtPointer data, RtBound bound,
1753
RtVoid ( *subdivfunc ) ( RtPointer, RtFloat ),
1754
RtVoid ( *freefunc ) ( RtPointer ) )
1758
context.current().RiProcedural( data, bound, subdivfunc, freefunc );
1760
catch ( CqError & r )
1766
RtVoid RiGeometry ( RtToken type, ... )
1771
va_start( args, type );
1772
CqPLStore pls( args );
1775
RiGeometryV( type, pls.n, pls.tokens(), pls.parms() );
1777
catch ( CqError & r )
1783
RtVoid RiGeometryV ( RtToken type, RtInt n, RtToken tokens[], RtPointer parms[] )
1787
context.current().RiGeometryV( type, n, tokens, parms );
1789
catch ( CqError & r )
1795
RtVoid RiSolidBegin ( RtToken operation )
1799
context.current().RiSolidBegin( operation );
1801
catch ( CqError & r )
1807
RtVoid RiSolidEnd ( void )
1811
context.current().RiSolidEnd();
1813
catch ( CqError & r )
1819
RtObjectHandle RiObjectBegin ( void )
1823
return context.current().RiObjectBegin();
1825
catch ( CqError & r )
1832
RtVoid RiObjectEnd ( void )
1836
context.current().RiObjectEnd();
1838
catch ( CqError & r )
1844
RtVoid RiObjectInstance ( RtObjectHandle handle )
1848
context.current().RiObjectInstance( handle );
1850
catch ( CqError & r )
1856
RtVoid RiMotionBegin ( RtInt n, ... )
1861
va_start( args, n );
1862
RtFloat* times = new RtFloat[ n ];
1864
for ( RtInt i = 0;i < n;i++ )
1866
times[ i ] = va_arg( args, double );
1870
RiMotionBeginV( n, times );
1873
catch ( CqError & r )
1879
RtVoid RiMotionBeginV ( RtInt n, RtFloat times[] )
1883
context.current().RiMotionBeginV( n, times );
1885
catch ( CqError & r )
1891
RtVoid RiMotionEnd ( void )
1895
context.current().RiMotionEnd();
1897
catch ( CqError & r )
1903
RtVoid RiMakeTexture ( const char *pic, const char *tex, RtToken swrap, RtToken twrap,
1904
RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, ... )
1909
va_start( args, twidth );
1910
CqPLStore pls( args );
1913
RiMakeTextureV( pic, tex, swrap, twrap, filterfunc, swidth, twidth,
1914
pls.n, pls.tokens(), pls.parms() );
1916
catch ( CqError & r )
1922
RtVoid RiMakeTextureV ( const char *pic, const char *tex, RtToken swrap, RtToken twrap,
1923
RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth,
1924
RtInt n, RtToken tokens[], RtPointer parms[] )
1928
context.current().RiMakeTextureV( pic, tex, swrap, twrap,
1929
filterfunc, swidth, twidth,
1932
catch ( CqError & r )
1938
RtVoid RiMakeBump ( const char *pic, const char *tex, RtToken swrap, RtToken twrap,
1939
RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, ... )
1944
va_start( args, twidth );
1945
CqPLStore pls( args );
1948
RiMakeBumpV( pic, tex, swrap, twrap, filterfunc, swidth, twidth,
1949
pls.n, pls.tokens(), pls.parms() );
1951
catch ( CqError & r )
1957
RtVoid RiMakeBumpV ( const char *pic, const char *tex, RtToken swrap, RtToken twrap,
1958
RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth,
1959
RtInt n, RtToken tokens[], RtPointer parms[] )
1963
context.current().RiMakeBumpV( pic, tex, swrap, twrap,
1964
filterfunc, swidth, twidth,
1967
catch ( CqError & r )
1973
RtVoid RiMakeLatLongEnvironment ( const char *pic, const char *tex,
1974
RtFilterFunc filterfunc,
1975
RtFloat swidth, RtFloat twidth, ... )
1980
va_start( args, twidth );
1981
CqPLStore pls( args );
1984
RiMakeLatLongEnvironmentV( pic, tex, filterfunc, swidth, twidth,
1985
pls.n, pls.tokens(), pls.parms() );
1987
catch ( CqError & r )
1993
RtVoid RiMakeLatLongEnvironmentV ( const char *pic, const char *tex,
1994
RtFilterFunc filterfunc,
1995
RtFloat swidth, RtFloat twidth,
1996
RtInt n, RtToken tokens[], RtPointer parms[] )
2000
context.current().RiMakeLatLongEnvironmentV( pic, tex, filterfunc,
2004
catch ( CqError & r )
2010
RtVoid RiMakeCubeFaceEnvironment ( const char *px, const char *nx, const char *py, const char *ny,
2011
const char *pz, const char *nz, const char *tex, RtFloat fov,
2012
RtFilterFunc filterfunc,
2013
RtFloat swidth, RtFloat ywidth, ... )
2018
va_start( args, ywidth );
2019
CqPLStore pls( args );
2022
RiMakeCubeFaceEnvironmentV( px, nx, py, ny, pz, nz, tex, fov,
2023
filterfunc, swidth, ywidth,
2024
pls.n, pls.tokens(), pls.parms() );
2026
catch ( CqError & r )
2032
RtVoid RiMakeCubeFaceEnvironmentV ( const char *px, const char *nx, const char *py, const char *ny,
2033
const char *pz, const char *nz, const char *tex, RtFloat fov,
2034
RtFilterFunc filterfunc, RtFloat swidth, RtFloat ywidth,
2035
RtInt n, RtToken tokens[], RtPointer parms[] )
2039
context.current().RiMakeCubeFaceEnvironmentV( px, nx, py, ny, pz, nz, tex, fov,
2040
filterfunc, swidth, ywidth,
2043
catch ( CqError & r )
2049
RtVoid RiMakeShadow ( const char *pic, const char *tex, ... )
2055
va_start( args, tex );
2056
CqPLStore pls( args );
2059
RiMakeShadowV( pic, tex, pls.n, pls.tokens(), pls.parms() );
2061
catch ( CqError & r )
2067
RtVoid RiMakeShadowV ( const char *pic, const char *tex,
2068
RtInt n, RtToken tokens[], RtPointer parms[] )
2072
context.current().RiMakeShadowV( pic, tex, n, tokens, parms );
2074
catch ( CqError & r )
2080
RtVoid RiArchiveRecord ( RtToken type, char *format, ... )
2085
va_start( args, format );
2088
char* buffer = new char[ size ];
2089
#ifdef AQSIS_COMPILER_MSVC6
2090
while ( _vsnprintf( buffer, 256, format, args ) < 0 )
2092
while ( vsnprintf( buffer, 256, format, args ) < 0 )
2096
delete[] ( buffer );
2097
buffer = new char[ size ];
2099
std::string i( buffer );
2100
delete[] ( buffer );
2103
context.current().RiArchiveRecord( type, i );
2105
catch ( CqError & r )
2111
RtVoid RiReadArchive( RtToken name, RtArchiveCallback callback, ... )
2116
va_start( args, callback );
2117
CqPLStore pls( args );
2120
RiReadArchiveV( name, callback, pls.n, pls.tokens(), pls.parms() );
2122
catch ( CqError & r )
2128
RtVoid RiReadArchiveV( RtToken name, RtArchiveCallback callback,
2129
RtInt n, RtToken tokens[], RtPointer parms[] )
2133
context.current().RiReadArchiveV( name, callback, n, tokens, parms );
2135
catch ( CqError & r )
2141
RtVoid RiErrorHandler ( RtErrorFunc handler )
2145
context.current().RiErrorHandler( handler );
2147
catch ( CqError & r )