1 /*  NAME:
2         QD3DPick.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 "E3Pick.h"
49 
50 
51 
52 
53 
54 //=============================================================================
55 //      Internal constants
56 //-----------------------------------------------------------------------------
57 // Internal constants go here
58 
59 
60 
61 
62 
63 //=============================================================================
64 //      Internal types
65 //-----------------------------------------------------------------------------
66 // Internal types go here
67 
68 
69 
70 
71 
72 //=============================================================================
73 //      Internal macros
74 //-----------------------------------------------------------------------------
75 // Internal macros go here
76 
77 
78 
79 
80 
81 //=============================================================================
82 //      Public functions
83 //-----------------------------------------------------------------------------
84 //      Q3Pick_GetType : Quesa API entry point.
85 //-----------------------------------------------------------------------------
86 #pragma mark -
87 TQ3ObjectType
Q3Pick_GetType(TQ3PickObject pick)88 Q3Pick_GetType(TQ3PickObject pick)
89 {
90 
91 
92 	// Release build checks
93 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3ObjectTypeInvalid);
94 
95 
96 
97 	// Debug build checks
98 #if Q3_DEBUG
99 	if (0) // Further checks on pick
100 		return(kQ3ObjectTypeInvalid);
101 #endif
102 
103 
104 
105 	// Call the bottleneck
106 	E3System_Bottleneck();
107 
108 
109 
110 	// Call our implementation
111 	return(E3Pick_GetType(pick));
112 }
113 
114 
115 
116 
117 
118 //=============================================================================
119 //      Q3Pick_GetData : Quesa API entry point.
120 //-----------------------------------------------------------------------------
121 TQ3Status
Q3Pick_GetData(TQ3PickObject pick,TQ3PickData * data)122 Q3Pick_GetData(TQ3PickObject pick, TQ3PickData *data)
123 {
124 
125 
126 	// Release build checks
127 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
128 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
129 
130 
131 
132 	// Debug build checks
133 #if Q3_DEBUG
134 	if (0) // Further checks on pick
135 		return(kQ3Failure);
136 
137 	if (0) // Further checks on data
138 		return(kQ3Failure);
139 #endif
140 
141 
142 
143 	// Call the bottleneck
144 	E3System_Bottleneck();
145 
146 
147 
148 	// Call our implementation
149 	return(E3Pick_GetData(pick, data));
150 }
151 
152 
153 
154 
155 
156 //=============================================================================
157 //      Q3Pick_SetData : Quesa API entry point.
158 //-----------------------------------------------------------------------------
159 TQ3Status
Q3Pick_SetData(TQ3PickObject pick,const TQ3PickData * data)160 Q3Pick_SetData(TQ3PickObject pick, const TQ3PickData *data)
161 {
162 
163 
164 	// Release build checks
165 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
166 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
167 
168 
169 
170 	// Debug build checks
171 #if Q3_DEBUG
172 	if (0) // Further checks on pick
173 		return(kQ3Failure);
174 
175 	if (0) // Further checks on data
176 		return(kQ3Failure);
177 #endif
178 
179 
180 
181 	// Call the bottleneck
182 	E3System_Bottleneck();
183 
184 
185 
186 	// Call our implementation
187 	return(E3Pick_SetData(pick, data));
188 }
189 
190 
191 
192 
193 
194 //=============================================================================
195 //      Q3Pick_GetVertexTolerance : Quesa API entry point.
196 //-----------------------------------------------------------------------------
197 TQ3Status
Q3Pick_GetVertexTolerance(TQ3PickObject pick,float * vertexTolerance)198 Q3Pick_GetVertexTolerance(TQ3PickObject pick, float *vertexTolerance)
199 {
200 
201 
202 	// Release build checks
203 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
204 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(vertexTolerance), kQ3Failure);
205 
206 
207 
208 	// Debug build checks
209 #if Q3_DEBUG
210 	if (0) // Further checks on pick
211 		return(kQ3Failure);
212 
213 	if (0) // Further checks on vertexTolerance
214 		return(kQ3Failure);
215 #endif
216 
217 
218 
219 	// Call the bottleneck
220 	E3System_Bottleneck();
221 
222 
223 
224 	// Call our implementation
225 	return(E3Pick_GetVertexTolerance(pick, vertexTolerance));
226 }
227 
228 
229 
230 
231 
232 //=============================================================================
233 //      Q3Pick_GetEdgeTolerance : Quesa API entry point.
234 //-----------------------------------------------------------------------------
235 TQ3Status
Q3Pick_GetEdgeTolerance(TQ3PickObject pick,float * edgeTolerance)236 Q3Pick_GetEdgeTolerance(TQ3PickObject pick, float *edgeTolerance)
237 {
238 
239 
240 	// Release build checks
241 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
242 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(edgeTolerance), kQ3Failure);
243 
244 
245 
246 	// Debug build checks
247 #if Q3_DEBUG
248 	if (0) // Further checks on pick
249 		return(kQ3Failure);
250 
251 	if (0) // Further checks on edgeTolerance
252 		return(kQ3Failure);
253 #endif
254 
255 
256 
257 	// Call the bottleneck
258 	E3System_Bottleneck();
259 
260 
261 
262 	// Call our implementation
263 	return(E3Pick_GetEdgeTolerance(pick, edgeTolerance));
264 }
265 
266 
267 
268 
269 
270 //=============================================================================
271 //      Q3Pick_SetVertexTolerance : Quesa API entry point.
272 //-----------------------------------------------------------------------------
273 TQ3Status
Q3Pick_SetVertexTolerance(TQ3PickObject pick,float vertexTolerance)274 Q3Pick_SetVertexTolerance(TQ3PickObject pick, float vertexTolerance)
275 {
276 
277 
278 	// Release build checks
279 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
280 
281 
282 
283 	// Debug build checks
284 #if Q3_DEBUG
285 	if (0) // Further checks on pick
286 		return(kQ3Failure);
287 
288 	if (0) // Further checks on vertexTolerance
289 		return(kQ3Failure);
290 #endif
291 
292 
293 
294 	// Call the bottleneck
295 	E3System_Bottleneck();
296 
297 
298 
299 	// Call our implementation
300 	return(E3Pick_SetVertexTolerance(pick, vertexTolerance));
301 }
302 
303 
304 
305 
306 
307 //=============================================================================
308 //      Q3Pick_SetEdgeTolerance : Quesa API entry point.
309 //-----------------------------------------------------------------------------
310 TQ3Status
Q3Pick_SetEdgeTolerance(TQ3PickObject pick,float edgeTolerance)311 Q3Pick_SetEdgeTolerance(TQ3PickObject pick, float edgeTolerance)
312 {
313 
314 
315 	// Release build checks
316 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
317 
318 
319 
320 	// Debug build checks
321 #if Q3_DEBUG
322 	if (0) // Further checks on pick
323 		return(kQ3Failure);
324 
325 	if (0) // Further checks on edgeTolerance
326 		return(kQ3Failure);
327 #endif
328 
329 
330 
331 	// Call the bottleneck
332 	E3System_Bottleneck();
333 
334 
335 
336 	// Call our implementation
337 	return(E3Pick_SetEdgeTolerance(pick, edgeTolerance));
338 }
339 
340 
341 
342 
343 
344 //=============================================================================
345 //      Q3Pick_GetNumHits : Quesa API entry point.
346 //-----------------------------------------------------------------------------
347 TQ3Status
Q3Pick_GetNumHits(TQ3PickObject pick,TQ3Uns32 * numHits)348 Q3Pick_GetNumHits(TQ3PickObject pick, TQ3Uns32 *numHits)
349 {
350 
351 
352 	// Release build checks
353 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
354 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(numHits), kQ3Failure);
355 
356 
357 
358 	// Debug build checks
359 #if Q3_DEBUG
360 	if (0) // Further checks on pick
361 		return(kQ3Failure);
362 
363 	if (0) // Further checks on numHits
364 		return(kQ3Failure);
365 #endif
366 
367 
368 
369 	// Call the bottleneck
370 	E3System_Bottleneck();
371 
372 
373 
374 	// Call our implementation
375 	return(E3Pick_GetNumHits(pick, numHits));
376 }
377 
378 
379 
380 
381 
382 //=============================================================================
383 //      Q3Pick_EmptyHitList : Quesa API entry point.
384 //-----------------------------------------------------------------------------
385 TQ3Status
Q3Pick_EmptyHitList(TQ3PickObject pick)386 Q3Pick_EmptyHitList(TQ3PickObject pick)
387 {
388 
389 
390 	// Release build checks
391 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
392 
393 
394 
395 	// Debug build checks
396 #if Q3_DEBUG
397 	if (0) // Further checks on pick
398 		return(kQ3Failure);
399 #endif
400 
401 
402 
403 	// Call the bottleneck
404 	E3System_Bottleneck();
405 
406 
407 
408 	// Call our implementation
409 	return(E3Pick_EmptyHitList(pick));
410 }
411 
412 
413 
414 
415 
416 //=============================================================================
417 //      Q3Pick_GetPickDetailValidMask : Quesa API entry point.
418 //-----------------------------------------------------------------------------
419 TQ3Status
Q3Pick_GetPickDetailValidMask(TQ3PickObject pick,TQ3Uns32 index,TQ3PickDetail * pickDetailValidMask)420 Q3Pick_GetPickDetailValidMask(TQ3PickObject pick, TQ3Uns32 index, TQ3PickDetail *pickDetailValidMask)
421 {
422 
423 
424 	// Release build checks
425 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
426 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(pickDetailValidMask), kQ3Failure);
427 
428 
429 
430 	// Debug build checks
431 #if Q3_DEBUG
432 	if (0) // Further checks on pick
433 		return(kQ3Failure);
434 
435 	if (0) // Further checks on index
436 		return(kQ3Failure);
437 
438 	if (0) // Further checks on pickDetailValidMask
439 		return(kQ3Failure);
440 #endif
441 
442 
443 
444 	// Call the bottleneck
445 	E3System_Bottleneck();
446 
447 
448 
449 	// Call our implementation
450 	return(E3Pick_GetPickDetailValidMask(pick, index, pickDetailValidMask));
451 }
452 
453 
454 
455 
456 
457 //=============================================================================
458 //      Q3Pick_GetPickDetailData : Quesa API entry point.
459 //-----------------------------------------------------------------------------
460 TQ3Status
Q3Pick_GetPickDetailData(TQ3PickObject pick,TQ3Uns32 index,TQ3PickDetail pickDetailValue,void * detailData)461 Q3Pick_GetPickDetailData(TQ3PickObject pick, TQ3Uns32 index, TQ3PickDetail pickDetailValue, void *detailData)
462 {
463 
464 
465 	// Release build checks
466 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
467 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(detailData), kQ3Failure);
468 
469 
470 
471 	// Debug build checks
472 #if Q3_DEBUG
473 	if (0) // Further checks on pick
474 		return(kQ3Failure);
475 
476 	if (0) // Further checks on index
477 		return(kQ3Failure);
478 
479 	if (0) // Further checks on pickDetailValue
480 		return(kQ3Failure);
481 
482 	if (0) // Further checks on detailData
483 		return(kQ3Failure);
484 #endif
485 
486 
487 
488 	// Call the bottleneck
489 	E3System_Bottleneck();
490 
491 
492 
493 	// Call our implementation
494 	return(E3Pick_GetPickDetailData(pick, index, pickDetailValue, detailData));
495 }
496 
497 
498 
499 
500 
501 //=============================================================================
502 //      Q3HitPath_EmptyData : Quesa API entry point.
503 //-----------------------------------------------------------------------------
504 TQ3Status
Q3HitPath_EmptyData(TQ3HitPath * hitPath)505 Q3HitPath_EmptyData(TQ3HitPath *hitPath)
506 {
507 
508 
509 	// Release build checks
510 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(hitPath), kQ3Failure);
511 
512 
513 
514 	// Debug build checks
515 #if Q3_DEBUG
516 	if (0) // Further checks on hitPath
517 		return(kQ3Failure);
518 #endif
519 
520 
521 
522 	// Call the bottleneck
523 	E3System_Bottleneck();
524 
525 
526 
527 	// Call our implementation
528 	return(E3HitPath_EmptyData(hitPath));
529 }
530 
531 
532 
533 #pragma mark -
534 
535 //=============================================================================
536 //      Q3WindowPointPick_New : Quesa API entry point.
537 //-----------------------------------------------------------------------------
538 TQ3PickObject
Q3WindowPointPick_New(const TQ3WindowPointPickData * data)539 Q3WindowPointPick_New(const TQ3WindowPointPickData *data)
540 {
541 
542 
543 	// Release build checks
544 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), NULL);
545 
546 
547 
548 	// Debug build checks
549 #if Q3_DEBUG
550 	if (0) // Further checks on data
551 		return(NULL);
552 #endif
553 
554 
555 
556 	// Call the bottleneck
557 	E3System_Bottleneck();
558 
559 
560 
561 	// Call our implementation
562 	return(E3WindowPointPick_New(data));
563 }
564 
565 
566 
567 
568 
569 //=============================================================================
570 //      Q3WindowPointPick_GetPoint : Quesa API entry point.
571 //-----------------------------------------------------------------------------
572 TQ3Status
Q3WindowPointPick_GetPoint(TQ3PickObject pick,TQ3Point2D * point)573 Q3WindowPointPick_GetPoint(TQ3PickObject pick, TQ3Point2D *point)
574 {
575 
576 
577 	// Release build checks
578 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
579 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(point), kQ3Failure);
580 
581 
582 
583 	// Debug build checks
584 #if Q3_DEBUG
585 	if (0) // Further checks on pick
586 		return(kQ3Failure);
587 
588 	if (0) // Further checks on point
589 		return(kQ3Failure);
590 #endif
591 
592 
593 
594 	// Call the bottleneck
595 	E3System_Bottleneck();
596 
597 
598 
599 	// Call our implementation
600 	return(E3WindowPointPick_GetPoint(pick, point));
601 }
602 
603 
604 
605 
606 
607 //=============================================================================
608 //      Q3WindowPointPick_SetPoint : Quesa API entry point.
609 //-----------------------------------------------------------------------------
610 TQ3Status
Q3WindowPointPick_SetPoint(TQ3PickObject pick,const TQ3Point2D * point)611 Q3WindowPointPick_SetPoint(TQ3PickObject pick, const TQ3Point2D *point)
612 {
613 
614 
615 	// Release build checks
616 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
617 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(point), kQ3Failure);
618 
619 
620 
621 	// Debug build checks
622 #if Q3_DEBUG
623 	if (0) // Further checks on pick
624 		return(kQ3Failure);
625 
626 	if (0) // Further checks on point
627 		return(kQ3Failure);
628 #endif
629 
630 
631 
632 	// Call the bottleneck
633 	E3System_Bottleneck();
634 
635 
636 
637 	// Call our implementation
638 	return(E3WindowPointPick_SetPoint(pick, point));
639 }
640 
641 
642 
643 
644 
645 //=============================================================================
646 //      Q3WindowPointPick_GetData : Quesa API entry point.
647 //-----------------------------------------------------------------------------
648 TQ3Status
Q3WindowPointPick_GetData(TQ3PickObject pick,TQ3WindowPointPickData * data)649 Q3WindowPointPick_GetData(TQ3PickObject pick, TQ3WindowPointPickData *data)
650 {
651 
652 
653 	// Release build checks
654 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
655 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
656 
657 
658 
659 	// Debug build checks
660 #if Q3_DEBUG
661 	if (0) // Further checks on pick
662 		return(kQ3Failure);
663 
664 	if (0) // Further checks on data
665 		return(kQ3Failure);
666 #endif
667 
668 
669 
670 	// Call the bottleneck
671 	E3System_Bottleneck();
672 
673 
674 
675 	// Call our implementation
676 	return(E3WindowPointPick_GetData(pick, data));
677 }
678 
679 
680 
681 
682 
683 //=============================================================================
684 //      Q3WindowPointPick_SetData : Quesa API entry point.
685 //-----------------------------------------------------------------------------
686 TQ3Status
Q3WindowPointPick_SetData(TQ3PickObject pick,const TQ3WindowPointPickData * data)687 Q3WindowPointPick_SetData(TQ3PickObject pick, const TQ3WindowPointPickData *data)
688 {
689 
690 
691 	// Release build checks
692 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
693 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
694 
695 
696 
697 	// Debug build checks
698 #if Q3_DEBUG
699 	if (0) // Further checks on pick
700 		return(kQ3Failure);
701 
702 	if (0) // Further checks on data
703 		return(kQ3Failure);
704 #endif
705 
706 
707 
708 	// Call the bottleneck
709 	E3System_Bottleneck();
710 
711 
712 
713 	// Call our implementation
714 	return(E3WindowPointPick_SetData(pick, data));
715 }
716 
717 
718 
719 #pragma mark -
720 
721 //=============================================================================
722 //      Q3WindowRectPick_New : Quesa API entry point.
723 //-----------------------------------------------------------------------------
724 TQ3PickObject
Q3WindowRectPick_New(const TQ3WindowRectPickData * data)725 Q3WindowRectPick_New(const TQ3WindowRectPickData *data)
726 {
727 
728 
729 	// Release build checks
730 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), NULL);
731 
732 
733 
734 	// Debug build checks
735 #if Q3_DEBUG
736 	if (0) // Further checks on data
737 		return(NULL);
738 #endif
739 
740 
741 
742 	// Call the bottleneck
743 	E3System_Bottleneck();
744 
745 
746 
747 	// Call our implementation
748 	return(E3WindowRectPick_New(data));
749 }
750 
751 
752 
753 
754 
755 //=============================================================================
756 //      Q3WindowRectPick_GetRect : Quesa API entry point.
757 //-----------------------------------------------------------------------------
758 TQ3Status
Q3WindowRectPick_GetRect(TQ3PickObject pick,TQ3Area * rect)759 Q3WindowRectPick_GetRect(TQ3PickObject pick, TQ3Area *rect)
760 {
761 
762 
763 	// Release build checks
764 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
765 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(rect), kQ3Failure);
766 
767 
768 
769 	// Debug build checks
770 #if Q3_DEBUG
771 	if (0) // Further checks on pick
772 		return(kQ3Failure);
773 
774 	if (0) // Further checks on rect
775 		return(kQ3Failure);
776 #endif
777 
778 
779 
780 	// Call the bottleneck
781 	E3System_Bottleneck();
782 
783 
784 
785 	// Call our implementation
786 	return(E3WindowRectPick_GetRect(pick, rect));
787 }
788 
789 
790 
791 
792 
793 //=============================================================================
794 //      Q3WindowRectPick_SetRect : Quesa API entry point.
795 //-----------------------------------------------------------------------------
796 TQ3Status
Q3WindowRectPick_SetRect(TQ3PickObject pick,const TQ3Area * rect)797 Q3WindowRectPick_SetRect(TQ3PickObject pick, const TQ3Area *rect)
798 {
799 
800 
801 	// Release build checks
802 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
803 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(rect), kQ3Failure);
804 
805 
806 
807 	// Debug build checks
808 #if Q3_DEBUG
809 	if (0) // Further checks on pick
810 		return(kQ3Failure);
811 
812 	if (0) // Further checks on rect
813 		return(kQ3Failure);
814 #endif
815 
816 
817 
818 	// Call the bottleneck
819 	E3System_Bottleneck();
820 
821 
822 
823 	// Call our implementation
824 	return(E3WindowRectPick_SetRect(pick, rect));
825 }
826 
827 
828 
829 
830 
831 //=============================================================================
832 //      Q3WindowRectPick_GetData : Quesa API entry point.
833 //-----------------------------------------------------------------------------
834 TQ3Status
Q3WindowRectPick_GetData(TQ3PickObject pick,TQ3WindowRectPickData * data)835 Q3WindowRectPick_GetData(TQ3PickObject pick, TQ3WindowRectPickData *data)
836 {
837 
838 
839 	// Release build checks
840 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
841 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
842 
843 
844 
845 	// Debug build checks
846 #if Q3_DEBUG
847 	if (0) // Further checks on pick
848 		return(kQ3Failure);
849 
850 	if (0) // Further checks on data
851 		return(kQ3Failure);
852 #endif
853 
854 
855 
856 	// Call the bottleneck
857 	E3System_Bottleneck();
858 
859 
860 
861 	// Call our implementation
862 	return(E3WindowRectPick_GetData(pick, data));
863 }
864 
865 
866 
867 
868 
869 //=============================================================================
870 //      Q3WindowRectPick_SetData : Quesa API entry point.
871 //-----------------------------------------------------------------------------
872 TQ3Status
Q3WindowRectPick_SetData(TQ3PickObject pick,const TQ3WindowRectPickData * data)873 Q3WindowRectPick_SetData(TQ3PickObject pick, const TQ3WindowRectPickData *data)
874 {
875 
876 
877 	// Release build checks
878 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
879 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
880 
881 
882 
883 	// Debug build checks
884 #if Q3_DEBUG
885 	if (0) // Further checks on pick
886 		return(kQ3Failure);
887 
888 	if (0) // Further checks on data
889 		return(kQ3Failure);
890 #endif
891 
892 
893 
894 	// Call the bottleneck
895 	E3System_Bottleneck();
896 
897 
898 
899 	// Call our implementation
900 	return(E3WindowRectPick_SetData(pick, data));
901 }
902 
903 
904 #pragma mark -
905 
906 
907 //=============================================================================
908 //      Q3WorldRayPick_New : Quesa API entry point.
909 //-----------------------------------------------------------------------------
910 TQ3PickObject
Q3WorldRayPick_New(const TQ3WorldRayPickData * data)911 Q3WorldRayPick_New(const TQ3WorldRayPickData *data)
912 {
913 
914 
915 	// Release build checks
916 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), NULL);
917 
918 
919 
920 	// Debug build checks
921 #if Q3_DEBUG
922 	if (0) // Further checks on data
923 		return(NULL);
924 #endif
925 
926 
927 
928 	// Call the bottleneck
929 	E3System_Bottleneck();
930 
931 
932 
933 	// Call our implementation
934 	return(E3WorldRayPick_New(data));
935 }
936 
937 
938 
939 
940 
941 //=============================================================================
942 //      Q3WorldRayPick_GetRay : Quesa API entry point.
943 //-----------------------------------------------------------------------------
944 TQ3Status
Q3WorldRayPick_GetRay(TQ3PickObject pick,TQ3Ray3D * ray)945 Q3WorldRayPick_GetRay(TQ3PickObject pick, TQ3Ray3D *ray)
946 {
947 
948 
949 	// Release build checks
950 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
951 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(ray), kQ3Failure);
952 
953 
954 
955 	// Debug build checks
956 #if Q3_DEBUG
957 	if (0) // Further checks on pick
958 		return(kQ3Failure);
959 
960 	if (0) // Further checks on ray
961 		return(kQ3Failure);
962 #endif
963 
964 
965 
966 	// Call the bottleneck
967 	E3System_Bottleneck();
968 
969 
970 
971 	// Call our implementation
972 	return(E3WorldRayPick_GetRay(pick, ray));
973 }
974 
975 
976 
977 
978 
979 //=============================================================================
980 //      Q3WorldRayPick_SetRay : Quesa API entry point.
981 //-----------------------------------------------------------------------------
982 TQ3Status
Q3WorldRayPick_SetRay(TQ3PickObject pick,const TQ3Ray3D * ray)983 Q3WorldRayPick_SetRay(TQ3PickObject pick, const TQ3Ray3D *ray)
984 {
985 
986 
987 	// Release build checks
988 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
989 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(ray), kQ3Failure);
990 
991 
992 
993 	// Debug build checks
994 #if Q3_DEBUG
995 	if (0) // Further checks on pick
996 		return(kQ3Failure);
997 
998 	if (0) // Further checks on ray
999 		return(kQ3Failure);
1000 #endif
1001 
1002 
1003 
1004 	// Call the bottleneck
1005 	E3System_Bottleneck();
1006 
1007 
1008 
1009 	// Call our implementation
1010 	return(E3WorldRayPick_SetRay(pick, ray));
1011 }
1012 
1013 
1014 
1015 
1016 
1017 //=============================================================================
1018 //      Q3WorldRayPick_GetData : Quesa API entry point.
1019 //-----------------------------------------------------------------------------
1020 TQ3Status
Q3WorldRayPick_GetData(TQ3PickObject pick,TQ3WorldRayPickData * data)1021 Q3WorldRayPick_GetData(TQ3PickObject pick, TQ3WorldRayPickData *data)
1022 {
1023 
1024 
1025 	// Release build checks
1026 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
1027 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
1028 
1029 
1030 
1031 	// Debug build checks
1032 #if Q3_DEBUG
1033 	if (0) // Further checks on pick
1034 		return(kQ3Failure);
1035 
1036 	if (0) // Further checks on data
1037 		return(kQ3Failure);
1038 #endif
1039 
1040 
1041 
1042 	// Call the bottleneck
1043 	E3System_Bottleneck();
1044 
1045 
1046 
1047 	// Call our implementation
1048 	return(E3WorldRayPick_GetData(pick, data));
1049 }
1050 
1051 
1052 
1053 
1054 
1055 //=============================================================================
1056 //      Q3WorldRayPick_SetData : Quesa API entry point.
1057 //-----------------------------------------------------------------------------
1058 TQ3Status
Q3WorldRayPick_SetData(TQ3PickObject pick,const TQ3WorldRayPickData * data)1059 Q3WorldRayPick_SetData(TQ3PickObject pick, const TQ3WorldRayPickData *data)
1060 {
1061 
1062 
1063 	// Release build checks
1064 	Q3_REQUIRE_OR_RESULT( E3Pick_IsOfMyClass ( pick ), kQ3Failure);
1065 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(data), kQ3Failure);
1066 
1067 
1068 
1069 	// Debug build checks
1070 #if Q3_DEBUG
1071 	if (0) // Further checks on pick
1072 		return(kQ3Failure);
1073 
1074 	if (0) // Further checks on data
1075 		return(kQ3Failure);
1076 #endif
1077 
1078 
1079 
1080 	// Call the bottleneck
1081 	E3System_Bottleneck();
1082 
1083 
1084 
1085 	// Call our implementation
1086 	return(E3WorldRayPick_SetData(pick, data));
1087 }
1088 
1089 
1090 
1091 #pragma mark -
1092 
1093 //=============================================================================
1094 //      Q3ShapePart_GetType : Quesa API entry point.
1095 //-----------------------------------------------------------------------------
1096 TQ3ObjectType
Q3ShapePart_GetType(TQ3ShapePartObject shapePartObject)1097 Q3ShapePart_GetType(TQ3ShapePartObject shapePartObject)
1098 {
1099 
1100 
1101 	// Release build checks
1102 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(shapePartObject, kQ3SharedTypeShapePart), kQ3ObjectTypeInvalid);
1103 
1104 
1105 
1106 	// Debug build checks
1107 #if Q3_DEBUG
1108 	if (0) // Further checks on shapePartObject
1109 		return(kQ3ObjectTypeInvalid);
1110 #endif
1111 
1112 
1113 
1114 	// Call the bottleneck
1115 	E3System_Bottleneck();
1116 
1117 
1118 
1119 	// Call our implementation
1120 	return(E3ShapePart_GetType(shapePartObject));
1121 }
1122 
1123 
1124 
1125 
1126 
1127 //=============================================================================
1128 //      Q3MeshPart_GetType : Quesa API entry point.
1129 //-----------------------------------------------------------------------------
1130 TQ3ObjectType
Q3MeshPart_GetType(TQ3MeshPartObject meshPartObject)1131 Q3MeshPart_GetType(TQ3MeshPartObject meshPartObject)
1132 {
1133 
1134 
1135 	// Release build checks
1136 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(meshPartObject, kQ3ShapePartTypeMeshPart), kQ3ObjectTypeInvalid);
1137 
1138 
1139 
1140 	// Debug build checks
1141 #if Q3_DEBUG
1142 	if (0) // Further checks on meshPartObject
1143 		return(kQ3ObjectTypeInvalid);
1144 #endif
1145 
1146 
1147 
1148 	// Call the bottleneck
1149 	E3System_Bottleneck();
1150 
1151 
1152 
1153 	// Call our implementation
1154 	return(E3MeshPart_GetType(meshPartObject));
1155 }
1156 
1157 
1158 
1159 
1160 
1161 //=============================================================================
1162 //      Q3ShapePart_GetShape : Quesa API entry point.
1163 //-----------------------------------------------------------------------------
1164 TQ3Status
Q3ShapePart_GetShape(TQ3ShapePartObject shapePartObject,TQ3ShapeObject * shapeObject)1165 Q3ShapePart_GetShape(TQ3ShapePartObject shapePartObject, TQ3ShapeObject *shapeObject)
1166 {
1167 
1168 
1169 	// Release build checks
1170 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(shapePartObject, (kQ3SharedTypeShapePart)), kQ3Failure);
1171 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(shapeObject), kQ3Failure);
1172 
1173 
1174 
1175 	// Debug build checks
1176 #if Q3_DEBUG
1177 	if (0) // Further checks on shapePartObject
1178 		return(kQ3Failure);
1179 
1180 	if (0) // Further checks on shapeObject
1181 		return(kQ3Failure);
1182 #endif
1183 
1184 
1185 
1186 	// Call the bottleneck
1187 	E3System_Bottleneck();
1188 
1189 
1190 
1191 	// Call our implementation
1192 	return(E3ShapePart_GetShape(shapePartObject, shapeObject));
1193 }
1194 
1195 
1196 
1197 
1198 
1199 //=============================================================================
1200 //      Q3MeshPart_GetComponent : Quesa API entry point.
1201 //-----------------------------------------------------------------------------
1202 TQ3Status
Q3MeshPart_GetComponent(TQ3MeshPartObject meshPartObject,TQ3MeshComponent * component)1203 Q3MeshPart_GetComponent(TQ3MeshPartObject meshPartObject, TQ3MeshComponent *component)
1204 {
1205 
1206 
1207 	// Release build checks
1208 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(meshPartObject, (kQ3ShapePartTypeMeshPart)), kQ3Failure);
1209 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(component), kQ3Failure);
1210 
1211 
1212 
1213 	// Debug build checks
1214 #if Q3_DEBUG
1215 	if (0) // Further checks on meshPartObject
1216 		return(kQ3Failure);
1217 
1218 	if (0) // Further checks on component
1219 		return(kQ3Failure);
1220 #endif
1221 
1222 
1223 
1224 	// Call the bottleneck
1225 	E3System_Bottleneck();
1226 
1227 
1228 
1229 	// Call our implementation
1230 	return(E3MeshPart_GetComponent(meshPartObject, component));
1231 }
1232 
1233 
1234 
1235 
1236 
1237 //=============================================================================
1238 //      Q3MeshFacePart_GetFace : Quesa API entry point.
1239 //-----------------------------------------------------------------------------
1240 TQ3Status
Q3MeshFacePart_GetFace(TQ3MeshFacePartObject meshFacePartObject,TQ3MeshFace * face)1241 Q3MeshFacePart_GetFace(TQ3MeshFacePartObject meshFacePartObject, TQ3MeshFace *face)
1242 {
1243 
1244 
1245 	// Release build checks
1246 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(meshFacePartObject, (kQ3MeshPartTypeMeshFacePart)), kQ3Failure);
1247 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(face), kQ3Failure);
1248 
1249 
1250 
1251 	// Debug build checks
1252 #if Q3_DEBUG
1253 	if (0) // Further checks on meshFacePartObject
1254 		return(kQ3Failure);
1255 
1256 	if (0) // Further checks on face
1257 		return(kQ3Failure);
1258 #endif
1259 
1260 
1261 
1262 	// Call the bottleneck
1263 	E3System_Bottleneck();
1264 
1265 
1266 
1267 	// Call our implementation
1268 	return(E3MeshFacePart_GetFace(meshFacePartObject, face));
1269 }
1270 
1271 
1272 
1273 
1274 
1275 //=============================================================================
1276 //      Q3MeshEdgePart_GetEdge : Quesa API entry point.
1277 //-----------------------------------------------------------------------------
1278 TQ3Status
Q3MeshEdgePart_GetEdge(TQ3MeshEdgePartObject meshEdgePartObject,TQ3MeshEdge * edge)1279 Q3MeshEdgePart_GetEdge(TQ3MeshEdgePartObject meshEdgePartObject, TQ3MeshEdge *edge)
1280 {
1281 
1282 
1283 	// Release build checks
1284 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(meshEdgePartObject, (kQ3MeshPartTypeMeshEdgePart)), kQ3Failure);
1285 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(edge), kQ3Failure);
1286 
1287 
1288 
1289 	// Debug build checks
1290 #if Q3_DEBUG
1291 	if (0) // Further checks on meshEdgePartObject
1292 		return(kQ3Failure);
1293 
1294 	if (0) // Further checks on edge
1295 		return(kQ3Failure);
1296 #endif
1297 
1298 
1299 
1300 	// Call the bottleneck
1301 	E3System_Bottleneck();
1302 
1303 
1304 
1305 	// Call our implementation
1306 	return(E3MeshEdgePart_GetEdge(meshEdgePartObject, edge));
1307 }
1308 
1309 
1310 
1311 
1312 
1313 //=============================================================================
1314 //      Q3MeshVertexPart_GetVertex : Quesa API entry point.
1315 //-----------------------------------------------------------------------------
1316 TQ3Status
Q3MeshVertexPart_GetVertex(TQ3MeshVertexPartObject meshVertexPartObject,TQ3MeshVertex * vertex)1317 Q3MeshVertexPart_GetVertex(TQ3MeshVertexPartObject meshVertexPartObject, TQ3MeshVertex *vertex)
1318 {
1319 
1320 
1321 	// Release build checks
1322 	Q3_REQUIRE_OR_RESULT(Q3Object_IsType(meshVertexPartObject, (kQ3MeshPartTypeMeshVertexPart)), kQ3Failure);
1323 	Q3_REQUIRE_OR_RESULT(Q3_VALID_PTR(vertex), kQ3Failure);
1324 
1325 
1326 
1327 	// Debug build checks
1328 #if Q3_DEBUG
1329 	if (0) // Further checks on meshVertexPartObject
1330 		return(kQ3Failure);
1331 
1332 	if (0) // Further checks on vertex
1333 		return(kQ3Failure);
1334 #endif
1335 
1336 
1337 
1338 	// Call the bottleneck
1339 	E3System_Bottleneck();
1340 
1341 
1342 
1343 	// Call our implementation
1344 	return(E3MeshVertexPart_GetVertex(meshVertexPartObject, vertex));
1345 }
1346 
1347 
1348 
1349 
1350 
1351