1
class RiDeclareCache : public RiCacheBase
4
RiDeclareCache(RtString name, RtString declaration) : RiCacheBase()
6
int __name_length = strlen(name);
7
m_name = new char[ __name_length + 1 ];
9
int __declaration_length = strlen(declaration);
10
m_declaration = new char[ __declaration_length + 1 ];
11
strcpy(m_declaration, declaration);
13
virtual ~RiDeclareCache()
16
delete[](m_declaration);
20
RiDeclare(m_name, m_declaration);
25
RtString m_declaration;
28
class RiFrameBeginCache : public RiCacheBase
31
RiFrameBeginCache(RtInt number) : RiCacheBase()
35
virtual ~RiFrameBeginCache()
40
RiFrameBegin(m_number);
47
class RiFrameEndCache : public RiCacheBase
50
RiFrameEndCache() : RiCacheBase()
53
virtual ~RiFrameEndCache()
64
class RiWorldBeginCache : public RiCacheBase
67
RiWorldBeginCache() : RiCacheBase()
70
virtual ~RiWorldBeginCache()
81
class RiWorldEndCache : public RiCacheBase
84
RiWorldEndCache() : RiCacheBase()
87
virtual ~RiWorldEndCache()
98
class RiFormatCache : public RiCacheBase
101
RiFormatCache(RtInt xresolution, RtInt yresolution, RtFloat pixelaspectratio) : RiCacheBase()
103
m_xresolution = xresolution;
104
m_yresolution = yresolution;
105
m_pixelaspectratio = pixelaspectratio;
107
virtual ~RiFormatCache()
110
virtual void ReCall()
112
RiFormat(m_xresolution, m_yresolution, m_pixelaspectratio);
118
RtFloat m_pixelaspectratio;
121
class RiFrameAspectRatioCache : public RiCacheBase
124
RiFrameAspectRatioCache(RtFloat frameratio) : RiCacheBase()
126
m_frameratio = frameratio;
128
virtual ~RiFrameAspectRatioCache()
131
virtual void ReCall()
133
RiFrameAspectRatio(m_frameratio);
137
RtFloat m_frameratio;
140
class RiScreenWindowCache : public RiCacheBase
143
RiScreenWindowCache(RtFloat left, RtFloat right, RtFloat bottom, RtFloat top) : RiCacheBase()
150
virtual ~RiScreenWindowCache()
153
virtual void ReCall()
155
RiScreenWindow(m_left, m_right, m_bottom, m_top);
165
class RiCropWindowCache : public RiCacheBase
168
RiCropWindowCache(RtFloat left, RtFloat right, RtFloat top, RtFloat bottom) : RiCacheBase()
175
virtual ~RiCropWindowCache()
178
virtual void ReCall()
180
RiCropWindow(m_left, m_right, m_top, m_bottom);
190
class RiProjectionCache : public RiCacheBase
193
RiProjectionCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
195
int __name_length = strlen(name);
196
m_name = new char[ __name_length + 1 ];
197
strcpy(m_name, name);
198
// Copy the plist here.
199
int constant_size = 1;
200
int uniform_size = 1;
201
int varying_size = 1;
203
int facevarying_size = 1;
204
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
206
virtual ~RiProjectionCache()
209
// plist gets destroyed by the base class.
211
virtual void ReCall()
213
RiProjectionV(m_name, m_count, m_tokens, m_values);
218
// plist information is stored in the base class.
221
class RiClippingCache : public RiCacheBase
224
RiClippingCache(RtFloat cnear, RtFloat cfar) : RiCacheBase()
229
virtual ~RiClippingCache()
232
virtual void ReCall()
234
RiClipping(m_cnear, m_cfar);
242
class RiDepthOfFieldCache : public RiCacheBase
245
RiDepthOfFieldCache(RtFloat fstop, RtFloat focallength, RtFloat focaldistance) : RiCacheBase()
248
m_focallength = focallength;
249
m_focaldistance = focaldistance;
251
virtual ~RiDepthOfFieldCache()
254
virtual void ReCall()
256
RiDepthOfField(m_fstop, m_focallength, m_focaldistance);
261
RtFloat m_focallength;
262
RtFloat m_focaldistance;
265
class RiShutterCache : public RiCacheBase
268
RiShutterCache(RtFloat opentime, RtFloat closetime) : RiCacheBase()
270
m_opentime = opentime;
271
m_closetime = closetime;
273
virtual ~RiShutterCache()
276
virtual void ReCall()
278
RiShutter(m_opentime, m_closetime);
286
class RiPixelVarianceCache : public RiCacheBase
289
RiPixelVarianceCache(RtFloat variance) : RiCacheBase()
291
m_variance = variance;
293
virtual ~RiPixelVarianceCache()
296
virtual void ReCall()
298
RiPixelVariance(m_variance);
305
class RiPixelSamplesCache : public RiCacheBase
308
RiPixelSamplesCache(RtFloat xsamples, RtFloat ysamples) : RiCacheBase()
310
m_xsamples = xsamples;
311
m_ysamples = ysamples;
313
virtual ~RiPixelSamplesCache()
316
virtual void ReCall()
318
RiPixelSamples(m_xsamples, m_ysamples);
326
class RiPixelFilterCache : public RiCacheBase
329
RiPixelFilterCache(RtFilterFunc function, RtFloat xwidth, RtFloat ywidth) : RiCacheBase()
331
m_function = function;
335
virtual ~RiPixelFilterCache()
338
virtual void ReCall()
340
RiPixelFilter(m_function, m_xwidth, m_ywidth);
344
RtFilterFunc m_function;
349
class RiExposureCache : public RiCacheBase
352
RiExposureCache(RtFloat gain, RtFloat gamma) : RiCacheBase()
357
virtual ~RiExposureCache()
360
virtual void ReCall()
362
RiExposure(m_gain, m_gamma);
370
class RiImagerCache : public RiCacheBase
373
RiImagerCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
375
int __name_length = strlen(name);
376
m_name = new char[ __name_length + 1 ];
377
strcpy(m_name, name);
378
// Copy the plist here.
379
int constant_size = 1;
380
int uniform_size = 1;
381
int varying_size = 1;
383
int facevarying_size = 1;
384
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
386
virtual ~RiImagerCache()
389
// plist gets destroyed by the base class.
391
virtual void ReCall()
393
RiImagerV(m_name, m_count, m_tokens, m_values);
398
// plist information is stored in the base class.
401
class RiQuantizeCache : public RiCacheBase
404
RiQuantizeCache(RtToken type, RtInt one, RtInt min, RtInt max, RtFloat ditheramplitude) : RiCacheBase()
406
int __type_length = strlen(type);
407
m_type = new char[ __type_length + 1 ];
408
strcpy(m_type, type);
412
m_ditheramplitude = ditheramplitude;
414
virtual ~RiQuantizeCache()
418
virtual void ReCall()
420
RiQuantize(m_type, m_one, m_min, m_max, m_ditheramplitude);
428
RtFloat m_ditheramplitude;
431
class RiDisplayCache : public RiCacheBase
434
RiDisplayCache(RtToken name, RtToken type, RtToken mode, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
436
int __name_length = strlen(name);
437
m_name = new char[ __name_length + 1 ];
438
strcpy(m_name, name);
439
int __type_length = strlen(type);
440
m_type = new char[ __type_length + 1 ];
441
strcpy(m_type, type);
442
int __mode_length = strlen(mode);
443
m_mode = new char[ __mode_length + 1 ];
444
strcpy(m_mode, mode);
445
// Copy the plist here.
446
int constant_size = 1;
447
int uniform_size = 1;
448
int varying_size = 1;
450
int facevarying_size = 1;
451
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
453
virtual ~RiDisplayCache()
458
// plist gets destroyed by the base class.
460
virtual void ReCall()
462
RiDisplayV(m_name, m_type, m_mode, m_count, m_tokens, m_values);
469
// plist information is stored in the base class.
472
class RiHiderCache : public RiCacheBase
475
RiHiderCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
477
int __name_length = strlen(name);
478
m_name = new char[ __name_length + 1 ];
479
strcpy(m_name, name);
480
// Copy the plist here.
481
int constant_size = 1;
482
int uniform_size = 1;
483
int varying_size = 1;
485
int facevarying_size = 1;
486
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
488
virtual ~RiHiderCache()
491
// plist gets destroyed by the base class.
493
virtual void ReCall()
495
RiHiderV(m_name, m_count, m_tokens, m_values);
500
// plist information is stored in the base class.
503
class RiColorSamplesCache : public RiCacheBase
506
RiColorSamplesCache(RtInt N, RtFloat nRGB[], RtFloat RGBn[]) : RiCacheBase()
509
int __nRGB_length = N;
510
m_nRGB = new RtFloat[__nRGB_length];
512
for(__nRGB_index = 0; __nRGB_index<__nRGB_length; __nRGB_index++)
514
m_nRGB[__nRGB_index] = nRGB[__nRGB_index];
516
int __RGBn_length = N;
517
m_RGBn = new RtFloat[__RGBn_length];
519
for(__RGBn_index = 0; __RGBn_index<__RGBn_length; __RGBn_index++)
521
m_RGBn[__RGBn_index] = RGBn[__RGBn_index];
524
virtual ~RiColorSamplesCache()
529
virtual void ReCall()
531
RiColorSamples(m_N, m_nRGB, m_RGBn);
540
class RiRelativeDetailCache : public RiCacheBase
543
RiRelativeDetailCache(RtFloat relativedetail) : RiCacheBase()
545
m_relativedetail = relativedetail;
547
virtual ~RiRelativeDetailCache()
550
virtual void ReCall()
552
RiRelativeDetail(m_relativedetail);
556
RtFloat m_relativedetail;
559
class RiOptionCache : public RiCacheBase
562
RiOptionCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
564
int __name_length = strlen(name);
565
m_name = new char[ __name_length + 1 ];
566
strcpy(m_name, name);
567
// Copy the plist here.
568
int constant_size = 1;
569
int uniform_size = 1;
570
int varying_size = 1;
572
int facevarying_size = 1;
573
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
575
virtual ~RiOptionCache()
578
// plist gets destroyed by the base class.
580
virtual void ReCall()
582
RiOptionV(m_name, m_count, m_tokens, m_values);
587
// plist information is stored in the base class.
590
class RiAttributeBeginCache : public RiCacheBase
593
RiAttributeBeginCache() : RiCacheBase()
596
virtual ~RiAttributeBeginCache()
599
virtual void ReCall()
607
class RiAttributeEndCache : public RiCacheBase
610
RiAttributeEndCache() : RiCacheBase()
613
virtual ~RiAttributeEndCache()
616
virtual void ReCall()
624
class RiColorCache : public RiCacheBase
627
RiColorCache(RtColor Cq) : RiCacheBase()
633
virtual ~RiColorCache()
636
virtual void ReCall()
645
class RiOpacityCache : public RiCacheBase
648
RiOpacityCache(RtColor Os) : RiCacheBase()
654
virtual ~RiOpacityCache()
657
virtual void ReCall()
666
class RiTextureCoordinatesCache : public RiCacheBase
669
RiTextureCoordinatesCache(RtFloat s1, RtFloat t1, RtFloat s2, RtFloat t2, RtFloat s3, RtFloat t3, RtFloat s4, RtFloat t4) : RiCacheBase()
680
virtual ~RiTextureCoordinatesCache()
683
virtual void ReCall()
685
RiTextureCoordinates(m_s1, m_t1, m_s2, m_t2, m_s3, m_t3, m_s4, m_t4);
699
class RiLightSourceCache : public RiCacheBase
702
RiLightSourceCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
704
int __name_length = strlen(name);
705
m_name = new char[ __name_length + 1 ];
706
strcpy(m_name, name);
707
// Copy the plist here.
708
int constant_size = 1;
709
int uniform_size = 1;
710
int varying_size = 1;
712
int facevarying_size = 1;
713
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
715
virtual ~RiLightSourceCache()
718
// plist gets destroyed by the base class.
720
virtual void ReCall()
722
RiLightSourceV(m_name, m_count, m_tokens, m_values);
727
// plist information is stored in the base class.
730
class RiAreaLightSourceCache : public RiCacheBase
733
RiAreaLightSourceCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
735
int __name_length = strlen(name);
736
m_name = new char[ __name_length + 1 ];
737
strcpy(m_name, name);
738
// Copy the plist here.
739
int constant_size = 1;
740
int uniform_size = 1;
741
int varying_size = 1;
743
int facevarying_size = 1;
744
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
746
virtual ~RiAreaLightSourceCache()
749
// plist gets destroyed by the base class.
751
virtual void ReCall()
753
RiAreaLightSourceV(m_name, m_count, m_tokens, m_values);
758
// plist information is stored in the base class.
761
class RiIlluminateCache : public RiCacheBase
764
RiIlluminateCache(RtLightHandle light, RtBoolean onoff) : RiCacheBase()
769
virtual ~RiIlluminateCache()
772
virtual void ReCall()
774
RiIlluminate(m_light, m_onoff);
778
RtLightHandle m_light;
782
class RiSurfaceCache : public RiCacheBase
785
RiSurfaceCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
787
int __name_length = strlen(name);
788
m_name = new char[ __name_length + 1 ];
789
strcpy(m_name, name);
790
// Copy the plist here.
791
int constant_size = 1;
792
int uniform_size = 1;
793
int varying_size = 1;
795
int facevarying_size = 1;
796
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
798
virtual ~RiSurfaceCache()
801
// plist gets destroyed by the base class.
803
virtual void ReCall()
805
RiSurfaceV(m_name, m_count, m_tokens, m_values);
810
// plist information is stored in the base class.
813
class RiAtmosphereCache : public RiCacheBase
816
RiAtmosphereCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
818
int __name_length = strlen(name);
819
m_name = new char[ __name_length + 1 ];
820
strcpy(m_name, name);
821
// Copy the plist here.
822
int constant_size = 1;
823
int uniform_size = 1;
824
int varying_size = 1;
826
int facevarying_size = 1;
827
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
829
virtual ~RiAtmosphereCache()
832
// plist gets destroyed by the base class.
834
virtual void ReCall()
836
RiAtmosphereV(m_name, m_count, m_tokens, m_values);
841
// plist information is stored in the base class.
844
class RiInteriorCache : public RiCacheBase
847
RiInteriorCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
849
int __name_length = strlen(name);
850
m_name = new char[ __name_length + 1 ];
851
strcpy(m_name, name);
852
// Copy the plist here.
853
int constant_size = 1;
854
int uniform_size = 1;
855
int varying_size = 1;
857
int facevarying_size = 1;
858
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
860
virtual ~RiInteriorCache()
863
// plist gets destroyed by the base class.
865
virtual void ReCall()
867
RiInteriorV(m_name, m_count, m_tokens, m_values);
872
// plist information is stored in the base class.
875
class RiExteriorCache : public RiCacheBase
878
RiExteriorCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
880
int __name_length = strlen(name);
881
m_name = new char[ __name_length + 1 ];
882
strcpy(m_name, name);
883
// Copy the plist here.
884
int constant_size = 1;
885
int uniform_size = 1;
886
int varying_size = 1;
888
int facevarying_size = 1;
889
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
891
virtual ~RiExteriorCache()
894
// plist gets destroyed by the base class.
896
virtual void ReCall()
898
RiExteriorV(m_name, m_count, m_tokens, m_values);
903
// plist information is stored in the base class.
906
class RiShadingRateCache : public RiCacheBase
909
RiShadingRateCache(RtFloat size) : RiCacheBase()
913
virtual ~RiShadingRateCache()
916
virtual void ReCall()
918
RiShadingRate(m_size);
925
class RiShadingInterpolationCache : public RiCacheBase
928
RiShadingInterpolationCache(RtToken type) : RiCacheBase()
930
int __type_length = strlen(type);
931
m_type = new char[ __type_length + 1 ];
932
strcpy(m_type, type);
934
virtual ~RiShadingInterpolationCache()
938
virtual void ReCall()
940
RiShadingInterpolation(m_type);
947
class RiMatteCache : public RiCacheBase
950
RiMatteCache(RtBoolean onoff) : RiCacheBase()
954
virtual ~RiMatteCache()
957
virtual void ReCall()
966
class RiBoundCache : public RiCacheBase
969
RiBoundCache(RtBound bound) : RiCacheBase()
971
m_bound[0] = bound[0];
972
m_bound[1] = bound[1];
973
m_bound[2] = bound[2];
974
m_bound[3] = bound[3];
975
m_bound[4] = bound[4];
976
m_bound[5] = bound[5];
978
virtual ~RiBoundCache()
981
virtual void ReCall()
990
class RiDetailCache : public RiCacheBase
993
RiDetailCache(RtBound bound) : RiCacheBase()
995
m_bound[0] = bound[0];
996
m_bound[1] = bound[1];
997
m_bound[2] = bound[2];
998
m_bound[3] = bound[3];
999
m_bound[4] = bound[4];
1000
m_bound[5] = bound[5];
1002
virtual ~RiDetailCache()
1005
virtual void ReCall()
1014
class RiDetailRangeCache : public RiCacheBase
1017
RiDetailRangeCache(RtFloat offlow, RtFloat onlow, RtFloat onhigh, RtFloat offhigh) : RiCacheBase()
1022
m_offhigh = offhigh;
1024
virtual ~RiDetailRangeCache()
1027
virtual void ReCall()
1029
RiDetailRange(m_offlow, m_onlow, m_onhigh, m_offhigh);
1039
class RiGeometricApproximationCache : public RiCacheBase
1042
RiGeometricApproximationCache(RtToken type, RtFloat value) : RiCacheBase()
1044
int __type_length = strlen(type);
1045
m_type = new char[ __type_length + 1 ];
1046
strcpy(m_type, type);
1049
virtual ~RiGeometricApproximationCache()
1053
virtual void ReCall()
1055
RiGeometricApproximation(m_type, m_value);
1063
class RiOrientationCache : public RiCacheBase
1066
RiOrientationCache(RtToken orientation) : RiCacheBase()
1068
int __orientation_length = strlen(orientation);
1069
m_orientation = new char[ __orientation_length + 1 ];
1070
strcpy(m_orientation, orientation);
1072
virtual ~RiOrientationCache()
1074
delete[](m_orientation);
1076
virtual void ReCall()
1078
RiOrientation(m_orientation);
1082
RtToken m_orientation;
1085
class RiReverseOrientationCache : public RiCacheBase
1088
RiReverseOrientationCache() : RiCacheBase()
1091
virtual ~RiReverseOrientationCache()
1094
virtual void ReCall()
1096
RiReverseOrientation();
1102
class RiSidesCache : public RiCacheBase
1105
RiSidesCache(RtInt nsides) : RiCacheBase()
1109
virtual ~RiSidesCache()
1112
virtual void ReCall()
1121
class RiIdentityCache : public RiCacheBase
1124
RiIdentityCache() : RiCacheBase()
1127
virtual ~RiIdentityCache()
1130
virtual void ReCall()
1138
class RiTransformCache : public RiCacheBase
1141
RiTransformCache(RtMatrix transform) : RiCacheBase()
1143
int __transform_i, __transform_j;
1144
for(__transform_j = 0; __transform_j<4; __transform_j++)
1145
for(__transform_i = 0; __transform_i<4; __transform_i++)
1146
m_transform[__transform_j][__transform_i] = transform[__transform_j][__transform_i];
1148
virtual ~RiTransformCache()
1151
virtual void ReCall()
1153
RiTransform(m_transform);
1157
RtMatrix m_transform;
1160
class RiConcatTransformCache : public RiCacheBase
1163
RiConcatTransformCache(RtMatrix transform) : RiCacheBase()
1165
int __transform_i, __transform_j;
1166
for(__transform_j = 0; __transform_j<4; __transform_j++)
1167
for(__transform_i = 0; __transform_i<4; __transform_i++)
1168
m_transform[__transform_j][__transform_i] = transform[__transform_j][__transform_i];
1170
virtual ~RiConcatTransformCache()
1173
virtual void ReCall()
1175
RiConcatTransform(m_transform);
1179
RtMatrix m_transform;
1182
class RiPerspectiveCache : public RiCacheBase
1185
RiPerspectiveCache(RtFloat fov) : RiCacheBase()
1189
virtual ~RiPerspectiveCache()
1192
virtual void ReCall()
1194
RiPerspective(m_fov);
1201
class RiTranslateCache : public RiCacheBase
1204
RiTranslateCache(RtFloat dx, RtFloat dy, RtFloat dz) : RiCacheBase()
1210
virtual ~RiTranslateCache()
1213
virtual void ReCall()
1215
RiTranslate(m_dx, m_dy, m_dz);
1224
class RiRotateCache : public RiCacheBase
1227
RiRotateCache(RtFloat angle, RtFloat dx, RtFloat dy, RtFloat dz) : RiCacheBase()
1234
virtual ~RiRotateCache()
1237
virtual void ReCall()
1239
RiRotate(m_angle, m_dx, m_dy, m_dz);
1249
class RiScaleCache : public RiCacheBase
1252
RiScaleCache(RtFloat sx, RtFloat sy, RtFloat sz) : RiCacheBase()
1258
virtual ~RiScaleCache()
1261
virtual void ReCall()
1263
RiScale(m_sx, m_sy, m_sz);
1272
class RiSkewCache : public RiCacheBase
1275
RiSkewCache(RtFloat angle, RtFloat dx1, RtFloat dy1, RtFloat dz1, RtFloat dx2, RtFloat dy2, RtFloat dz2) : RiCacheBase()
1285
virtual ~RiSkewCache()
1288
virtual void ReCall()
1290
RiSkew(m_angle, m_dx1, m_dy1, m_dz1, m_dx2, m_dy2, m_dz2);
1303
class RiDeformationCache : public RiCacheBase
1306
RiDeformationCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1308
int __name_length = strlen(name);
1309
m_name = new char[ __name_length + 1 ];
1310
strcpy(m_name, name);
1311
// Copy the plist here.
1312
int constant_size = 1;
1313
int uniform_size = 1;
1314
int varying_size = 1;
1315
int vertex_size = 1;
1316
int facevarying_size = 1;
1317
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1319
virtual ~RiDeformationCache()
1322
// plist gets destroyed by the base class.
1324
virtual void ReCall()
1326
RiDeformationV(m_name, m_count, m_tokens, m_values);
1331
// plist information is stored in the base class.
1334
class RiDisplacementCache : public RiCacheBase
1337
RiDisplacementCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1339
int __name_length = strlen(name);
1340
m_name = new char[ __name_length + 1 ];
1341
strcpy(m_name, name);
1342
// Copy the plist here.
1343
int constant_size = 1;
1344
int uniform_size = 1;
1345
int varying_size = 1;
1346
int vertex_size = 1;
1347
int facevarying_size = 1;
1348
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1350
virtual ~RiDisplacementCache()
1353
// plist gets destroyed by the base class.
1355
virtual void ReCall()
1357
RiDisplacementV(m_name, m_count, m_tokens, m_values);
1362
// plist information is stored in the base class.
1365
class RiCoordinateSystemCache : public RiCacheBase
1368
RiCoordinateSystemCache(RtToken space) : RiCacheBase()
1370
int __space_length = strlen(space);
1371
m_space = new char[ __space_length + 1 ];
1372
strcpy(m_space, space);
1374
virtual ~RiCoordinateSystemCache()
1378
virtual void ReCall()
1380
RiCoordinateSystem(m_space);
1387
class RiTransformPointsCache : public RiCacheBase
1390
RiTransformPointsCache(RtToken fromspace, RtToken tospace, RtInt npoints, RtPoint points[]) : RiCacheBase()
1392
int __fromspace_length = strlen(fromspace);
1393
m_fromspace = new char[ __fromspace_length + 1 ];
1394
strcpy(m_fromspace, fromspace);
1395
int __tospace_length = strlen(tospace);
1396
m_tospace = new char[ __tospace_length + 1 ];
1397
strcpy(m_tospace, tospace);
1398
m_npoints = npoints;
1399
int __points_length = npoints;
1400
m_points = new RtPoint[__points_length];
1402
for(__points_index = 0; __points_index<__points_length; __points_index++)
1404
m_points[__points_index][0] = points[__points_index][0];
1405
m_points[__points_index][1] = points[__points_index][1];
1406
m_points[__points_index][2] = points[__points_index][2];
1409
virtual ~RiTransformPointsCache()
1411
delete[](m_fromspace);
1412
delete[](m_tospace);
1415
virtual void ReCall()
1417
RiTransformPoints(m_fromspace, m_tospace, m_npoints, m_points);
1421
RtToken m_fromspace;
1427
class RiTransformBeginCache : public RiCacheBase
1430
RiTransformBeginCache() : RiCacheBase()
1433
virtual ~RiTransformBeginCache()
1436
virtual void ReCall()
1444
class RiTransformEndCache : public RiCacheBase
1447
RiTransformEndCache() : RiCacheBase()
1450
virtual ~RiTransformEndCache()
1453
virtual void ReCall()
1461
class RiAttributeCache : public RiCacheBase
1464
RiAttributeCache(RtToken name, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1466
int __name_length = strlen(name);
1467
m_name = new char[ __name_length + 1 ];
1468
strcpy(m_name, name);
1469
// Copy the plist here.
1470
int constant_size = 1;
1471
int uniform_size = 1;
1472
int varying_size = 1;
1473
int vertex_size = 1;
1474
int facevarying_size = 1;
1475
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1477
virtual ~RiAttributeCache()
1480
// plist gets destroyed by the base class.
1482
virtual void ReCall()
1484
RiAttributeV(m_name, m_count, m_tokens, m_values);
1489
// plist information is stored in the base class.
1492
class RiPolygonCache : public RiCacheBase
1495
RiPolygonCache(RtInt nvertices, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1497
m_nvertices = nvertices;
1498
// Copy the plist here.
1499
int constant_size = 1;
1500
int uniform_size = 1;
1501
int varying_size = 1;
1502
int vertex_size = 1;
1503
int facevarying_size = 1;
1504
varying_size = nvertices;
1505
vertex_size = nvertices;
1506
facevarying_size = nvertices;
1507
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1509
virtual ~RiPolygonCache()
1511
// plist gets destroyed by the base class.
1513
virtual void ReCall()
1515
RiPolygonV(m_nvertices, m_count, m_tokens, m_values);
1520
// plist information is stored in the base class.
1523
class RiGeneralPolygonCache : public RiCacheBase
1526
RiGeneralPolygonCache(RtInt nloops, RtInt nverts[], RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1529
int __nverts_length = nloops;
1530
m_nverts = new RtInt[__nverts_length];
1532
for(__nverts_index = 0; __nverts_index<__nverts_length; __nverts_index++)
1534
m_nverts[__nverts_index] = nverts[__nverts_index];
1536
// Copy the plist here.
1537
int constant_size = 1;
1538
int uniform_size = 1;
1539
int varying_size = 1;
1540
int vertex_size = 1;
1541
int facevarying_size = 1;
1545
for(__i=0;__i<nloops;__i++)
1546
varying_size+=nverts[__i];
1548
vertex_size = varying_size;
1549
facevarying_size = varying_size;
1550
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1552
virtual ~RiGeneralPolygonCache()
1555
// plist gets destroyed by the base class.
1557
virtual void ReCall()
1559
RiGeneralPolygonV(m_nloops, m_nverts, m_count, m_tokens, m_values);
1565
// plist information is stored in the base class.
1568
class RiPointsPolygonsCache : public RiCacheBase
1571
RiPointsPolygonsCache(RtInt npolys, RtInt nverts[], RtInt verts[], RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1574
int __nverts_length = npolys;
1575
m_nverts = new RtInt[__nverts_length];
1577
for(__nverts_index = 0; __nverts_index<__nverts_length; __nverts_index++)
1579
m_nverts[__nverts_index] = nverts[__nverts_index];
1581
int __verts_length = 0;
1584
for(__i=0; __i<npolys; __i++)
1585
__verts_length+=nverts[__i];
1587
m_verts = new RtInt[__verts_length];
1589
for(__verts_index = 0; __verts_index<__verts_length; __verts_index++)
1591
m_verts[__verts_index] = verts[__verts_index];
1593
// Copy the plist here.
1594
int constant_size = 1;
1595
int uniform_size = 1;
1596
int varying_size = 1;
1597
int vertex_size = 1;
1598
int facevarying_size = 1;
1602
for(__i=0; __i<__verts_length; __i++)
1603
if(verts[__i]>varying_size)
1604
varying_size=verts[__i];
1607
vertex_size=varying_size;
1611
for(__i=0; __i<npolys; __i++)
1612
facevarying_size+=nverts[__i];
1614
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1616
virtual ~RiPointsPolygonsCache()
1620
// plist gets destroyed by the base class.
1622
virtual void ReCall()
1624
RiPointsPolygonsV(m_npolys, m_nverts, m_verts, m_count, m_tokens, m_values);
1631
// plist information is stored in the base class.
1634
class RiPointsGeneralPolygonsCache : public RiCacheBase
1637
RiPointsGeneralPolygonsCache(RtInt npolys, RtInt nloops[], RtInt nverts[], RtInt verts[], RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1640
int __nloops_length = npolys;
1641
m_nloops = new RtInt[__nloops_length];
1643
for(__nloops_index = 0; __nloops_index<__nloops_length; __nloops_index++)
1645
m_nloops[__nloops_index] = nloops[__nloops_index];
1647
int __nverts_length = 0;
1650
for(__i=0; __i<npolys; __i++)
1651
__nverts_length+=nloops[__i];
1653
m_nverts = new RtInt[__nverts_length];
1655
for(__nverts_index = 0; __nverts_index<__nverts_length; __nverts_index++)
1657
m_nverts[__nverts_index] = nverts[__nverts_index];
1659
int __verts_length = 0;
1662
for(__i=0; __i<__nverts_length; __i++)
1663
__verts_length+=nverts[__i];
1665
m_verts = new RtInt[__verts_length];
1667
for(__verts_index = 0; __verts_index<__verts_length; __verts_index++)
1669
m_verts[__verts_index] = verts[__verts_index];
1671
// Copy the plist here.
1672
int constant_size = 1;
1673
int uniform_size = 1;
1674
int varying_size = 1;
1675
int vertex_size = 1;
1676
int facevarying_size = 1;
1680
for(__i=0; __i<__verts_length; __i++)
1681
if(verts[__i]>varying_size)
1682
varying_size=verts[__i];
1685
vertex_size=varying_size;
1689
for(__i=0; __i<npolys; __i++)
1690
facevarying_size+=nverts[__i];
1692
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1694
virtual ~RiPointsGeneralPolygonsCache()
1699
// plist gets destroyed by the base class.
1701
virtual void ReCall()
1703
RiPointsGeneralPolygonsV(m_npolys, m_nloops, m_nverts, m_verts, m_count, m_tokens, m_values);
1711
// plist information is stored in the base class.
1714
class RiBasisCache : public RiCacheBase
1717
RiBasisCache(RtBasis ubasis, RtInt ustep, RtBasis vbasis, RtInt vstep) : RiCacheBase()
1719
int __ubasis_i, __ubasis_j;
1720
for(__ubasis_j = 0; __ubasis_j<4; __ubasis_j++)
1721
for(__ubasis_i = 0; __ubasis_i<4; __ubasis_i++)
1722
m_ubasis[__ubasis_j][__ubasis_i] = ubasis[__ubasis_j][__ubasis_i];
1724
int __vbasis_i, __vbasis_j;
1725
for(__vbasis_j = 0; __vbasis_j<4; __vbasis_j++)
1726
for(__vbasis_i = 0; __vbasis_i<4; __vbasis_i++)
1727
m_vbasis[__vbasis_j][__vbasis_i] = vbasis[__vbasis_j][__vbasis_i];
1730
virtual ~RiBasisCache()
1733
virtual void ReCall()
1735
RiBasis(m_ubasis, m_ustep, m_vbasis, m_vstep);
1745
class RiPatchCache : public RiCacheBase
1748
RiPatchCache(RtToken type, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1750
int __type_length = strlen(type);
1751
m_type = new char[ __type_length + 1 ];
1752
strcpy(m_type, type);
1753
// Copy the plist here.
1754
int constant_size = 1;
1755
int uniform_size = 1;
1756
int varying_size = 1;
1757
int vertex_size = 1;
1758
int facevarying_size = 1;
1761
if(strcmp(type, "bicubic")==0)
1763
facevarying_size = varying_size;
1764
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1766
virtual ~RiPatchCache()
1769
// plist gets destroyed by the base class.
1771
virtual void ReCall()
1773
RiPatchV(m_type, m_count, m_tokens, m_values);
1778
// plist information is stored in the base class.
1781
class RiPatchMeshCache : public RiCacheBase
1784
RiPatchMeshCache(RtToken type, RtInt nu, RtToken uwrap, RtInt nv, RtToken vwrap, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1786
int __type_length = strlen(type);
1787
m_type = new char[ __type_length + 1 ];
1788
strcpy(m_type, type);
1790
int __uwrap_length = strlen(uwrap);
1791
m_uwrap = new char[ __uwrap_length + 1 ];
1792
strcpy(m_uwrap, uwrap);
1794
int __vwrap_length = strlen(vwrap);
1795
m_vwrap = new char[ __vwrap_length + 1 ];
1796
strcpy(m_vwrap, vwrap);
1797
// Copy the plist here.
1798
int constant_size = 1;
1799
int uniform_size = 1;
1800
int varying_size = 1;
1801
int vertex_size = 1;
1802
int facevarying_size = 1;
1804
if(strcmp(type, "bilinear")==0)
1806
if(strcmp(uwrap, "periodic")==0)
1809
uniform_size = nu-1;
1810
if(strcmp(vwrap, "periodic")==0)
1813
uniform_size *= nv-1;
1817
int ustep = QGetRenderContext() ->pattrCurrent()->GetIntegerAttribute( "System", "BasisStep" ) [ 0 ];
1818
int vstep = QGetRenderContext() ->pattrCurrent()->GetIntegerAttribute( "System", "BasisStep" ) [ 1 ];
1819
if(strcmp(uwrap, "periodic")==0)
1820
uniform_size = nu/ustep;
1822
uniform_size = (nu-4)/ustep;
1823
if(strcmp(vwrap, "periodic")==0)
1824
uniform_size *= nv/vstep;
1826
uniform_size *= (nv-4)/vstep;
1829
if(strcmp(type, "bilinear")==0)
1830
varying_size = nu*nv;
1833
int ustep = QGetRenderContext() ->pattrCurrent()->GetIntegerAttribute( "System", "BasisStep" ) [ 0 ];
1834
int vstep = QGetRenderContext() ->pattrCurrent()->GetIntegerAttribute( "System", "BasisStep" ) [ 1 ];
1835
varying_size = (nu/ustep)*(nv/vstep);
1838
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1840
virtual ~RiPatchMeshCache()
1845
// plist gets destroyed by the base class.
1847
virtual void ReCall()
1849
RiPatchMeshV(m_type, m_nu, m_uwrap, m_nv, m_vwrap, m_count, m_tokens, m_values);
1858
// plist information is stored in the base class.
1861
class RiNuPatchCache : public RiCacheBase
1864
RiNuPatchCache(RtInt nu, RtInt uorder, RtFloat uknot[], RtFloat umin, RtFloat umax, RtInt nv, RtInt vorder, RtFloat vknot[], RtFloat vmin, RtFloat vmax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
1868
int __uknot_length = nu + uorder;
1869
m_uknot = new RtFloat[__uknot_length];
1871
for(__uknot_index = 0; __uknot_index<__uknot_length; __uknot_index++)
1873
m_uknot[__uknot_index] = uknot[__uknot_index];
1879
int __vknot_length = nv + vorder;
1880
m_vknot = new RtFloat[__vknot_length];
1882
for(__vknot_index = 0; __vknot_index<__vknot_length; __vknot_index++)
1884
m_vknot[__vknot_index] = vknot[__vknot_index];
1888
// Copy the plist here.
1889
int constant_size = 1;
1890
int uniform_size = 1;
1891
int varying_size = 1;
1892
int vertex_size = 1;
1893
int facevarying_size = 1;
1894
uniform_size=(1+nu-uorder+1)*(1+nv-vorder+1);
1895
varying_size=(1+nu-uorder+1)*(1+nv-vorder+1);
1897
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
1899
virtual ~RiNuPatchCache()
1903
// plist gets destroyed by the base class.
1905
virtual void ReCall()
1907
RiNuPatchV(m_nu, m_uorder, m_uknot, m_umin, m_umax, m_nv, m_vorder, m_vknot, m_vmin, m_vmax, m_count, m_tokens, m_values);
1921
// plist information is stored in the base class.
1924
class RiTrimCurveCache : public RiCacheBase
1927
RiTrimCurveCache(RtInt nloops, RtInt ncurves[], RtInt order[], RtFloat knot[], RtFloat min[], RtFloat max[], RtInt n[], RtFloat u[], RtFloat v[], RtFloat w[]) : RiCacheBase()
1930
int __ncurves_length = nloops;
1931
m_ncurves = new RtInt[__ncurves_length];
1932
int __ncurves_index;
1933
for(__ncurves_index = 0; __ncurves_index<__ncurves_length; __ncurves_index++)
1935
m_ncurves[__ncurves_index] = ncurves[__ncurves_index];
1937
int __order_length = 0;
1940
for(__i=0; __i<nloops; __i++)
1941
__order_length+=ncurves[__i];
1943
m_order = new RtInt[__order_length];
1945
for(__order_index = 0; __order_index<__order_length; __order_index++)
1947
m_order[__order_index] = order[__order_index];
1949
int __knot_length = 0;
1952
for(__i=0; __i<__order_length; __i++)
1953
__knot_length+=order[__i]+n[__i];
1955
m_knot = new RtFloat[__knot_length];
1957
for(__knot_index = 0; __knot_index<__knot_length; __knot_index++)
1959
m_knot[__knot_index] = knot[__knot_index];
1961
int __min_length = __order_length;
1962
m_min = new RtFloat[__min_length];
1964
for(__min_index = 0; __min_index<__min_length; __min_index++)
1966
m_min[__min_index] = min[__min_index];
1968
int __max_length = __order_length;
1969
m_max = new RtFloat[__max_length];
1971
for(__max_index = 0; __max_index<__max_length; __max_index++)
1973
m_max[__max_index] = max[__max_index];
1975
int __n_length = __order_length;
1976
m_n = new RtInt[__n_length];
1978
for(__n_index = 0; __n_index<__n_length; __n_index++)
1980
m_n[__n_index] = n[__n_index];
1985
for(__i=0; __i<__order_length; __i++)
1988
m_u = new RtFloat[__u_length];
1990
for(__u_index = 0; __u_index<__u_length; __u_index++)
1992
m_u[__u_index] = u[__u_index];
1994
int __v_length = __u_length;
1995
m_v = new RtFloat[__v_length];
1997
for(__v_index = 0; __v_index<__v_length; __v_index++)
1999
m_v[__v_index] = v[__v_index];
2001
int __w_length = __u_length;
2002
m_w = new RtFloat[__w_length];
2004
for(__w_index = 0; __w_index<__w_length; __w_index++)
2006
m_w[__w_index] = w[__w_index];
2009
virtual ~RiTrimCurveCache()
2011
delete[](m_ncurves);
2021
virtual void ReCall()
2023
RiTrimCurve(m_nloops, m_ncurves, m_order, m_knot, m_min, m_max, m_n, m_u, m_v, m_w);
2039
class RiSphereCache : public RiCacheBase
2042
RiSphereCache(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2047
m_thetamax = thetamax;
2048
// Copy the plist here.
2049
int constant_size = 1;
2050
int uniform_size = 1;
2051
int varying_size = 1;
2052
int vertex_size = 1;
2053
int facevarying_size = 1;
2056
facevarying_size = 4;
2057
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2059
virtual ~RiSphereCache()
2061
// plist gets destroyed by the base class.
2063
virtual void ReCall()
2065
RiSphereV(m_radius, m_zmin, m_zmax, m_thetamax, m_count, m_tokens, m_values);
2073
// plist information is stored in the base class.
2076
class RiConeCache : public RiCacheBase
2079
RiConeCache(RtFloat height, RtFloat radius, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2083
m_thetamax = thetamax;
2084
// Copy the plist here.
2085
int constant_size = 1;
2086
int uniform_size = 1;
2087
int varying_size = 1;
2088
int vertex_size = 1;
2089
int facevarying_size = 1;
2092
facevarying_size = 4;
2093
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2095
virtual ~RiConeCache()
2097
// plist gets destroyed by the base class.
2099
virtual void ReCall()
2101
RiConeV(m_height, m_radius, m_thetamax, m_count, m_tokens, m_values);
2108
// plist information is stored in the base class.
2111
class RiCylinderCache : public RiCacheBase
2114
RiCylinderCache(RtFloat radius, RtFloat zmin, RtFloat zmax, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2119
m_thetamax = thetamax;
2120
// Copy the plist here.
2121
int constant_size = 1;
2122
int uniform_size = 1;
2123
int varying_size = 1;
2124
int vertex_size = 1;
2125
int facevarying_size = 1;
2128
facevarying_size = 4;
2129
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2131
virtual ~RiCylinderCache()
2133
// plist gets destroyed by the base class.
2135
virtual void ReCall()
2137
RiCylinderV(m_radius, m_zmin, m_zmax, m_thetamax, m_count, m_tokens, m_values);
2145
// plist information is stored in the base class.
2148
class RiHyperboloidCache : public RiCacheBase
2151
RiHyperboloidCache(RtPoint point1, RtPoint point2, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2153
m_point1[0] = point1[0];
2154
m_point1[1] = point1[1];
2155
m_point1[2] = point1[2];
2156
m_point2[0] = point2[0];
2157
m_point2[1] = point2[1];
2158
m_point2[2] = point2[2];
2159
m_thetamax = thetamax;
2160
// Copy the plist here.
2161
int constant_size = 1;
2162
int uniform_size = 1;
2163
int varying_size = 1;
2164
int vertex_size = 1;
2165
int facevarying_size = 1;
2168
facevarying_size = 4;
2169
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2171
virtual ~RiHyperboloidCache()
2173
// plist gets destroyed by the base class.
2175
virtual void ReCall()
2177
RiHyperboloidV(m_point1, m_point2, m_thetamax, m_count, m_tokens, m_values);
2184
// plist information is stored in the base class.
2187
class RiParaboloidCache : public RiCacheBase
2190
RiParaboloidCache(RtFloat rmax, RtFloat zmin, RtFloat zmax, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2195
m_thetamax = thetamax;
2196
// Copy the plist here.
2197
int constant_size = 1;
2198
int uniform_size = 1;
2199
int varying_size = 1;
2200
int vertex_size = 1;
2201
int facevarying_size = 1;
2204
facevarying_size = 4;
2205
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2207
virtual ~RiParaboloidCache()
2209
// plist gets destroyed by the base class.
2211
virtual void ReCall()
2213
RiParaboloidV(m_rmax, m_zmin, m_zmax, m_thetamax, m_count, m_tokens, m_values);
2221
// plist information is stored in the base class.
2224
class RiDiskCache : public RiCacheBase
2227
RiDiskCache(RtFloat height, RtFloat radius, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2231
m_thetamax = thetamax;
2232
// Copy the plist here.
2233
int constant_size = 1;
2234
int uniform_size = 1;
2235
int varying_size = 1;
2236
int vertex_size = 1;
2237
int facevarying_size = 1;
2240
facevarying_size = 4;
2241
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2243
virtual ~RiDiskCache()
2245
// plist gets destroyed by the base class.
2247
virtual void ReCall()
2249
RiDiskV(m_height, m_radius, m_thetamax, m_count, m_tokens, m_values);
2256
// plist information is stored in the base class.
2259
class RiTorusCache : public RiCacheBase
2262
RiTorusCache(RtFloat majorrad, RtFloat minorrad, RtFloat phimin, RtFloat phimax, RtFloat thetamax, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2264
m_majorrad = majorrad;
2265
m_minorrad = minorrad;
2268
m_thetamax = thetamax;
2269
// Copy the plist here.
2270
int constant_size = 1;
2271
int uniform_size = 1;
2272
int varying_size = 1;
2273
int vertex_size = 1;
2274
int facevarying_size = 1;
2277
facevarying_size = 4;
2278
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2280
virtual ~RiTorusCache()
2282
// plist gets destroyed by the base class.
2284
virtual void ReCall()
2286
RiTorusV(m_majorrad, m_minorrad, m_phimin, m_phimax, m_thetamax, m_count, m_tokens, m_values);
2295
// plist information is stored in the base class.
2298
class RiProceduralCache : public RiCacheBase
2301
RiProceduralCache(RtPointer data, RtBound bound, RtProcSubdivFunc refineproc, RtProcFreeFunc freeproc) : RiCacheBase()
2304
m_bound[0] = bound[0];
2305
m_bound[1] = bound[1];
2306
m_bound[2] = bound[2];
2307
m_bound[3] = bound[3];
2308
m_bound[4] = bound[4];
2309
m_bound[5] = bound[5];
2310
m_refineproc = refineproc;
2311
m_freeproc = freeproc;
2313
virtual ~RiProceduralCache()
2316
virtual void ReCall()
2318
RiProcedural(m_data, m_bound, m_refineproc, m_freeproc);
2324
RtProcSubdivFunc m_refineproc;
2325
RtProcFreeFunc m_freeproc;
2328
class RiGeometryCache : public RiCacheBase
2331
RiGeometryCache(RtToken type, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2333
int __type_length = strlen(type);
2334
m_type = new char[ __type_length + 1 ];
2335
strcpy(m_type, type);
2336
// Copy the plist here.
2337
int constant_size = 1;
2338
int uniform_size = 1;
2339
int varying_size = 1;
2340
int vertex_size = 1;
2341
int facevarying_size = 1;
2342
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2344
virtual ~RiGeometryCache()
2347
// plist gets destroyed by the base class.
2349
virtual void ReCall()
2351
RiGeometryV(m_type, m_count, m_tokens, m_values);
2356
// plist information is stored in the base class.
2359
class RiSolidBeginCache : public RiCacheBase
2362
RiSolidBeginCache(RtToken type) : RiCacheBase()
2364
int __type_length = strlen(type);
2365
m_type = new char[ __type_length + 1 ];
2366
strcpy(m_type, type);
2368
virtual ~RiSolidBeginCache()
2372
virtual void ReCall()
2374
RiSolidBegin(m_type);
2381
class RiSolidEndCache : public RiCacheBase
2384
RiSolidEndCache() : RiCacheBase()
2387
virtual ~RiSolidEndCache()
2390
virtual void ReCall()
2398
class RiObjectBeginCache : public RiCacheBase
2401
RiObjectBeginCache() : RiCacheBase()
2404
virtual ~RiObjectBeginCache()
2407
virtual void ReCall()
2415
class RiObjectEndCache : public RiCacheBase
2418
RiObjectEndCache() : RiCacheBase()
2421
virtual ~RiObjectEndCache()
2424
virtual void ReCall()
2432
class RiObjectInstanceCache : public RiCacheBase
2435
RiObjectInstanceCache(RtObjectHandle handle) : RiCacheBase()
2439
virtual ~RiObjectInstanceCache()
2442
virtual void ReCall()
2444
RiObjectInstance(m_handle);
2448
RtObjectHandle m_handle;
2451
class RiMotionBeginVCache : public RiCacheBase
2454
RiMotionBeginVCache(RtInt N, RtFloat times[]) : RiCacheBase()
2457
int __times_length = N;
2458
m_times = new RtFloat[__times_length];
2460
for(__times_index = 0; __times_index<__times_length; __times_index++)
2462
m_times[__times_index] = times[__times_index];
2465
virtual ~RiMotionBeginVCache()
2469
virtual void ReCall()
2471
RiMotionBeginV(m_N, m_times);
2479
class RiMotionEndCache : public RiCacheBase
2482
RiMotionEndCache() : RiCacheBase()
2485
virtual ~RiMotionEndCache()
2488
virtual void ReCall()
2496
class RiMakeTextureCache : public RiCacheBase
2499
RiMakeTextureCache(RtString imagefile, RtString texturefile, RtToken swrap, RtToken twrap, RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2501
int __imagefile_length = strlen(imagefile);
2502
m_imagefile = new char[ __imagefile_length + 1 ];
2503
strcpy(m_imagefile, imagefile);
2504
int __texturefile_length = strlen(texturefile);
2505
m_texturefile = new char[ __texturefile_length + 1 ];
2506
strcpy(m_texturefile, texturefile);
2507
int __swrap_length = strlen(swrap);
2508
m_swrap = new char[ __swrap_length + 1 ];
2509
strcpy(m_swrap, swrap);
2510
int __twrap_length = strlen(twrap);
2511
m_twrap = new char[ __twrap_length + 1 ];
2512
strcpy(m_twrap, twrap);
2513
m_filterfunc = filterfunc;
2516
// Copy the plist here.
2517
int constant_size = 1;
2518
int uniform_size = 1;
2519
int varying_size = 1;
2520
int vertex_size = 1;
2521
int facevarying_size = 1;
2522
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2524
virtual ~RiMakeTextureCache()
2526
delete[](m_imagefile);
2527
delete[](m_texturefile);
2530
// plist gets destroyed by the base class.
2532
virtual void ReCall()
2534
RiMakeTextureV(m_imagefile, m_texturefile, m_swrap, m_twrap, m_filterfunc, m_swidth, m_twidth, m_count, m_tokens, m_values);
2538
RtString m_imagefile;
2539
RtString m_texturefile;
2542
RtFilterFunc m_filterfunc;
2545
// plist information is stored in the base class.
2548
class RiMakeBumpCache : public RiCacheBase
2551
RiMakeBumpCache(RtString imagefile, RtString bumpfile, RtToken swrap, RtToken twrap, RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2553
int __imagefile_length = strlen(imagefile);
2554
m_imagefile = new char[ __imagefile_length + 1 ];
2555
strcpy(m_imagefile, imagefile);
2556
int __bumpfile_length = strlen(bumpfile);
2557
m_bumpfile = new char[ __bumpfile_length + 1 ];
2558
strcpy(m_bumpfile, bumpfile);
2559
int __swrap_length = strlen(swrap);
2560
m_swrap = new char[ __swrap_length + 1 ];
2561
strcpy(m_swrap, swrap);
2562
int __twrap_length = strlen(twrap);
2563
m_twrap = new char[ __twrap_length + 1 ];
2564
strcpy(m_twrap, twrap);
2565
m_filterfunc = filterfunc;
2568
// Copy the plist here.
2569
int constant_size = 1;
2570
int uniform_size = 1;
2571
int varying_size = 1;
2572
int vertex_size = 1;
2573
int facevarying_size = 1;
2574
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2576
virtual ~RiMakeBumpCache()
2578
delete[](m_imagefile);
2579
delete[](m_bumpfile);
2582
// plist gets destroyed by the base class.
2584
virtual void ReCall()
2586
RiMakeBumpV(m_imagefile, m_bumpfile, m_swrap, m_twrap, m_filterfunc, m_swidth, m_twidth, m_count, m_tokens, m_values);
2590
RtString m_imagefile;
2591
RtString m_bumpfile;
2594
RtFilterFunc m_filterfunc;
2597
// plist information is stored in the base class.
2600
class RiMakeLatLongEnvironmentCache : public RiCacheBase
2603
RiMakeLatLongEnvironmentCache(RtString imagefile, RtString reflfile, RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2605
int __imagefile_length = strlen(imagefile);
2606
m_imagefile = new char[ __imagefile_length + 1 ];
2607
strcpy(m_imagefile, imagefile);
2608
int __reflfile_length = strlen(reflfile);
2609
m_reflfile = new char[ __reflfile_length + 1 ];
2610
strcpy(m_reflfile, reflfile);
2611
m_filterfunc = filterfunc;
2614
// Copy the plist here.
2615
int constant_size = 1;
2616
int uniform_size = 1;
2617
int varying_size = 1;
2618
int vertex_size = 1;
2619
int facevarying_size = 1;
2620
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2622
virtual ~RiMakeLatLongEnvironmentCache()
2624
delete[](m_imagefile);
2625
delete[](m_reflfile);
2626
// plist gets destroyed by the base class.
2628
virtual void ReCall()
2630
RiMakeLatLongEnvironmentV(m_imagefile, m_reflfile, m_filterfunc, m_swidth, m_twidth, m_count, m_tokens, m_values);
2634
RtString m_imagefile;
2635
RtString m_reflfile;
2636
RtFilterFunc m_filterfunc;
2639
// plist information is stored in the base class.
2642
class RiMakeCubeFaceEnvironmentCache : public RiCacheBase
2645
RiMakeCubeFaceEnvironmentCache(RtString px, RtString nx, RtString py, RtString ny, RtString pz, RtString nz, RtString reflfile, RtFloat fov, RtFilterFunc filterfunc, RtFloat swidth, RtFloat twidth, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2647
int __px_length = strlen(px);
2648
m_px = new char[ __px_length + 1 ];
2650
int __nx_length = strlen(nx);
2651
m_nx = new char[ __nx_length + 1 ];
2653
int __py_length = strlen(py);
2654
m_py = new char[ __py_length + 1 ];
2656
int __ny_length = strlen(ny);
2657
m_ny = new char[ __ny_length + 1 ];
2659
int __pz_length = strlen(pz);
2660
m_pz = new char[ __pz_length + 1 ];
2662
int __nz_length = strlen(nz);
2663
m_nz = new char[ __nz_length + 1 ];
2665
int __reflfile_length = strlen(reflfile);
2666
m_reflfile = new char[ __reflfile_length + 1 ];
2667
strcpy(m_reflfile, reflfile);
2669
m_filterfunc = filterfunc;
2672
// Copy the plist here.
2673
int constant_size = 1;
2674
int uniform_size = 1;
2675
int varying_size = 1;
2676
int vertex_size = 1;
2677
int facevarying_size = 1;
2678
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2680
virtual ~RiMakeCubeFaceEnvironmentCache()
2688
delete[](m_reflfile);
2689
// plist gets destroyed by the base class.
2691
virtual void ReCall()
2693
RiMakeCubeFaceEnvironmentV(m_px, m_nx, m_py, m_ny, m_pz, m_nz, m_reflfile, m_fov, m_filterfunc, m_swidth, m_twidth, m_count, m_tokens, m_values);
2703
RtString m_reflfile;
2705
RtFilterFunc m_filterfunc;
2708
// plist information is stored in the base class.
2711
class RiMakeShadowCache : public RiCacheBase
2714
RiMakeShadowCache(RtString picfile, RtString shadowfile, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2716
int __picfile_length = strlen(picfile);
2717
m_picfile = new char[ __picfile_length + 1 ];
2718
strcpy(m_picfile, picfile);
2719
int __shadowfile_length = strlen(shadowfile);
2720
m_shadowfile = new char[ __shadowfile_length + 1 ];
2721
strcpy(m_shadowfile, shadowfile);
2722
// Copy the plist here.
2723
int constant_size = 1;
2724
int uniform_size = 1;
2725
int varying_size = 1;
2726
int vertex_size = 1;
2727
int facevarying_size = 1;
2728
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2730
virtual ~RiMakeShadowCache()
2732
delete[](m_picfile);
2733
delete[](m_shadowfile);
2734
// plist gets destroyed by the base class.
2736
virtual void ReCall()
2738
RiMakeShadowV(m_picfile, m_shadowfile, m_count, m_tokens, m_values);
2743
RtString m_shadowfile;
2744
// plist information is stored in the base class.
2747
class RiMakeOcclusionCache : public RiCacheBase
2750
RiMakeOcclusionCache(RtInt npics, RtString picfiles[], RtString shadowfile, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2753
int __picfiles_length = npics;
2754
m_picfiles = new RtString[__picfiles_length];
2755
int __picfiles_index;
2756
for(__picfiles_index = 0; __picfiles_index<__picfiles_length; __picfiles_index++)
2758
int __picfiles_slength = strlen(picfiles[__picfiles_index]);
2759
m_picfiles[__picfiles_index] = new char[ __picfiles_slength + 1 ];
2760
strcpy(m_picfiles[__picfiles_index], picfiles[__picfiles_index]);
2762
int __shadowfile_length = strlen(shadowfile);
2763
m_shadowfile = new char[ __shadowfile_length + 1 ];
2764
strcpy(m_shadowfile, shadowfile);
2765
// Copy the plist here.
2766
int constant_size = 1;
2767
int uniform_size = 1;
2768
int varying_size = 1;
2769
int vertex_size = 1;
2770
int facevarying_size = 1;
2771
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2773
virtual ~RiMakeOcclusionCache()
2775
int __picfiles_length = 1;
2776
int __picfiles_index;
2777
for(__picfiles_index = 0; __picfiles_index<__picfiles_length; __picfiles_index++)
2779
delete[](m_picfiles[__picfiles_index]);
2781
delete[](m_picfiles);
2782
delete[](m_shadowfile);
2783
// plist gets destroyed by the base class.
2785
virtual void ReCall()
2787
RiMakeOcclusionV(m_npics, m_picfiles, m_shadowfile, m_count, m_tokens, m_values);
2792
RtString* m_picfiles;
2793
RtString m_shadowfile;
2794
// plist information is stored in the base class.
2797
class RiErrorHandlerCache : public RiCacheBase
2800
RiErrorHandlerCache(RtErrorFunc handler) : RiCacheBase()
2802
m_handler = handler;
2804
virtual ~RiErrorHandlerCache()
2807
virtual void ReCall()
2809
RiErrorHandler(m_handler);
2813
RtErrorFunc m_handler;
2816
class RiClippingPlaneCache : public RiCacheBase
2819
RiClippingPlaneCache(RtFloat x, RtFloat y, RtFloat z, RtFloat nx, RtFloat ny, RtFloat nz) : RiCacheBase()
2828
virtual ~RiClippingPlaneCache()
2831
virtual void ReCall()
2833
RiClippingPlane(m_x, m_y, m_z, m_nx, m_ny, m_nz);
2845
class RiCoordSysTransformCache : public RiCacheBase
2848
RiCoordSysTransformCache(RtToken space) : RiCacheBase()
2850
int __space_length = strlen(space);
2851
m_space = new char[ __space_length + 1 ];
2852
strcpy(m_space, space);
2854
virtual ~RiCoordSysTransformCache()
2858
virtual void ReCall()
2860
RiCoordSysTransform(m_space);
2867
class RiBlobbyCache : public RiCacheBase
2870
RiBlobbyCache(RtInt nleaf, RtInt ncode, RtInt code[], RtInt nflt, RtFloat flt[], RtInt nstr, RtToken str[], RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2874
int __code_length = ncode;
2875
m_code = new RtInt[__code_length];
2877
for(__code_index = 0; __code_index<__code_length; __code_index++)
2879
m_code[__code_index] = code[__code_index];
2882
int __flt_length = nflt;
2883
m_flt = new RtFloat[__flt_length];
2885
for(__flt_index = 0; __flt_index<__flt_length; __flt_index++)
2887
m_flt[__flt_index] = flt[__flt_index];
2890
int __str_length = nstr;
2891
m_str = new RtToken[__str_length];
2893
for(__str_index = 0; __str_index<__str_length; __str_index++)
2895
int __str_slength = strlen(str[__str_index]);
2896
m_str[__str_index] = new char[ __str_slength + 1 ];
2897
strcpy(m_str[__str_index], str[__str_index]);
2899
// Copy the plist here.
2900
int constant_size = 1;
2901
int uniform_size = 1;
2902
int varying_size = 1;
2903
int vertex_size = 1;
2904
int facevarying_size = 1;
2905
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2907
virtual ~RiBlobbyCache()
2911
int __str_length = 1;
2913
for(__str_index = 0; __str_index<__str_length; __str_index++)
2915
delete[](m_str[__str_index]);
2918
// plist gets destroyed by the base class.
2920
virtual void ReCall()
2922
RiBlobbyV(m_nleaf, m_ncode, m_code, m_nflt, m_flt, m_nstr, m_str, m_count, m_tokens, m_values);
2933
// plist information is stored in the base class.
2936
class RiPointsCache : public RiCacheBase
2939
RiPointsCache(RtInt npoints, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2941
m_npoints = npoints;
2942
// Copy the plist here.
2943
int constant_size = 1;
2944
int uniform_size = 1;
2945
int varying_size = 1;
2946
int vertex_size = 1;
2947
int facevarying_size = 1;
2948
varying_size = npoints;
2949
vertex_size = npoints;
2950
facevarying_size = npoints;
2951
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
2953
virtual ~RiPointsCache()
2955
// plist gets destroyed by the base class.
2957
virtual void ReCall()
2959
RiPointsV(m_npoints, m_count, m_tokens, m_values);
2964
// plist information is stored in the base class.
2967
class RiCurvesCache : public RiCacheBase
2970
RiCurvesCache(RtToken type, RtInt ncurves, RtInt nvertices[], RtToken wrap, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
2972
int __type_length = strlen(type);
2973
m_type = new char[ __type_length + 1 ];
2974
strcpy(m_type, type);
2975
m_ncurves = ncurves;
2976
int __nvertices_length = ncurves;
2977
m_nvertices = new RtInt[__nvertices_length];
2978
int __nvertices_index;
2979
for(__nvertices_index = 0; __nvertices_index<__nvertices_length; __nvertices_index++)
2981
m_nvertices[__nvertices_index] = nvertices[__nvertices_index];
2983
int __wrap_length = strlen(wrap);
2984
m_wrap = new char[ __wrap_length + 1 ];
2985
strcpy(m_wrap, wrap);
2986
// Copy the plist here.
2987
int constant_size = 1;
2988
int uniform_size = 1;
2989
int varying_size = 1;
2990
int vertex_size = 1;
2991
int facevarying_size = 1;
2992
uniform_size = ncurves;
2996
for(__i=0; __i<__nvertices_length; __i++)
2998
if(strcmp(type, "cubic")==0)
3000
int step = QGetRenderContext() ->pattrCurrent()->GetIntegerAttribute( "System", "BasisStep" ) [ 0 ];
3001
if(strcmp(wrap, "periodic")==0)
3002
varying_size+=nvertices[__i]/step;
3004
varying_size+=((nvertices[__i]-4)/step)+1;
3008
if(strcmp(wrap, "periodic")==0)
3009
varying_size+=nvertices[__i];
3011
varying_size+=nvertices[__i]-1;
3019
for(__i=0; __i<ncurves; __i++)
3020
vertex_size+=nvertices[__i];
3022
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
3024
virtual ~RiCurvesCache()
3027
delete[](m_nvertices);
3029
// plist gets destroyed by the base class.
3031
virtual void ReCall()
3033
RiCurvesV(m_type, m_ncurves, m_nvertices, m_wrap, m_count, m_tokens, m_values);
3041
// plist information is stored in the base class.
3044
class RiSubdivisionMeshCache : public RiCacheBase
3047
RiSubdivisionMeshCache(RtToken scheme, RtInt nfaces, RtInt nvertices[], RtInt vertices[], RtInt ntags, RtToken tags[], RtInt nargs[], RtInt intargs[], RtFloat floatargs[], RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
3049
int __scheme_length = strlen(scheme);
3050
m_scheme = new char[ __scheme_length + 1 ];
3051
strcpy(m_scheme, scheme);
3053
int __nvertices_length = nfaces;
3054
m_nvertices = new RtInt[__nvertices_length];
3055
int __nvertices_index;
3056
for(__nvertices_index = 0; __nvertices_index<__nvertices_length; __nvertices_index++)
3058
m_nvertices[__nvertices_index] = nvertices[__nvertices_index];
3060
int __vertices_length = 0;
3063
for(__i=0; __i<nfaces; __i++)
3064
__vertices_length+=nvertices[__i];
3066
m_vertices = new RtInt[__vertices_length];
3067
int __vertices_index;
3068
for(__vertices_index = 0; __vertices_index<__vertices_length; __vertices_index++)
3070
m_vertices[__vertices_index] = vertices[__vertices_index];
3073
int __tags_length = ntags; m_tags = new RtToken[__tags_length];
3075
for(__tags_index = 0; __tags_index<__tags_length; __tags_index++)
3077
int __tags_slength = strlen(tags[__tags_index]);
3078
m_tags[__tags_index] = new char[ __tags_slength + 1 ];
3079
strcpy(m_tags[__tags_index], tags[__tags_index]);
3081
int __nargs_length = ntags*2;
3082
m_nargs = new RtInt[__nargs_length];
3084
for(__nargs_index = 0; __nargs_index<__nargs_length; __nargs_index++)
3086
m_nargs[__nargs_index] = nargs[__nargs_index];
3088
int __intargs_length = 0;
3091
for(__i=0; __i<ntags*2; __i+=2)
3092
__intargs_length+=nargs[__i];
3094
m_intargs = new RtInt[__intargs_length];
3095
int __intargs_index;
3096
for(__intargs_index = 0; __intargs_index<__intargs_length; __intargs_index++)
3098
m_intargs[__intargs_index] = intargs[__intargs_index];
3100
int __floatargs_length = 0;
3103
for(__i=0; __i<ntags*2; __i+=2)
3104
__floatargs_length+=nargs[__i+1];
3106
m_floatargs = new RtFloat[__floatargs_length];
3107
int __floatargs_index;
3108
for(__floatargs_index = 0; __floatargs_index<__floatargs_length; __floatargs_index++)
3110
m_floatargs[__floatargs_index] = floatargs[__floatargs_index];
3112
// Copy the plist here.
3113
int constant_size = 1;
3114
int uniform_size = 1;
3115
int varying_size = 1;
3116
int vertex_size = 1;
3117
int facevarying_size = 1;
3121
for(__i=0; __i<__vertices_length; __i++)
3122
if(vertices[__i]>varying_size)
3123
varying_size=vertices[__i];
3126
vertex_size=varying_size;
3130
for(__i=0; __i<nfaces; __i++)
3131
facevarying_size+=nvertices[__i];
3133
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
3135
virtual ~RiSubdivisionMeshCache()
3138
delete[](m_nvertices);
3139
delete[](m_vertices);
3140
int __tags_length = 1;
3142
for(__tags_index = 0; __tags_index<__tags_length; __tags_index++)
3144
delete[](m_tags[__tags_index]);
3148
delete[](m_intargs);
3149
delete[](m_floatargs);
3150
// plist gets destroyed by the base class.
3152
virtual void ReCall()
3154
RiSubdivisionMeshV(m_scheme, m_nfaces, m_nvertices, m_vertices, m_ntags, m_tags, m_nargs, m_intargs, m_floatargs, m_count, m_tokens, m_values);
3166
RtFloat* m_floatargs;
3167
// plist information is stored in the base class.
3170
class RiReadArchiveCache : public RiCacheBase
3173
RiReadArchiveCache(RtToken name, RtArchiveCallback callback, RtInt count, RtToken tokens[], RtPointer values[]) : RiCacheBase()
3175
int __name_length = strlen(name);
3176
m_name = new char[ __name_length + 1 ];
3177
strcpy(m_name, name);
3178
m_callback = callback;
3179
// Copy the plist here.
3180
int constant_size = 1;
3181
int uniform_size = 1;
3182
int varying_size = 1;
3183
int vertex_size = 1;
3184
int facevarying_size = 1;
3185
CachePlist(count, tokens, values, constant_size, uniform_size, varying_size, vertex_size, facevarying_size);
3187
virtual ~RiReadArchiveCache()
3190
// plist gets destroyed by the base class.
3192
virtual void ReCall()
3194
RiReadArchiveV(m_name, m_callback, m_count, m_tokens, m_values);
3199
RtArchiveCallback m_callback;
3200
// plist information is stored in the base class.
3203
#define Cache_RiDeclare\
3204
if( QGetRenderContext()->pCurrentObject()) \
3206
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3207
new RiDeclareCache(name, declaration) ); \
3210
#define Cache_RiFrameBegin\
3211
if( QGetRenderContext()->pCurrentObject()) \
3213
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3214
new RiFrameBeginCache(number) ); \
3217
#define Cache_RiFrameEnd\
3218
if( QGetRenderContext()->pCurrentObject()) \
3220
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3221
new RiFrameEndCache() ); \
3224
#define Cache_RiWorldBegin\
3225
if( QGetRenderContext()->pCurrentObject()) \
3227
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3228
new RiWorldBeginCache() ); \
3231
#define Cache_RiWorldEnd\
3232
if( QGetRenderContext()->pCurrentObject()) \
3234
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3235
new RiWorldEndCache() ); \
3238
#define Cache_RiFormat\
3239
if( QGetRenderContext()->pCurrentObject()) \
3241
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3242
new RiFormatCache(xresolution, yresolution, pixelaspectratio) ); \
3245
#define Cache_RiFrameAspectRatio\
3246
if( QGetRenderContext()->pCurrentObject()) \
3248
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3249
new RiFrameAspectRatioCache(frameratio) ); \
3252
#define Cache_RiScreenWindow\
3253
if( QGetRenderContext()->pCurrentObject()) \
3255
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3256
new RiScreenWindowCache(left, right, bottom, top) ); \
3259
#define Cache_RiCropWindow\
3260
if( QGetRenderContext()->pCurrentObject()) \
3262
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3263
new RiCropWindowCache(left, right, top, bottom) ); \
3266
#define Cache_RiProjection\
3267
if( QGetRenderContext()->pCurrentObject()) \
3269
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3270
new RiProjectionCache(name, count, tokens, values) ); \
3273
#define Cache_RiClipping\
3274
if( QGetRenderContext()->pCurrentObject()) \
3276
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3277
new RiClippingCache(cnear, cfar) ); \
3280
#define Cache_RiDepthOfField\
3281
if( QGetRenderContext()->pCurrentObject()) \
3283
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3284
new RiDepthOfFieldCache(fstop, focallength, focaldistance) ); \
3287
#define Cache_RiShutter\
3288
if( QGetRenderContext()->pCurrentObject()) \
3290
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3291
new RiShutterCache(opentime, closetime) ); \
3294
#define Cache_RiPixelVariance\
3295
if( QGetRenderContext()->pCurrentObject()) \
3297
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3298
new RiPixelVarianceCache(variance) ); \
3301
#define Cache_RiPixelSamples\
3302
if( QGetRenderContext()->pCurrentObject()) \
3304
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3305
new RiPixelSamplesCache(xsamples, ysamples) ); \
3308
#define Cache_RiPixelFilter\
3309
if( QGetRenderContext()->pCurrentObject()) \
3311
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3312
new RiPixelFilterCache(function, xwidth, ywidth) ); \
3315
#define Cache_RiExposure\
3316
if( QGetRenderContext()->pCurrentObject()) \
3318
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3319
new RiExposureCache(gain, gamma) ); \
3322
#define Cache_RiImager\
3323
if( QGetRenderContext()->pCurrentObject()) \
3325
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3326
new RiImagerCache(name, count, tokens, values) ); \
3329
#define Cache_RiQuantize\
3330
if( QGetRenderContext()->pCurrentObject()) \
3332
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3333
new RiQuantizeCache(type, one, min, max, ditheramplitude) ); \
3336
#define Cache_RiDisplay\
3337
if( QGetRenderContext()->pCurrentObject()) \
3339
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3340
new RiDisplayCache(name, type, mode, count, tokens, values) ); \
3343
#define Cache_RiHider\
3344
if( QGetRenderContext()->pCurrentObject()) \
3346
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3347
new RiHiderCache(name, count, tokens, values) ); \
3350
#define Cache_RiColorSamples\
3351
if( QGetRenderContext()->pCurrentObject()) \
3353
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3354
new RiColorSamplesCache(N, nRGB, RGBn) ); \
3357
#define Cache_RiRelativeDetail\
3358
if( QGetRenderContext()->pCurrentObject()) \
3360
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3361
new RiRelativeDetailCache(relativedetail) ); \
3364
#define Cache_RiOption\
3365
if( QGetRenderContext()->pCurrentObject()) \
3367
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3368
new RiOptionCache(name, count, tokens, values) ); \
3371
#define Cache_RiAttributeBegin\
3372
if( QGetRenderContext()->pCurrentObject()) \
3374
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3375
new RiAttributeBeginCache() ); \
3378
#define Cache_RiAttributeEnd\
3379
if( QGetRenderContext()->pCurrentObject()) \
3381
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3382
new RiAttributeEndCache() ); \
3385
#define Cache_RiColor\
3386
if( QGetRenderContext()->pCurrentObject()) \
3388
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3389
new RiColorCache(Cq) ); \
3392
#define Cache_RiOpacity\
3393
if( QGetRenderContext()->pCurrentObject()) \
3395
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3396
new RiOpacityCache(Os) ); \
3399
#define Cache_RiTextureCoordinates\
3400
if( QGetRenderContext()->pCurrentObject()) \
3402
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3403
new RiTextureCoordinatesCache(s1, t1, s2, t2, s3, t3, s4, t4) ); \
3406
#define Cache_RiLightSource\
3407
if( QGetRenderContext()->pCurrentObject()) \
3409
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3410
new RiLightSourceCache(name, count, tokens, values) ); \
3413
#define Cache_RiAreaLightSource\
3414
if( QGetRenderContext()->pCurrentObject()) \
3416
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3417
new RiAreaLightSourceCache(name, count, tokens, values) ); \
3420
#define Cache_RiIlluminate\
3421
if( QGetRenderContext()->pCurrentObject()) \
3423
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3424
new RiIlluminateCache(light, onoff) ); \
3427
#define Cache_RiSurface\
3428
if( QGetRenderContext()->pCurrentObject()) \
3430
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3431
new RiSurfaceCache(name, count, tokens, values) ); \
3434
#define Cache_RiAtmosphere\
3435
if( QGetRenderContext()->pCurrentObject()) \
3437
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3438
new RiAtmosphereCache(name, count, tokens, values) ); \
3441
#define Cache_RiInterior\
3442
if( QGetRenderContext()->pCurrentObject()) \
3444
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3445
new RiInteriorCache(name, count, tokens, values) ); \
3448
#define Cache_RiExterior\
3449
if( QGetRenderContext()->pCurrentObject()) \
3451
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3452
new RiExteriorCache(name, count, tokens, values) ); \
3455
#define Cache_RiShadingRate\
3456
if( QGetRenderContext()->pCurrentObject()) \
3458
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3459
new RiShadingRateCache(size) ); \
3462
#define Cache_RiShadingInterpolation\
3463
if( QGetRenderContext()->pCurrentObject()) \
3465
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3466
new RiShadingInterpolationCache(type) ); \
3469
#define Cache_RiMatte\
3470
if( QGetRenderContext()->pCurrentObject()) \
3472
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3473
new RiMatteCache(onoff) ); \
3476
#define Cache_RiBound\
3477
if( QGetRenderContext()->pCurrentObject()) \
3479
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3480
new RiBoundCache(bound) ); \
3483
#define Cache_RiDetail\
3484
if( QGetRenderContext()->pCurrentObject()) \
3486
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3487
new RiDetailCache(bound) ); \
3490
#define Cache_RiDetailRange\
3491
if( QGetRenderContext()->pCurrentObject()) \
3493
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3494
new RiDetailRangeCache(offlow, onlow, onhigh, offhigh) ); \
3497
#define Cache_RiGeometricApproximation\
3498
if( QGetRenderContext()->pCurrentObject()) \
3500
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3501
new RiGeometricApproximationCache(type, value) ); \
3504
#define Cache_RiOrientation\
3505
if( QGetRenderContext()->pCurrentObject()) \
3507
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3508
new RiOrientationCache(orientation) ); \
3511
#define Cache_RiReverseOrientation\
3512
if( QGetRenderContext()->pCurrentObject()) \
3514
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3515
new RiReverseOrientationCache() ); \
3518
#define Cache_RiSides\
3519
if( QGetRenderContext()->pCurrentObject()) \
3521
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3522
new RiSidesCache(nsides) ); \
3525
#define Cache_RiIdentity\
3526
if( QGetRenderContext()->pCurrentObject()) \
3528
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3529
new RiIdentityCache() ); \
3532
#define Cache_RiTransform\
3533
if( QGetRenderContext()->pCurrentObject()) \
3535
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3536
new RiTransformCache(transform) ); \
3539
#define Cache_RiConcatTransform\
3540
if( QGetRenderContext()->pCurrentObject()) \
3542
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3543
new RiConcatTransformCache(transform) ); \
3546
#define Cache_RiPerspective\
3547
if( QGetRenderContext()->pCurrentObject()) \
3549
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3550
new RiPerspectiveCache(fov) ); \
3553
#define Cache_RiTranslate\
3554
if( QGetRenderContext()->pCurrentObject()) \
3556
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3557
new RiTranslateCache(dx, dy, dz) ); \
3560
#define Cache_RiRotate\
3561
if( QGetRenderContext()->pCurrentObject()) \
3563
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3564
new RiRotateCache(angle, dx, dy, dz) ); \
3567
#define Cache_RiScale\
3568
if( QGetRenderContext()->pCurrentObject()) \
3570
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3571
new RiScaleCache(sx, sy, sz) ); \
3574
#define Cache_RiSkew\
3575
if( QGetRenderContext()->pCurrentObject()) \
3577
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3578
new RiSkewCache(angle, dx1, dy1, dz1, dx2, dy2, dz2) ); \
3581
#define Cache_RiDeformation\
3582
if( QGetRenderContext()->pCurrentObject()) \
3584
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3585
new RiDeformationCache(name, count, tokens, values) ); \
3588
#define Cache_RiDisplacement\
3589
if( QGetRenderContext()->pCurrentObject()) \
3591
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3592
new RiDisplacementCache(name, count, tokens, values) ); \
3595
#define Cache_RiCoordinateSystem\
3596
if( QGetRenderContext()->pCurrentObject()) \
3598
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3599
new RiCoordinateSystemCache(space) ); \
3602
#define Cache_RiTransformPoints\
3603
if( QGetRenderContext()->pCurrentObject()) \
3605
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3606
new RiTransformPointsCache(fromspace, tospace, npoints, points) ); \
3609
#define Cache_RiTransformBegin\
3610
if( QGetRenderContext()->pCurrentObject()) \
3612
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3613
new RiTransformBeginCache() ); \
3616
#define Cache_RiTransformEnd\
3617
if( QGetRenderContext()->pCurrentObject()) \
3619
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3620
new RiTransformEndCache() ); \
3623
#define Cache_RiAttribute\
3624
if( QGetRenderContext()->pCurrentObject()) \
3626
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3627
new RiAttributeCache(name, count, tokens, values) ); \
3630
#define Cache_RiPolygon\
3631
if( QGetRenderContext()->pCurrentObject()) \
3633
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3634
new RiPolygonCache(nvertices, count, tokens, values) ); \
3637
#define Cache_RiGeneralPolygon\
3638
if( QGetRenderContext()->pCurrentObject()) \
3640
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3641
new RiGeneralPolygonCache(nloops, nverts, count, tokens, values) ); \
3644
#define Cache_RiPointsPolygons\
3645
if( QGetRenderContext()->pCurrentObject()) \
3647
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3648
new RiPointsPolygonsCache(npolys, nverts, verts, count, tokens, values) ); \
3651
#define Cache_RiPointsGeneralPolygons\
3652
if( QGetRenderContext()->pCurrentObject()) \
3654
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3655
new RiPointsGeneralPolygonsCache(npolys, nloops, nverts, verts, count, tokens, values) ); \
3658
#define Cache_RiBasis\
3659
if( QGetRenderContext()->pCurrentObject()) \
3661
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3662
new RiBasisCache(ubasis, ustep, vbasis, vstep) ); \
3665
#define Cache_RiPatch\
3666
if( QGetRenderContext()->pCurrentObject()) \
3668
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3669
new RiPatchCache(type, count, tokens, values) ); \
3672
#define Cache_RiPatchMesh\
3673
if( QGetRenderContext()->pCurrentObject()) \
3675
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3676
new RiPatchMeshCache(type, nu, uwrap, nv, vwrap, count, tokens, values) ); \
3679
#define Cache_RiNuPatch\
3680
if( QGetRenderContext()->pCurrentObject()) \
3682
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3683
new RiNuPatchCache(nu, uorder, uknot, umin, umax, nv, vorder, vknot, vmin, vmax, count, tokens, values) ); \
3686
#define Cache_RiTrimCurve\
3687
if( QGetRenderContext()->pCurrentObject()) \
3689
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3690
new RiTrimCurveCache(nloops, ncurves, order, knot, min, max, n, u, v, w) ); \
3693
#define Cache_RiSphere\
3694
if( QGetRenderContext()->pCurrentObject()) \
3696
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3697
new RiSphereCache(radius, zmin, zmax, thetamax, count, tokens, values) ); \
3700
#define Cache_RiCone\
3701
if( QGetRenderContext()->pCurrentObject()) \
3703
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3704
new RiConeCache(height, radius, thetamax, count, tokens, values) ); \
3707
#define Cache_RiCylinder\
3708
if( QGetRenderContext()->pCurrentObject()) \
3710
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3711
new RiCylinderCache(radius, zmin, zmax, thetamax, count, tokens, values) ); \
3714
#define Cache_RiHyperboloid\
3715
if( QGetRenderContext()->pCurrentObject()) \
3717
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3718
new RiHyperboloidCache(point1, point2, thetamax, count, tokens, values) ); \
3721
#define Cache_RiParaboloid\
3722
if( QGetRenderContext()->pCurrentObject()) \
3724
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3725
new RiParaboloidCache(rmax, zmin, zmax, thetamax, count, tokens, values) ); \
3728
#define Cache_RiDisk\
3729
if( QGetRenderContext()->pCurrentObject()) \
3731
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3732
new RiDiskCache(height, radius, thetamax, count, tokens, values) ); \
3735
#define Cache_RiTorus\
3736
if( QGetRenderContext()->pCurrentObject()) \
3738
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3739
new RiTorusCache(majorrad, minorrad, phimin, phimax, thetamax, count, tokens, values) ); \
3742
#define Cache_RiProcedural\
3743
if( QGetRenderContext()->pCurrentObject()) \
3745
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3746
new RiProceduralCache(data, bound, refineproc, freeproc) ); \
3749
#define Cache_RiGeometry\
3750
if( QGetRenderContext()->pCurrentObject()) \
3752
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3753
new RiGeometryCache(type, count, tokens, values) ); \
3756
#define Cache_RiSolidBegin\
3757
if( QGetRenderContext()->pCurrentObject()) \
3759
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3760
new RiSolidBeginCache(type) ); \
3763
#define Cache_RiSolidEnd\
3764
if( QGetRenderContext()->pCurrentObject()) \
3766
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3767
new RiSolidEndCache() ); \
3770
#define Cache_RiObjectBegin\
3771
if( QGetRenderContext()->pCurrentObject()) \
3773
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3774
new RiObjectBeginCache() ); \
3777
#define Cache_RiObjectEnd\
3778
if( QGetRenderContext()->pCurrentObject()) \
3780
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3781
new RiObjectEndCache() ); \
3784
#define Cache_RiObjectInstance\
3785
if( QGetRenderContext()->pCurrentObject()) \
3787
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3788
new RiObjectInstanceCache(handle) ); \
3791
#define Cache_RiMotionBeginV\
3792
if( QGetRenderContext()->pCurrentObject()) \
3794
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3795
new RiMotionBeginVCache(N, times) ); \
3798
#define Cache_RiMotionEnd\
3799
if( QGetRenderContext()->pCurrentObject()) \
3801
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3802
new RiMotionEndCache() ); \
3805
#define Cache_RiMakeTexture\
3806
if( QGetRenderContext()->pCurrentObject()) \
3808
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3809
new RiMakeTextureCache(imagefile, texturefile, swrap, twrap, filterfunc, swidth, twidth, count, tokens, values) ); \
3812
#define Cache_RiMakeBump\
3813
if( QGetRenderContext()->pCurrentObject()) \
3815
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3816
new RiMakeBumpCache(imagefile, bumpfile, swrap, twrap, filterfunc, swidth, twidth, count, tokens, values) ); \
3819
#define Cache_RiMakeLatLongEnvironment\
3820
if( QGetRenderContext()->pCurrentObject()) \
3822
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3823
new RiMakeLatLongEnvironmentCache(imagefile, reflfile, filterfunc, swidth, twidth, count, tokens, values) ); \
3826
#define Cache_RiMakeCubeFaceEnvironment\
3827
if( QGetRenderContext()->pCurrentObject()) \
3829
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3830
new RiMakeCubeFaceEnvironmentCache(px, nx, py, ny, pz, nz, reflfile, fov, filterfunc, swidth, twidth, count, tokens, values) ); \
3833
#define Cache_RiMakeShadow\
3834
if( QGetRenderContext()->pCurrentObject()) \
3836
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3837
new RiMakeShadowCache(picfile, shadowfile, count, tokens, values) ); \
3840
#define Cache_RiMakeOcclusion\
3841
if( QGetRenderContext()->pCurrentObject()) \
3843
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3844
new RiMakeOcclusionCache(npics, picfiles, shadowfile, count, tokens, values) ); \
3847
#define Cache_RiErrorHandler\
3848
if( QGetRenderContext()->pCurrentObject()) \
3850
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3851
new RiErrorHandlerCache(handler) ); \
3854
#define Cache_RiClippingPlane\
3855
if( QGetRenderContext()->pCurrentObject()) \
3857
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3858
new RiClippingPlaneCache(x, y, z, nx, ny, nz) ); \
3861
#define Cache_RiCoordSysTransform\
3862
if( QGetRenderContext()->pCurrentObject()) \
3864
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3865
new RiCoordSysTransformCache(space) ); \
3868
#define Cache_RiBlobby\
3869
if( QGetRenderContext()->pCurrentObject()) \
3871
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3872
new RiBlobbyCache(nleaf, ncode, code, nflt, flt, nstr, str, count, tokens, values) ); \
3875
#define Cache_RiPoints\
3876
if( QGetRenderContext()->pCurrentObject()) \
3878
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3879
new RiPointsCache(npoints, count, tokens, values) ); \
3882
#define Cache_RiCurves\
3883
if( QGetRenderContext()->pCurrentObject()) \
3885
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3886
new RiCurvesCache(type, ncurves, nvertices, wrap, count, tokens, values) ); \
3889
#define Cache_RiSubdivisionMesh\
3890
if( QGetRenderContext()->pCurrentObject()) \
3892
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3893
new RiSubdivisionMeshCache(scheme, nfaces, nvertices, vertices, ntags, tags, nargs, intargs, floatargs, count, tokens, values) ); \
3896
#define Cache_RiReadArchive\
3897
if( QGetRenderContext()->pCurrentObject()) \
3899
QGetRenderContext()->pCurrentObject()->AddCacheCommand( \
3900
new RiReadArchiveCache(name, callback, count, tokens, values) ); \
b'\\ No newline at end of file'