1 /* NAME:
2 QD3DView.c
3
4 DESCRIPTION:
5 Entry point for Quesa API calls. Performs parameter checking and
6 then forwards each API call to the equivalent E3xxxxx routine.
7
8 COPYRIGHT:
9 Copyright (c) 1999-2005, Quesa Developers. All rights reserved.
10
11 For the current release of Quesa, please see:
12
13 <http://www.quesa.org/>
14
15 Redistribution and use in source and binary forms, with or without
16 modification, are permitted provided that the following conditions
17 are met:
18
19 o Redistributions of source code must retain the above copyright
20 notice, this list of conditions and the following disclaimer.
21
22 o Redistributions in binary form must reproduce the above
23 copyright notice, this list of conditions and the following
24 disclaimer in the documentation and/or other materials provided
25 with the distribution.
26
27 o Neither the name of Quesa nor the names of its contributors
28 may be used to endorse or promote products derived from this
29 software without specific prior written permission.
30
31 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
37 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
38 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
39 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
40 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
41 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 ___________________________________________________________________________
43 */
44 //=============================================================================
45 // Include files
46 //-----------------------------------------------------------------------------
47 #include "E3Prefix.h"
48 #include "E3Camera.h"
49 #include "E3DrawContext.h"
50 #include "E3Group.h"
51 #include "E3Pick.h"
52 #include "E3Renderer.h"
53 #include "E3View.h"
54
55
56
57
58
59 //=============================================================================
60 // Internal constants
61 //-----------------------------------------------------------------------------
62 // Internal constants go here
63
64
65
66
67
68 //=============================================================================
69 // Internal types
70 //-----------------------------------------------------------------------------
71 // Internal types go here
72
73
74
75
76
77 //=============================================================================
78 // Internal macros
79 //-----------------------------------------------------------------------------
80 // Internal macros go here
81
82
83
84
85
86 //=============================================================================
87 // Public functions
88 //-----------------------------------------------------------------------------
89 // Q3View_New : Quesa API entry point.
90 //-----------------------------------------------------------------------------
91 #pragma mark -
92 TQ3ViewObject
Q3View_New(void)93 Q3View_New(void)
94 {
95
96
97 // Call the bottleneck
98 E3System_Bottleneck();
99
100
101
102 // Call our implementation
103 return(E3View_New());
104 }
105
106
107
108
109
110 //=============================================================================
111 // Q3View_NewWithDefaults : Quesa API entry point.
112 //-----------------------------------------------------------------------------
113 TQ3ViewObject
Q3View_NewWithDefaults(TQ3ObjectType drawContextType,void * drawContextTarget)114 Q3View_NewWithDefaults(TQ3ObjectType drawContextType, void *drawContextTarget)
115 {
116
117
118 // Release build checks
119 Q3_REQUIRE_OR_RESULT(drawContextType == kQ3DrawContextTypePixmap ||
120 drawContextType == kQ3DrawContextTypeMacintosh ||
121 drawContextType == kQ3DrawContextTypeCocoa ||
122 drawContextType == kQ3DrawContextTypeWin32DC, NULL);
123 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(drawContextTarget), NULL);
124
125
126
127 // Debug build checks
128 #if Q3_DEBUG
129 if (0) // Further checks on drawContextType
130 return(NULL);
131
132 if (0) // Further checks on drawContextTarget
133 return(NULL);
134 #endif
135
136
137
138 // Call the bottleneck
139 E3System_Bottleneck();
140
141
142
143 // Call our implementation
144 return(E3View_NewWithDefaults(drawContextType, drawContextTarget));
145 }
146
147
148
149
150
151 //=============================================================================
152 // Q3View_Cancel : Quesa API entry point.
153 //-----------------------------------------------------------------------------
154 TQ3Status
Q3View_Cancel(TQ3ViewObject view)155 Q3View_Cancel(TQ3ViewObject view)
156 {
157
158
159 // Release build checks
160 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
161
162
163
164 // Debug build checks
165 #if Q3_DEBUG
166 if (0) // Further checks on view
167 return(kQ3Failure);
168 #endif
169
170
171
172 // Call the bottleneck
173 E3System_Bottleneck();
174
175
176
177 // Call our implementation
178 return(E3View_Cancel(view));
179 }
180
181
182
183
184
185 //=============================================================================
186 // Q3View_SetRendererByType : Quesa API entry point.
187 //-----------------------------------------------------------------------------
188 TQ3Status
Q3View_SetRendererByType(TQ3ViewObject view,TQ3ObjectType theType)189 Q3View_SetRendererByType(TQ3ViewObject view, TQ3ObjectType theType)
190 {
191
192
193 // Release build checks
194 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
195
196
197
198 // Debug build checks
199 #if Q3_DEBUG
200 if (0) // Further checks on view
201 return(kQ3Failure);
202
203 if (0) // Further checks on theType
204 return(kQ3Failure);
205 #endif
206
207
208
209 // Call the bottleneck
210 E3System_Bottleneck();
211
212
213
214 // Call our implementation
215 return(E3View_SetRendererByType(view, theType));
216 }
217
218
219
220
221
222 //=============================================================================
223 // Q3View_SetRenderer : Quesa API entry point.
224 //-----------------------------------------------------------------------------
225 TQ3Status
Q3View_SetRenderer(TQ3ViewObject view,TQ3RendererObject renderer)226 Q3View_SetRenderer(TQ3ViewObject view, TQ3RendererObject renderer)
227 {
228
229
230 // Release build checks
231 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
232 Q3_REQUIRE_OR_RESULT((renderer == NULL) || E3Renderer_IsOfMyClass ( renderer ), kQ3Failure);
233
234
235
236 // Debug build checks
237 #if Q3_DEBUG
238 if (0) // Further checks on view
239 return(kQ3Failure);
240
241 if (0) // Further checks on renderer
242 return(kQ3Failure);
243 #endif
244
245
246
247 // Call the bottleneck
248 E3System_Bottleneck();
249
250
251
252 // Call our implementation
253 return(E3View_SetRenderer(view, renderer));
254 }
255
256
257
258
259
260 //=============================================================================
261 // Q3View_GetRenderer : Quesa API entry point.
262 //-----------------------------------------------------------------------------
263 TQ3Status
Q3View_GetRenderer(TQ3ViewObject view,TQ3RendererObject * renderer)264 Q3View_GetRenderer(TQ3ViewObject view, TQ3RendererObject *renderer)
265 {
266
267
268 // Release build checks
269 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
270 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(renderer), kQ3Failure);
271
272
273
274 // Debug build checks
275 #if Q3_DEBUG
276 if (0) // Further checks on view
277 return(kQ3Failure);
278
279 if (0) // Further checks on renderer
280 return(kQ3Failure);
281 #endif
282
283
284
285 // Call the bottleneck
286 E3System_Bottleneck();
287
288
289
290 // Call our implementation
291 return(E3View_GetRenderer(view, renderer));
292 }
293
294
295
296
297
298 //=============================================================================
299 // Q3View_StartRendering : Quesa API entry point.
300 //-----------------------------------------------------------------------------
301 TQ3Status
Q3View_StartRendering(TQ3ViewObject view)302 Q3View_StartRendering(TQ3ViewObject view)
303 {
304
305
306 // Release build checks
307 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
308
309
310
311 // Debug build checks
312 #if Q3_DEBUG
313 if (0) // Further checks on view
314 return(kQ3Failure);
315 #endif
316
317
318
319 // Call the bottleneck
320 E3System_Bottleneck();
321
322
323
324 // Call our implementation
325 return(E3View_StartRendering(view));
326 }
327
328
329
330
331
332 //=============================================================================
333 // Q3View_EndRendering : Quesa API entry point.
334 //-----------------------------------------------------------------------------
335 TQ3ViewStatus
Q3View_EndRendering(TQ3ViewObject view)336 Q3View_EndRendering(TQ3ViewObject view)
337 {
338
339
340 // Release build checks
341 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3ViewStatusError);
342
343
344
345 // Debug build checks
346 #if Q3_DEBUG
347 if (0) // Further checks on view
348 return(kQ3ViewStatusError);
349 #endif
350
351
352
353 // Call the bottleneck
354 E3System_Bottleneck();
355
356
357
358 // Call our implementation
359 return(E3View_EndRendering(view));
360 }
361
362
363
364
365
366 //=============================================================================
367 // Q3View_Flush : Quesa API entry point.
368 //-----------------------------------------------------------------------------
369 TQ3Status
Q3View_Flush(TQ3ViewObject view)370 Q3View_Flush(TQ3ViewObject view)
371 {
372
373
374 // Release build checks
375 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
376
377
378
379 // Debug build checks
380 #if Q3_DEBUG
381 if (0) // Further checks on view
382 return(kQ3Failure);
383 #endif
384
385
386
387 // Call the bottleneck
388 E3System_Bottleneck();
389
390
391
392 // Call our implementation
393 return(E3View_Flush(view));
394 }
395
396
397
398
399
400 //=============================================================================
401 // Q3View_Sync : Quesa API entry point.
402 //-----------------------------------------------------------------------------
403 TQ3Status
Q3View_Sync(TQ3ViewObject view)404 Q3View_Sync(TQ3ViewObject view)
405 {
406
407
408 // Release build checks
409 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
410
411
412
413 // Debug build checks
414 #if Q3_DEBUG
415 if (0) // Further checks on view
416 return(kQ3Failure);
417 #endif
418
419
420
421 // Call the bottleneck
422 E3System_Bottleneck();
423
424
425
426 // Call our implementation
427 return(E3View_Sync(view));
428 }
429
430
431
432
433
434 //=============================================================================
435 // Q3View_StartBoundingBox : Quesa API entry point.
436 //-----------------------------------------------------------------------------
437 TQ3Status
Q3View_StartBoundingBox(TQ3ViewObject view,TQ3ComputeBounds computeBounds)438 Q3View_StartBoundingBox(TQ3ViewObject view, TQ3ComputeBounds computeBounds)
439 {
440
441
442 // Release build checks
443 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
444
445
446
447 // Debug build checks
448 #if Q3_DEBUG
449 if (0) // Further checks on view
450 return(kQ3Failure);
451
452 if (0) // Further checks on computeBounds
453 return(kQ3Failure);
454 #endif
455
456
457
458 // Call the bottleneck
459 E3System_Bottleneck();
460
461
462
463 // Call our implementation
464 return(E3View_StartBoundingBox(view, computeBounds));
465 }
466
467
468
469
470
471 //=============================================================================
472 // Q3View_EndBoundingBox : Quesa API entry point.
473 //-----------------------------------------------------------------------------
474 TQ3ViewStatus
Q3View_EndBoundingBox(TQ3ViewObject view,TQ3BoundingBox * result)475 Q3View_EndBoundingBox(TQ3ViewObject view, TQ3BoundingBox *result)
476 {
477
478
479 // Release build checks
480 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3ViewStatusError);
481 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(result), kQ3ViewStatusError);
482
483
484
485 // Debug build checks
486 #if Q3_DEBUG
487 if (0) // Further checks on view
488 return(kQ3ViewStatusError);
489
490 if (0) // Further checks on result
491 return(kQ3ViewStatusError);
492 #endif
493
494
495
496 // Call the bottleneck
497 E3System_Bottleneck();
498
499
500
501 // Call our implementation
502 return(E3View_EndBoundingBox(view, result));
503 }
504
505
506
507
508
509 //=============================================================================
510 // Q3View_StartBoundingSphere : Quesa API entry point.
511 //-----------------------------------------------------------------------------
512 TQ3Status
Q3View_StartBoundingSphere(TQ3ViewObject view,TQ3ComputeBounds computeBounds)513 Q3View_StartBoundingSphere(TQ3ViewObject view, TQ3ComputeBounds computeBounds)
514 {
515
516
517 // Release build checks
518 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
519
520
521
522 // Debug build checks
523 #if Q3_DEBUG
524 if (0) // Further checks on view
525 return(kQ3Failure);
526
527 if (0) // Further checks on computeBounds
528 return(kQ3Failure);
529 #endif
530
531
532
533 // Call the bottleneck
534 E3System_Bottleneck();
535
536
537
538 // Call our implementation
539 return(E3View_StartBoundingSphere(view, computeBounds));
540 }
541
542
543
544
545
546 //=============================================================================
547 // Q3View_EndBoundingSphere : Quesa API entry point.
548 //-----------------------------------------------------------------------------
549 TQ3ViewStatus
Q3View_EndBoundingSphere(TQ3ViewObject view,TQ3BoundingSphere * result)550 Q3View_EndBoundingSphere(TQ3ViewObject view, TQ3BoundingSphere *result)
551 {
552
553
554 // Release build checks
555 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3ViewStatusError);
556 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(result), kQ3ViewStatusError);
557
558
559
560 // Debug build checks
561 #if Q3_DEBUG
562 if (0) // Further checks on view
563 return(kQ3ViewStatusError);
564
565 if (0) // Further checks on result
566 return(kQ3ViewStatusError);
567 #endif
568
569
570
571 // Call the bottleneck
572 E3System_Bottleneck();
573
574
575
576 // Call our implementation
577 return(E3View_EndBoundingSphere(view, result));
578 }
579
580
581
582
583
584 //=============================================================================
585 // Q3View_StartPicking : Quesa API entry point.
586 //-----------------------------------------------------------------------------
587 TQ3Status
Q3View_StartPicking(TQ3ViewObject view,TQ3PickObject pick)588 Q3View_StartPicking(TQ3ViewObject view, TQ3PickObject pick)
589 {
590
591
592 // Release build checks
593 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
594 Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
595
596
597
598 // Debug build checks
599 #if Q3_DEBUG
600 if (0) // Further checks on view
601 return(kQ3Failure);
602
603 if (0) // Further checks on pick
604 return(kQ3Failure);
605 #endif
606
607
608
609 // Call the bottleneck
610 E3System_Bottleneck();
611
612
613
614 // Call our implementation
615 return(E3View_StartPicking(view, pick));
616 }
617
618
619
620
621
622 //=============================================================================
623 // Q3View_EndPicking : Quesa API entry point.
624 //-----------------------------------------------------------------------------
625 TQ3ViewStatus
Q3View_EndPicking(TQ3ViewObject view)626 Q3View_EndPicking(TQ3ViewObject view)
627 {
628
629
630 // Release build checks
631 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3ViewStatusError);
632
633
634
635 // Debug build checks
636 #if Q3_DEBUG
637 if (0) // Further checks on view
638 return(kQ3ViewStatusError);
639 #endif
640
641
642
643 // Call the bottleneck
644 E3System_Bottleneck();
645
646
647
648 // Call our implementation
649 return(E3View_EndPicking(view));
650 }
651
652
653
654
655
656 //=============================================================================
657 // Q3View_GetCamera : Quesa API entry point.
658 //-----------------------------------------------------------------------------
659 TQ3Status
Q3View_GetCamera(TQ3ViewObject view,TQ3CameraObject * camera)660 Q3View_GetCamera(TQ3ViewObject view, TQ3CameraObject *camera)
661 {
662
663
664 // Release build checks
665 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
666 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(camera), kQ3Failure);
667
668
669
670 // Debug build checks
671 #if Q3_DEBUG
672 if (0) // Further checks on view
673 return(kQ3Failure);
674
675 if (0) // Further checks on camera
676 return(kQ3Failure);
677 #endif
678
679
680
681 // Call the bottleneck
682 E3System_Bottleneck();
683
684
685
686 // Call our implementation
687 return(E3View_GetCamera(view, camera));
688 }
689
690
691
692
693
694 //=============================================================================
695 // Q3View_SetCamera : Quesa API entry point.
696 //-----------------------------------------------------------------------------
697 TQ3Status
Q3View_SetCamera(TQ3ViewObject view,TQ3CameraObject camera)698 Q3View_SetCamera(TQ3ViewObject view, TQ3CameraObject camera)
699 {
700
701
702 // Release build checks
703 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
704 Q3_REQUIRE_OR_RESULT( E3Camera::IsOfMyClass ( camera ), kQ3Failure);
705
706
707
708 // Debug build checks
709 #if Q3_DEBUG
710 if (0) // Further checks on view
711 return(kQ3Failure);
712
713 if (0) // Further checks on camera
714 return(kQ3Failure);
715 #endif
716
717
718
719 // Call the bottleneck
720 E3System_Bottleneck();
721
722
723
724 // Call our implementation
725 return(E3View_SetCamera(view, camera));
726 }
727
728
729
730
731
732 //=============================================================================
733 // Q3View_SetLightGroup : Quesa API entry point.
734 //-----------------------------------------------------------------------------
735 TQ3Status
Q3View_SetLightGroup(TQ3ViewObject view,TQ3GroupObject lightGroup)736 Q3View_SetLightGroup(TQ3ViewObject view, TQ3GroupObject lightGroup)
737 {
738
739
740 // Release build checks
741 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
742
743 if (lightGroup != NULL)
744 Q3_REQUIRE_OR_RESULT( E3Group::IsOfMyClass (lightGroup ), kQ3Failure);
745
746
747
748 // Debug build checks
749 #if Q3_DEBUG
750 if (0) // Further checks on view
751 return(kQ3Failure);
752
753 if (0) // Further checks on lightGroup (may be NULL)
754 return(kQ3Failure);
755 #endif
756
757
758
759 // Call the bottleneck
760 E3System_Bottleneck();
761
762
763
764 // Call our implementation
765 return(E3View_SetLightGroup(view, lightGroup));
766 }
767
768
769
770
771
772 //=============================================================================
773 // Q3View_GetLightGroup : Quesa API entry point.
774 //-----------------------------------------------------------------------------
775 TQ3Status
Q3View_GetLightGroup(TQ3ViewObject view,TQ3GroupObject * lightGroup)776 Q3View_GetLightGroup(TQ3ViewObject view, TQ3GroupObject *lightGroup)
777 {
778
779
780 // Release build checks
781 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
782 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightGroup), kQ3Failure);
783
784
785
786 // Debug build checks
787 #if Q3_DEBUG
788 if (0) // Further checks on view
789 return(kQ3Failure);
790
791 if (0) // Further checks on lightGroup
792 return(kQ3Failure);
793 #endif
794
795
796
797 // Call the bottleneck
798 E3System_Bottleneck();
799
800
801
802 // Call our implementation
803 return(E3View_GetLightGroup(view, lightGroup));
804 }
805
806
807
808
809
810 //=============================================================================
811 // Q3View_AddLight : Quesa API entry point.
812 //-----------------------------------------------------------------------------
813 TQ3Status
Q3View_AddLight(TQ3ViewObject theView,TQ3ObjectType lightType,void * lightData)814 Q3View_AddLight(TQ3ViewObject theView, TQ3ObjectType lightType, void *lightData)
815 {
816
817
818 // Release build checks
819 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( theView ), kQ3Failure);
820 Q3_REQUIRE_OR_RESULT(lightType == kQ3ShapeTypeLight ||
821 lightType == kQ3LightTypeAmbient ||
822 lightType == kQ3LightTypeDirectional ||
823 lightType == kQ3LightTypePoint ||
824 lightType == kQ3LightTypeSpot, kQ3Failure);
825 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(lightData), kQ3Failure);
826
827
828
829 // Debug build checks
830 #if Q3_DEBUG
831 if (0) // Further checks on theView
832 return(kQ3Failure);
833
834 if (0) // Further checks on lightType
835 return(kQ3Failure);
836
837 if (0) // Further checks on lightData
838 return(kQ3Failure);
839 #endif
840
841
842
843 // Call the bottleneck
844 E3System_Bottleneck();
845
846
847
848 // Call our implementation
849 return(E3View_AddLight(theView, lightType, lightData));
850 }
851
852
853
854
855
856 //=============================================================================
857 // Q3View_SetIdleMethod : Quesa API entry point.
858 //-----------------------------------------------------------------------------
859 TQ3Status
Q3View_SetIdleMethod(TQ3ViewObject view,TQ3ViewIdleMethod idleMethod,const void * idleData)860 Q3View_SetIdleMethod(TQ3ViewObject view, TQ3ViewIdleMethod idleMethod, const void *idleData)
861 {
862
863
864 // Release build checks
865 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
866
867
868
869 // Debug build checks
870 #if Q3_DEBUG
871 if (0) // Further checks on view
872 return(kQ3Failure);
873
874 if (0) // Further checks on idleMethod
875 return(kQ3Failure);
876 #endif
877
878
879
880 // Call the bottleneck
881 E3System_Bottleneck();
882
883
884
885 // Call our implementation
886 return(E3View_SetIdleMethod(view, idleMethod, idleData));
887 }
888
889
890
891
892
893 //=============================================================================
894 // Q3View_SetIdleProgressMethod : Quesa API entry point.
895 //-----------------------------------------------------------------------------
896 TQ3Status
Q3View_SetIdleProgressMethod(TQ3ViewObject view,TQ3ViewIdleProgressMethod idleMethod,const void * idleData)897 Q3View_SetIdleProgressMethod(TQ3ViewObject view, TQ3ViewIdleProgressMethod idleMethod, const void *idleData)
898 {
899
900
901 // Release build checks
902 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
903
904
905
906 // Debug build checks
907 #if Q3_DEBUG
908 if (0) // Further checks on view
909 return(kQ3Failure);
910
911 if (0) // Further checks on idleMethod
912 return(kQ3Failure);
913 #endif
914
915
916
917 // Call the bottleneck
918 E3System_Bottleneck();
919
920
921
922 // Call our implementation
923 return(E3View_SetIdleProgressMethod(view, idleMethod, idleData));
924 }
925
926
927
928
929
930 //=============================================================================
931 // Q3View_SetEndFrameMethod : Quesa API entry point.
932 //-----------------------------------------------------------------------------
933 TQ3Status
Q3View_SetEndFrameMethod(TQ3ViewObject view,TQ3ViewEndFrameMethod endFrame,void * endFrameData)934 Q3View_SetEndFrameMethod(TQ3ViewObject view, TQ3ViewEndFrameMethod endFrame, void *endFrameData)
935 {
936
937
938 // Release build checks
939 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
940
941
942
943 // Debug build checks
944 #if Q3_DEBUG
945 if (0) // Further checks on view
946 return(kQ3Failure);
947
948 if (0) // Further checks on endFrame
949 return(kQ3Failure);
950 #endif
951
952
953
954 // Call the bottleneck
955 E3System_Bottleneck();
956
957
958
959 // Call our implementation
960 return(E3View_SetEndFrameMethod(view, endFrame, endFrameData));
961 }
962
963
964
965 #pragma mark -
966
967 //=============================================================================
968 // Q3Push_Submit : Quesa API entry point.
969 //-----------------------------------------------------------------------------
970 TQ3Status
Q3Push_Submit(TQ3ViewObject view)971 Q3Push_Submit(TQ3ViewObject view)
972 {
973
974
975 // Release build checks
976 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
977
978
979
980 // Debug build checks
981 #if Q3_DEBUG
982 if (0) // Further checks on view
983 return(kQ3Failure);
984 #endif
985
986
987
988 // Call the bottleneck
989 E3System_Bottleneck();
990
991
992
993 // Call our implementation
994 return(E3Push_Submit(view));
995 }
996
997
998
999
1000
1001 //=============================================================================
1002 // Q3Pop_Submit : Quesa API entry point.
1003 //-----------------------------------------------------------------------------
1004 TQ3Status
Q3Pop_Submit(TQ3ViewObject view)1005 Q3Pop_Submit(TQ3ViewObject view)
1006 {
1007
1008
1009 // Release build checks
1010 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1011
1012
1013
1014 // Debug build checks
1015 #if Q3_DEBUG
1016 if (0) // Further checks on view
1017 return(kQ3Failure);
1018 #endif
1019
1020
1021
1022 // Call the bottleneck
1023 E3System_Bottleneck();
1024
1025
1026
1027 // Call our implementation
1028 return(E3Pop_Submit(view));
1029 }
1030
1031
1032
1033
1034
1035 //=============================================================================
1036 // Q3Push_New : Quesa API entry point.
1037 //-----------------------------------------------------------------------------
1038 TQ3StateOperatorObject
Q3Push_New(void)1039 Q3Push_New(void)
1040 {
1041
1042
1043 // Call the bottleneck
1044 E3System_Bottleneck();
1045
1046
1047
1048 // Call our implementation
1049 return(E3Push_New());
1050 }
1051
1052
1053
1054
1055
1056 //=============================================================================
1057 // Q3Pop_New : Quesa API entry point.
1058 //-----------------------------------------------------------------------------
1059 TQ3StateOperatorObject
Q3Pop_New(void)1060 Q3Pop_New(void)
1061 {
1062
1063
1064 // Call the bottleneck
1065 E3System_Bottleneck();
1066
1067
1068
1069 // Call our implementation
1070 return(E3Pop_New());
1071 }
1072
1073
1074
1075
1076
1077 //=============================================================================
1078 // Q3StateOperator_Submit : Quesa API entry point.
1079 //-----------------------------------------------------------------------------
1080 TQ3Status
Q3StateOperator_Submit(TQ3StateOperatorObject stateOperator,TQ3ViewObject view)1081 Q3StateOperator_Submit(TQ3StateOperatorObject stateOperator, TQ3ViewObject view)
1082 {
1083
1084
1085 // Release build checks
1086 Q3_REQUIRE_OR_RESULT(Q3Object_IsType(stateOperator, (kQ3ShapeTypeStateOperator)), kQ3Failure);
1087 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1088
1089
1090
1091 // Debug build checks
1092 #if Q3_DEBUG
1093 if (0) // Further checks on stateOperator
1094 return(kQ3Failure);
1095
1096 if (0) // Further checks on view
1097 return(kQ3Failure);
1098 #endif
1099
1100
1101
1102 // Call the bottleneck
1103 E3System_Bottleneck();
1104
1105
1106
1107 // Call our implementation
1108 return(E3StateOperator_Submit(stateOperator, view));
1109 }
1110
1111
1112 #pragma mark -
1113
1114
1115 //=============================================================================
1116 // Q3View_IsBoundingBoxVisible : Quesa API entry point.
1117 //-----------------------------------------------------------------------------
1118 TQ3Boolean
Q3View_IsBoundingBoxVisible(TQ3ViewObject view,const TQ3BoundingBox * bbox)1119 Q3View_IsBoundingBoxVisible(TQ3ViewObject view, const TQ3BoundingBox *bbox)
1120 {
1121
1122
1123 // Release build checks
1124 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3False);
1125 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(bbox), kQ3False);
1126
1127
1128
1129 // Debug build checks
1130 #if Q3_DEBUG
1131 if (0) // Further checks on view
1132 return(kQ3False);
1133
1134 if (0) // Further checks on bbox
1135 return(kQ3False);
1136 #endif
1137
1138
1139
1140 // Call the bottleneck
1141 E3System_Bottleneck();
1142
1143
1144
1145 // Call our implementation
1146 return(E3View_IsBoundingBoxVisible(view, bbox));
1147 }
1148
1149
1150
1151
1152
1153 //=============================================================================
1154 // Q3View_AllowAllGroupCulling : Quesa API entry point.
1155 //-----------------------------------------------------------------------------
1156 TQ3Status
Q3View_AllowAllGroupCulling(TQ3ViewObject view,TQ3Boolean allowCulling)1157 Q3View_AllowAllGroupCulling(TQ3ViewObject view, TQ3Boolean allowCulling)
1158 {
1159
1160
1161 // Release build checks
1162 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1163
1164
1165
1166 // Debug build checks
1167 #if Q3_DEBUG
1168 if (0) // Further checks on view
1169 return(kQ3Failure);
1170
1171 if (0) // Further checks on allowCulling
1172 return(kQ3Failure);
1173 #endif
1174
1175
1176
1177 // Call the bottleneck
1178 E3System_Bottleneck();
1179
1180
1181
1182 // Call our implementation
1183 return(E3View_AllowAllGroupCulling(view, allowCulling));
1184 }
1185
1186
1187
1188
1189
1190 //=============================================================================
1191 // Q3View_TransformLocalToWorld : Quesa API entry point.
1192 //-----------------------------------------------------------------------------
1193 TQ3Status
Q3View_TransformLocalToWorld(TQ3ViewObject theView,const TQ3Point3D * localPoint,TQ3Point3D * worldPoint)1194 Q3View_TransformLocalToWorld(TQ3ViewObject theView, const TQ3Point3D *localPoint, TQ3Point3D *worldPoint)
1195 {
1196
1197
1198 // Release build checks
1199 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( theView ), kQ3Failure);
1200 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(localPoint), kQ3Failure);
1201 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(worldPoint), kQ3Failure);
1202
1203
1204
1205 // Debug build checks
1206 #if Q3_DEBUG
1207 if (0) // Further checks on theView
1208 return(kQ3Failure);
1209
1210 if (0) // Further checks on localPoint
1211 return(kQ3Failure);
1212
1213 if (0) // Further checks on worldPoint
1214 return(kQ3Failure);
1215 #endif
1216
1217
1218
1219 // Call the bottleneck
1220 E3System_Bottleneck();
1221
1222
1223
1224 // Call our implementation
1225 return(E3View_TransformLocalToWorld(theView, localPoint, worldPoint));
1226 }
1227
1228
1229
1230
1231
1232 //=============================================================================
1233 // Q3View_TransformLocalToWindow : Quesa API entry point.
1234 //-----------------------------------------------------------------------------
1235 TQ3Status
Q3View_TransformLocalToWindow(TQ3ViewObject theView,const TQ3Point3D * localPoint,TQ3Point2D * windowPoint)1236 Q3View_TransformLocalToWindow(TQ3ViewObject theView, const TQ3Point3D *localPoint, TQ3Point2D *windowPoint)
1237 {
1238
1239
1240 // Release build checks
1241 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( theView ), kQ3Failure);
1242 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(localPoint), kQ3Failure);
1243 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(windowPoint), kQ3Failure);
1244
1245
1246
1247 // Debug build checks
1248 #if Q3_DEBUG
1249 if (0) // Further checks on theView
1250 return(kQ3Failure);
1251
1252 if (0) // Further checks on localPoint
1253 return(kQ3Failure);
1254
1255 if (0) // Further checks on windowPoint
1256 return(kQ3Failure);
1257 #endif
1258
1259
1260
1261 // Call the bottleneck
1262 E3System_Bottleneck();
1263
1264
1265
1266 // Call our implementation
1267 return(E3View_TransformLocalToWindow(theView, localPoint, windowPoint));
1268 }
1269
1270
1271
1272
1273
1274 //=============================================================================
1275 // Q3View_TransformWorldToWindow : Quesa API entry point.
1276 //-----------------------------------------------------------------------------
1277 TQ3Status
Q3View_TransformWorldToWindow(TQ3ViewObject theView,const TQ3Point3D * worldPoint,TQ3Point2D * windowPoint)1278 Q3View_TransformWorldToWindow(TQ3ViewObject theView, const TQ3Point3D *worldPoint, TQ3Point2D *windowPoint)
1279 {
1280
1281
1282 // Release build checks
1283 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( theView ), kQ3Failure);
1284 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(worldPoint), kQ3Failure);
1285 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(windowPoint), kQ3Failure);
1286
1287
1288
1289 // Debug build checks
1290 #if Q3_DEBUG
1291 if (0) // Further checks on theView
1292 return(kQ3Failure);
1293
1294 if (0) // Further checks on worldPoint
1295 return(kQ3Failure);
1296
1297 if (0) // Further checks on windowPoint
1298 return(kQ3Failure);
1299 #endif
1300
1301
1302
1303 // Call the bottleneck
1304 E3System_Bottleneck();
1305
1306
1307
1308 // Call our implementation
1309 return(E3View_TransformWorldToWindow(theView, worldPoint, windowPoint));
1310 }
1311
1312
1313
1314
1315
1316 //=============================================================================
1317 // Q3View_SetDrawContext : Quesa API entry point.
1318 //-----------------------------------------------------------------------------
1319 TQ3Status
Q3View_SetDrawContext(TQ3ViewObject view,TQ3DrawContextObject drawContext)1320 Q3View_SetDrawContext(TQ3ViewObject view, TQ3DrawContextObject drawContext)
1321 {
1322
1323
1324 // Release build checks
1325 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1326 Q3_REQUIRE_OR_RESULT( E3DrawContext_IsOfMyClass ( drawContext ), kQ3Failure);
1327
1328
1329
1330 // Debug build checks
1331 #if Q3_DEBUG
1332 if (0) // Further checks on view
1333 return(kQ3Failure);
1334
1335 if (0) // Further checks on drawContext
1336 return(kQ3Failure);
1337 #endif
1338
1339
1340
1341 // Call the bottleneck
1342 E3System_Bottleneck();
1343
1344
1345
1346 // Call our implementation
1347 return(E3View_SetDrawContext(view, drawContext));
1348 }
1349
1350
1351
1352
1353
1354 //=============================================================================
1355 // Q3View_GetDrawContext : Quesa API entry point.
1356 //-----------------------------------------------------------------------------
1357 TQ3Status
Q3View_GetDrawContext(TQ3ViewObject view,TQ3DrawContextObject * drawContext)1358 Q3View_GetDrawContext(TQ3ViewObject view, TQ3DrawContextObject *drawContext)
1359 {
1360
1361
1362 // Release build checks
1363 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1364 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(drawContext), kQ3Failure);
1365
1366
1367
1368 // Debug build checks
1369 #if Q3_DEBUG
1370 if (0) // Further checks on view
1371 return(kQ3Failure);
1372
1373 if (0) // Further checks on drawContext
1374 return(kQ3Failure);
1375 #endif
1376
1377
1378
1379 // Call the bottleneck
1380 E3System_Bottleneck();
1381
1382
1383
1384 // Call our implementation
1385 return(E3View_GetDrawContext(view, drawContext));
1386 }
1387
1388
1389
1390
1391
1392 //=============================================================================
1393 // Q3View_GetLocalToWorldMatrixState : Quesa API entry point.
1394 //-----------------------------------------------------------------------------
1395 TQ3Status
Q3View_GetLocalToWorldMatrixState(TQ3ViewObject view,TQ3Matrix4x4 * matrix)1396 Q3View_GetLocalToWorldMatrixState(TQ3ViewObject view, TQ3Matrix4x4 *matrix)
1397 {
1398
1399
1400 // Release build checks
1401 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1402 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(matrix), kQ3Failure);
1403
1404
1405
1406 // Debug build checks
1407 #if Q3_DEBUG
1408 if (0) // Further checks on view
1409 return(kQ3Failure);
1410
1411 if (0) // Further checks on matrix
1412 return(kQ3Failure);
1413 #endif
1414
1415
1416
1417 // Call the bottleneck
1418 E3System_Bottleneck();
1419
1420
1421
1422 // Call our implementation
1423 return(E3View_GetLocalToWorldMatrixState(view, matrix));
1424 }
1425
1426
1427
1428
1429
1430 //=============================================================================
1431 // Q3View_GetWorldToFrustumMatrixState : Quesa API entry point.
1432 //-----------------------------------------------------------------------------
1433 TQ3Status
Q3View_GetWorldToFrustumMatrixState(TQ3ViewObject view,TQ3Matrix4x4 * matrix)1434 Q3View_GetWorldToFrustumMatrixState(TQ3ViewObject view, TQ3Matrix4x4 *matrix)
1435 {
1436
1437
1438 // Release build checks
1439 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1440 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(matrix), kQ3Failure);
1441
1442
1443
1444 // Debug build checks
1445 #if Q3_DEBUG
1446 if (0) // Further checks on view
1447 return(kQ3Failure);
1448
1449 if (0) // Further checks on matrix
1450 return(kQ3Failure);
1451 #endif
1452
1453
1454
1455 // Call the bottleneck
1456 E3System_Bottleneck();
1457
1458
1459
1460 // Call our implementation
1461 return(E3View_GetWorldToFrustumMatrixState(view, matrix));
1462 }
1463
1464
1465
1466
1467
1468 //=============================================================================
1469 // Q3View_GetFrustumToWindowMatrixState : Quesa API entry point.
1470 //-----------------------------------------------------------------------------
1471 TQ3Status
Q3View_GetFrustumToWindowMatrixState(TQ3ViewObject view,TQ3Matrix4x4 * matrix)1472 Q3View_GetFrustumToWindowMatrixState(TQ3ViewObject view, TQ3Matrix4x4 *matrix)
1473 {
1474
1475
1476 // Release build checks
1477 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1478 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(matrix), kQ3Failure);
1479
1480
1481
1482 // Debug build checks
1483 #if Q3_DEBUG
1484 if (0) // Further checks on view
1485 return(kQ3Failure);
1486
1487 if (0) // Further checks on matrix
1488 return(kQ3Failure);
1489 #endif
1490
1491
1492
1493 // Call the bottleneck
1494 E3System_Bottleneck();
1495
1496
1497
1498 // Call our implementation
1499 return(E3View_GetFrustumToWindowMatrixState(view, matrix));
1500 }
1501
1502
1503
1504
1505
1506 //=============================================================================
1507 // Q3View_GetBackfacingStyleState : Quesa API entry point.
1508 //-----------------------------------------------------------------------------
1509 TQ3Status
Q3View_GetBackfacingStyleState(TQ3ViewObject view,TQ3BackfacingStyle * backfacingStyle)1510 Q3View_GetBackfacingStyleState(TQ3ViewObject view, TQ3BackfacingStyle *backfacingStyle)
1511 {
1512
1513
1514 // Release build checks
1515 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1516 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(backfacingStyle), kQ3Failure);
1517
1518
1519
1520 // Debug build checks
1521 #if Q3_DEBUG
1522 if (0) // Further checks on view
1523 return(kQ3Failure);
1524
1525 if (0) // Further checks on backfacingStyle
1526 return(kQ3Failure);
1527 #endif
1528
1529
1530
1531 // Call the bottleneck
1532 E3System_Bottleneck();
1533
1534
1535
1536 // Call our implementation
1537 return(E3View_GetBackfacingStyleState(view, backfacingStyle));
1538 }
1539
1540
1541
1542
1543
1544 //=============================================================================
1545 // Q3View_GetInterpolationStyleState : Quesa API entry point.
1546 //-----------------------------------------------------------------------------
1547 TQ3Status
Q3View_GetInterpolationStyleState(TQ3ViewObject view,TQ3InterpolationStyle * interpolationType)1548 Q3View_GetInterpolationStyleState(TQ3ViewObject view, TQ3InterpolationStyle *interpolationType)
1549 {
1550
1551
1552 // Release build checks
1553 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1554 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(interpolationType), kQ3Failure);
1555
1556
1557
1558 // Debug build checks
1559 #if Q3_DEBUG
1560 if (0) // Further checks on view
1561 return(kQ3Failure);
1562
1563 if (0) // Further checks on interpolationType
1564 return(kQ3Failure);
1565 #endif
1566
1567
1568
1569 // Call the bottleneck
1570 E3System_Bottleneck();
1571
1572
1573
1574 // Call our implementation
1575 return(E3View_GetInterpolationStyleState(view, interpolationType));
1576 }
1577
1578
1579
1580
1581
1582 //=============================================================================
1583 // Q3View_GetFillStyleState : Quesa API entry point.
1584 //-----------------------------------------------------------------------------
1585 TQ3Status
Q3View_GetFillStyleState(TQ3ViewObject view,TQ3FillStyle * fillStyle)1586 Q3View_GetFillStyleState(TQ3ViewObject view, TQ3FillStyle *fillStyle)
1587 {
1588
1589
1590 // Release build checks
1591 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1592 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(fillStyle), kQ3Failure);
1593
1594
1595
1596 // Debug build checks
1597 #if Q3_DEBUG
1598 if (0) // Further checks on view
1599 return(kQ3Failure);
1600
1601 if (0) // Further checks on fillStyle
1602 return(kQ3Failure);
1603 #endif
1604
1605
1606
1607 // Call the bottleneck
1608 E3System_Bottleneck();
1609
1610
1611
1612 // Call our implementation
1613 return(E3View_GetFillStyleState(view, fillStyle));
1614 }
1615
1616
1617
1618
1619
1620 //=============================================================================
1621 // Q3View_GetHighlightStyleState : Quesa API entry point.
1622 //-----------------------------------------------------------------------------
1623 TQ3Status
Q3View_GetHighlightStyleState(TQ3ViewObject view,TQ3AttributeSet * highlightStyle)1624 Q3View_GetHighlightStyleState(TQ3ViewObject view, TQ3AttributeSet *highlightStyle)
1625 {
1626
1627
1628 // Release build checks
1629 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1630 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(highlightStyle), kQ3Failure);
1631
1632
1633
1634 // Debug build checks
1635 #if Q3_DEBUG
1636 if (0) // Further checks on view
1637 return(kQ3Failure);
1638
1639 if (0) // Further checks on highlightStyle
1640 return(kQ3Failure);
1641 #endif
1642
1643
1644
1645 // Call the bottleneck
1646 E3System_Bottleneck();
1647
1648
1649
1650 // Call our implementation
1651 return(E3View_GetHighlightStyleState(view, highlightStyle));
1652 }
1653
1654
1655
1656
1657
1658 //=============================================================================
1659 // Q3View_GetSubdivisionStyleState : Quesa API entry point.
1660 //-----------------------------------------------------------------------------
1661 TQ3Status
Q3View_GetSubdivisionStyleState(TQ3ViewObject view,TQ3SubdivisionStyleData * subdivisionStyle)1662 Q3View_GetSubdivisionStyleState(TQ3ViewObject view, TQ3SubdivisionStyleData *subdivisionStyle)
1663 {
1664
1665
1666 // Release build checks
1667 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1668 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(subdivisionStyle), kQ3Failure);
1669
1670
1671
1672 // Debug build checks
1673 #if Q3_DEBUG
1674 if (0) // Further checks on view
1675 return(kQ3Failure);
1676
1677 if (0) // Further checks on subdivisionStyle
1678 return(kQ3Failure);
1679 #endif
1680
1681
1682
1683 // Call the bottleneck
1684 E3System_Bottleneck();
1685
1686
1687
1688 // Call our implementation
1689 return(E3View_GetSubdivisionStyleState(view, subdivisionStyle));
1690 }
1691
1692
1693
1694
1695
1696 //=============================================================================
1697 // Q3View_GetOrientationStyleState : Quesa API entry point.
1698 //-----------------------------------------------------------------------------
1699 TQ3Status
Q3View_GetOrientationStyleState(TQ3ViewObject view,TQ3OrientationStyle * fontFacingDirectionStyle)1700 Q3View_GetOrientationStyleState(TQ3ViewObject view, TQ3OrientationStyle *fontFacingDirectionStyle)
1701 {
1702
1703
1704 // Release build checks
1705 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1706 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(fontFacingDirectionStyle), kQ3Failure);
1707
1708
1709
1710 // Debug build checks
1711 #if Q3_DEBUG
1712 if (0) // Further checks on view
1713 return(kQ3Failure);
1714
1715 if (0) // Further checks on fontFacingDirectionStyle
1716 return(kQ3Failure);
1717 #endif
1718
1719
1720
1721 // Call the bottleneck
1722 E3System_Bottleneck();
1723
1724
1725
1726 // Call our implementation
1727 return(E3View_GetOrientationStyleState(view, fontFacingDirectionStyle));
1728 }
1729
1730
1731
1732
1733
1734 //=============================================================================
1735 // Q3View_GetCastShadowsStyleState : Quesa API entry point.
1736 //-----------------------------------------------------------------------------
1737 TQ3Status
Q3View_GetCastShadowsStyleState(TQ3ViewObject view,TQ3Boolean * castShadows)1738 Q3View_GetCastShadowsStyleState(TQ3ViewObject view, TQ3Boolean *castShadows)
1739 {
1740
1741
1742 // Release build checks
1743 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1744 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(castShadows), kQ3Failure);
1745
1746
1747
1748 // Debug build checks
1749 #if Q3_DEBUG
1750 if (0) // Further checks on view
1751 return(kQ3Failure);
1752
1753 if (0) // Further checks on castShadows
1754 return(kQ3Failure);
1755 #endif
1756
1757
1758
1759 // Call the bottleneck
1760 E3System_Bottleneck();
1761
1762
1763
1764 // Call our implementation
1765 return(E3View_GetCastShadowsStyleState(view, castShadows));
1766 }
1767
1768
1769
1770
1771
1772 //=============================================================================
1773 // Q3View_GetReceiveShadowsStyleState : Quesa API entry point.
1774 //-----------------------------------------------------------------------------
1775 TQ3Status
Q3View_GetReceiveShadowsStyleState(TQ3ViewObject view,TQ3Boolean * receiveShadows)1776 Q3View_GetReceiveShadowsStyleState(TQ3ViewObject view, TQ3Boolean *receiveShadows)
1777 {
1778
1779
1780 // Release build checks
1781 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1782 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(receiveShadows), kQ3Failure);
1783
1784
1785
1786 // Debug build checks
1787 #if Q3_DEBUG
1788 if (0) // Further checks on view
1789 return(kQ3Failure);
1790
1791 if (0) // Further checks on receiveShadows
1792 return(kQ3Failure);
1793 #endif
1794
1795
1796
1797 // Call the bottleneck
1798 E3System_Bottleneck();
1799
1800
1801
1802 // Call our implementation
1803 return(E3View_GetReceiveShadowsStyleState(view, receiveShadows));
1804 }
1805
1806
1807
1808
1809
1810 //=============================================================================
1811 // Q3View_GetPickIDStyleState : Quesa API entry point.
1812 //-----------------------------------------------------------------------------
1813 TQ3Status
Q3View_GetPickIDStyleState(TQ3ViewObject view,TQ3Uns32 * pickIDStyle)1814 Q3View_GetPickIDStyleState(TQ3ViewObject view, TQ3Uns32 *pickIDStyle)
1815 {
1816
1817
1818 // Release build checks
1819 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1820 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pickIDStyle), kQ3Failure);
1821
1822
1823
1824 // Debug build checks
1825 #if Q3_DEBUG
1826 if (0) // Further checks on view
1827 return(kQ3Failure);
1828
1829 if (0) // Further checks on pickIDStyle
1830 return(kQ3Failure);
1831 #endif
1832
1833
1834
1835 // Call the bottleneck
1836 E3System_Bottleneck();
1837
1838
1839
1840 // Call our implementation
1841 return(E3View_GetPickIDStyleState(view, pickIDStyle));
1842 }
1843
1844
1845
1846
1847
1848 //=============================================================================
1849 // Q3View_GetPickPartsStyleState : Quesa API entry point.
1850 //-----------------------------------------------------------------------------
1851 TQ3Status
Q3View_GetPickPartsStyleState(TQ3ViewObject view,TQ3PickParts * pickPartsStyle)1852 Q3View_GetPickPartsStyleState(TQ3ViewObject view, TQ3PickParts *pickPartsStyle)
1853 {
1854
1855
1856 // Release build checks
1857 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1858 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pickPartsStyle), kQ3Failure);
1859
1860
1861
1862 // Debug build checks
1863 #if Q3_DEBUG
1864 if (0) // Further checks on view
1865 return(kQ3Failure);
1866
1867 if (0) // Further checks on pickPartsStyle
1868 return(kQ3Failure);
1869 #endif
1870
1871
1872
1873 // Call the bottleneck
1874 E3System_Bottleneck();
1875
1876
1877
1878 // Call our implementation
1879 return(E3View_GetPickPartsStyleState(view, pickPartsStyle));
1880 }
1881
1882
1883
1884
1885
1886 //=============================================================================
1887 // Q3View_GetAntiAliasStyleState : Quesa API entry point.
1888 //-----------------------------------------------------------------------------
1889 TQ3Status
Q3View_GetAntiAliasStyleState(TQ3ViewObject view,TQ3AntiAliasStyleData * antiAliasData)1890 Q3View_GetAntiAliasStyleState(TQ3ViewObject view, TQ3AntiAliasStyleData *antiAliasData)
1891 {
1892
1893
1894 // Release build checks
1895 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1896 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(antiAliasData), kQ3Failure);
1897
1898
1899
1900 // Debug build checks
1901 #if Q3_DEBUG
1902 if (0) // Further checks on view
1903 return(kQ3Failure);
1904
1905 if (0) // Further checks on antiAliasData
1906 return(kQ3Failure);
1907 #endif
1908
1909
1910
1911 // Call the bottleneck
1912 E3System_Bottleneck();
1913
1914
1915
1916 // Call our implementation
1917 return(E3View_GetAntiAliasStyleState(view, antiAliasData));
1918 }
1919
1920
1921
1922
1923
1924 //=============================================================================
1925 // Q3View_GetFogStyleState : Quesa API entry point.
1926 //-----------------------------------------------------------------------------
1927 TQ3Status
Q3View_GetFogStyleState(TQ3ViewObject view,TQ3FogStyleData * fogData)1928 Q3View_GetFogStyleState(TQ3ViewObject view, TQ3FogStyleData *fogData)
1929 {
1930
1931
1932 // Release build checks
1933 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1934 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(fogData), kQ3Failure);
1935
1936
1937
1938 // Debug build checks
1939 #if Q3_DEBUG
1940 if (0) // Further checks on view
1941 return(kQ3Failure);
1942
1943 if (0) // Further checks on fogData
1944 return(kQ3Failure);
1945 #endif
1946
1947
1948
1949 // Call the bottleneck
1950 E3System_Bottleneck();
1951
1952
1953
1954 // Call our implementation
1955 return(E3View_GetFogStyleState(view, fogData));
1956 }
1957
1958
1959
1960
1961
1962 //=============================================================================
1963 // Q3View_GetDefaultAttributeSet : Quesa API entry point.
1964 //-----------------------------------------------------------------------------
1965 TQ3Status
Q3View_GetDefaultAttributeSet(TQ3ViewObject view,TQ3AttributeSet * attributeSet)1966 Q3View_GetDefaultAttributeSet(TQ3ViewObject view, TQ3AttributeSet *attributeSet)
1967 {
1968
1969
1970 // Release build checks
1971 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
1972 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(attributeSet), kQ3Failure);
1973
1974
1975
1976 // Debug build checks
1977 #if Q3_DEBUG
1978 if (0) // Further checks on view
1979 return(kQ3Failure);
1980
1981 if (0) // Further checks on attributeSet
1982 return(kQ3Failure);
1983 #endif
1984
1985
1986
1987 // Call the bottleneck
1988 E3System_Bottleneck();
1989
1990
1991
1992 // Call our implementation
1993 return(E3View_GetDefaultAttributeSet(view, attributeSet));
1994 }
1995
1996
1997
1998
1999
2000 //=============================================================================
2001 // Q3View_SetDefaultAttributeSet : Quesa API entry point.
2002 //-----------------------------------------------------------------------------
2003 TQ3Status
Q3View_SetDefaultAttributeSet(TQ3ViewObject view,TQ3AttributeSet attributeSet)2004 Q3View_SetDefaultAttributeSet(TQ3ViewObject view, TQ3AttributeSet attributeSet)
2005 {
2006
2007
2008 // Release build checks
2009 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
2010
2011
2012
2013 // Debug build checks
2014 #if Q3_DEBUG
2015 if (0) // Further checks on view
2016 return(kQ3Failure);
2017
2018 if (0) // Further checks on attributeSet
2019 return(kQ3Failure);
2020 #endif
2021
2022
2023
2024 // Call the bottleneck
2025 E3System_Bottleneck();
2026
2027
2028
2029 // Call our implementation
2030 return(E3View_SetDefaultAttributeSet(view, attributeSet));
2031 }
2032
2033
2034
2035
2036
2037 //=============================================================================
2038 // Q3View_GetAttributeSetState : Quesa API entry point.
2039 //-----------------------------------------------------------------------------
2040 TQ3Status
Q3View_GetAttributeSetState(TQ3ViewObject view,TQ3AttributeSet * attributeSet)2041 Q3View_GetAttributeSetState(TQ3ViewObject view, TQ3AttributeSet *attributeSet)
2042 {
2043
2044
2045 // Release build checks
2046 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
2047 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(attributeSet), kQ3Failure);
2048
2049
2050
2051 // Debug build checks
2052 #if Q3_DEBUG
2053 if (0) // Further checks on view
2054 return(kQ3Failure);
2055
2056 if (0) // Further checks on attributeSet
2057 return(kQ3Failure);
2058 #endif
2059
2060
2061
2062 // Call the bottleneck
2063 E3System_Bottleneck();
2064
2065
2066
2067 // Call our implementation
2068 return(E3View_GetAttributeSetState(view, attributeSet));
2069 }
2070
2071
2072
2073
2074
2075 //=============================================================================
2076 // Q3View_GetAttributeState : Quesa API entry point.
2077 //-----------------------------------------------------------------------------
2078 TQ3Status
Q3View_GetAttributeState(TQ3ViewObject view,TQ3AttributeType attributeType,void * data)2079 Q3View_GetAttributeState(TQ3ViewObject view, TQ3AttributeType attributeType, void *data)
2080 {
2081
2082
2083 // Release build checks
2084 Q3_REQUIRE_OR_RESULT( E3View_IsOfMyClass ( view ), kQ3Failure);
2085 Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
2086
2087
2088
2089 // Debug build checks
2090 #if Q3_DEBUG
2091 if (0) // Further checks on view
2092 return(kQ3Failure);
2093
2094 if (0) // Further checks on attributeType
2095 return(kQ3Failure);
2096
2097 if (0) // Further checks on data
2098 return(kQ3Failure);
2099 #endif
2100
2101
2102
2103 // Call the bottleneck
2104 E3System_Bottleneck();
2105
2106
2107
2108 // Call our implementation
2109 return(E3View_GetAttributeState(view, attributeType, data));
2110 }
2111
2112
2113
2114
2115
2116