1 /*! @header QuesaPick.h
2         Declares the Quesa pick objects.
3  */
4 /*  NAME:
5         QuesaPick.h
6 
7     DESCRIPTION:
8         Quesa public header.
9 
10     COPYRIGHT:
11         Copyright (c) 1999-2004, Quesa Developers. All rights reserved.
12 
13         For the current release of Quesa, please see:
14 
15             <http://www.quesa.org/>
16 
17         Redistribution and use in source and binary forms, with or without
18         modification, are permitted provided that the following conditions
19         are met:
20 
21             o Redistributions of source code must retain the above copyright
22               notice, this list of conditions and the following disclaimer.
23 
24             o Redistributions in binary form must reproduce the above
25               copyright notice, this list of conditions and the following
26               disclaimer in the documentation and/or other materials provided
27               with the distribution.
28 
29             o Neither the name of Quesa nor the names of its contributors
30               may be used to endorse or promote products derived from this
31               software without specific prior written permission.
32 
33         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34         "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35         LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36         A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37         OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
39         TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
40         PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41         LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
42         NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43         SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44     ___________________________________________________________________________
45 */
46 #ifndef QUESA_PICK_HDR
47 #define QUESA_PICK_HDR
48 //=============================================================================
49 //      Include files
50 //-----------------------------------------------------------------------------
51 #include "Quesa.h"
52 
53 #include "QuesaStyle.h"
54 #include "QuesaGeometry.h"
55 
56 // Disable QD3D header
57 #if defined(__QD3DPICK__)
58 #error
59 #endif
60 
61 #define __QD3DPICK__
62 
63 
64 
65 
66 
67 //=============================================================================
68 //      C++ preamble
69 //-----------------------------------------------------------------------------
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
74 
75 
76 
77 
78 //=============================================================================
79 //      Constants
80 //-----------------------------------------------------------------------------
81 /*!
82  *  @enum
83  *      TQ3PickDetailMasks
84  *  @discussion
85  *      Bitfield indicating the type of data to be returned by picks.
86  *
87  *  @constant kQ3PickDetailNone                      No pick details are required.
88  *  @constant kQ3PickDetailMaskPickID                The picking ID of the picked object.
89  *  @constant kQ3PickDetailMaskPath                  The path through the model hierarchy to the picked object.
90  *  @constant kQ3PickDetailMaskObject                The picked object.
91  *  @constant kQ3PickDetailMaskLocalToWorldMatrix    The local-to-world matrix for the picked object.
92  *  @constant kQ3PickDetailMaskXYZ                   The picked location in world coordinates.
93  *  @constant kQ3PickDetailMaskDistance              The distance between the picked location and the pick origin.
94  *  @constant kQ3PickDetailMaskNormal                The surface normal at the picked location.
95  *  @constant kQ3PickDetailMaskShapePart             The shape part of the picked object.
96  *  @constant kQ3PickDetailMaskPickPart              The picked object, edge, or vertex.
97  *  @constant kQ3PickDetailMaskUV                    The UV coordinate of the picked location.
98  */
99 typedef enum TQ3PickDetailMasks {
100     kQ3PickDetailNone                           = 0,
101     kQ3PickDetailMaskPickID                     = (1 << 0),
102     kQ3PickDetailMaskPath                       = (1 << 1),
103     kQ3PickDetailMaskObject                     = (1 << 2),
104     kQ3PickDetailMaskLocalToWorldMatrix         = (1 << 3),
105     kQ3PickDetailMaskXYZ                        = (1 << 4),
106     kQ3PickDetailMaskDistance                   = (1 << 5),
107     kQ3PickDetailMaskNormal                     = (1 << 6),
108     kQ3PickDetailMaskShapePart                  = (1 << 7),
109     kQ3PickDetailMaskPickPart                   = (1 << 8),
110     kQ3PickDetailMaskUV                         = (1 << 9),
111     kQ3PickDetailSize32                         = 0xFFFFFFFF
112 } TQ3PickDetailMasks;
113 
114 
115 /*!
116  *  @enum
117  *      TQ3PickSort
118  *  @discussion
119  *      The order in which pick results should be sorted.
120  *
121  *  @constant kQ3PickSortNone           The pick hit list should not be sorted.
122  *  @constant kQ3PickSortNearToFar      The pick hit list should be sorted from near to far.
123  *  @constant kQ3PickSortFarToNear      The pick hit list should be sorted from far to near.
124  */
125 typedef enum TQ3PickSort {
126     kQ3PickSortNone                             = 0,
127     kQ3PickSortNearToFar                        = 1,
128     kQ3PickSortFarToNear                        = 2,
129     kQ3PickSortSize32                           = 0xFFFFFFFF
130 } TQ3PickSort;
131 
132 
133 // Hit request
134 /*!
135  *	@defined	kQ3ReturnAllHits
136  *	@discussion
137  *		This value can be placed in the <code>numHitsToReturn</code> field of the
138  *		<code>TQ3PickData</code> structure to indicate that we want information
139  *		about all hits.
140 */
141 #define kQ3ReturnAllHits                        0
142 
143 
144 
145 
146 
147 //=============================================================================
148 //      Types
149 //-----------------------------------------------------------------------------
150 // Pick detail
151 /*!
152  *	@typedef	TQ3PickDetail
153  *	@discussion
154  *		A 32-bit integer used as a set of flags.  See <code>TQ3PickDetailMasks</code>
155  *		for enumerated constants that can be combined in this data type.
156 */
157 typedef TQ3Uns32 TQ3PickDetail;
158 
159 
160 /*!
161  *  @struct
162  *      TQ3PickData
163  *  @discussion
164  *      Describes the common state for a pick object.
165  *
166  *  @field sort             The type of sorting, if any, to performed on the results.
167  *  @field mask             The type of pick information to be returned.
168  *  @field numHitsToReturn  The number of hits to return. Set to <code>kQ3ReturnAllHits</code>
169  *                          to retrieve all hits.
170  */
171 typedef struct TQ3PickData {
172     TQ3PickSort                                 sort;
173     TQ3PickDetail                               mask;
174     TQ3Uns32                                    numHitsToReturn;
175 } TQ3PickData;
176 
177 
178 /*!
179  *  @struct
180  *      TQ3WindowPointPickData
181  *  @discussion
182  *      Describes the state for a window-point pick object.
183  *
184  *  @field data             The common state for the pick.
185  *  @field point            The pick point in local window coordinates.  Note that on Win32,
186  *							this means relative to the HWND which contains the view.
187  *  @field vertexTolerance  The vertex tolerance.  Only relevant to picking Point objects.
188  *  @field edgeTolerance    The edge tolerance.  Only relevant to picking one-dimensional
189  *							objects such as Lines and PolyLines.
190  */
191 typedef struct TQ3WindowPointPickData {
192     TQ3PickData                                 data;
193     TQ3Point2D                                  point;
194     float                                       vertexTolerance;
195     float                                       edgeTolerance;
196 } TQ3WindowPointPickData;
197 
198 
199 /*!
200  *  @struct
201  *      TQ3WindowRectPickData
202  *  @discussion
203  *      Describes the state for a window-rect pick object.
204  *
205  *  @field data             The common state for the pick.
206  *  @field rect             The pick rect in local window coordinates.
207  */
208 typedef struct TQ3WindowRectPickData {
209     TQ3PickData                                 data;
210     TQ3Area                                     rect;
211 } TQ3WindowRectPickData;
212 
213 
214 /*!
215  *  @struct
216  *      TQ3WorldRayPickData
217  *  @discussion
218  *      Describes the state for a world-ray pick object.
219  *
220  *  @field data             The common state for the pick.
221  *  @field ray              The pick ray in world coordinates.
222  *  @field vertexTolerance  The vertex tolerance.  Only relevant to picking Point objects.
223  *  @field edgeTolerance    The edge tolerance.  Only relevant to picking one-dimensional
224  *							objects such as Lines and PolyLines.
225  */
226 typedef struct TQ3WorldRayPickData {
227     TQ3PickData                                 data;
228     TQ3Ray3D                                    ray;
229     float                                       vertexTolerance;
230     float                                       edgeTolerance;
231 } TQ3WorldRayPickData;
232 
233 
234 /*!
235  *  @struct
236  *      TQ3HitPath
237  *  @discussion
238  *      Hit path data.
239  *
240  *		Returned by Q3Pick_GetPickDetailData for the kQ3PickDetailMaskPath
241  *      pick selector. Disposed of by Q3HitPath_EmptyData.
242  *
243  *      rootGroup holds the top level group which encloses the picked
244  *      object. positions holds an array for each nested group within
245  *      the submit sequence, indicating the position that was submitted
246  *      at each level. This array contains depth values.
247  *
248  *      E.g., assuming 'object' is the picked object, then submitting:
249  *
250  *          group1(object)
251  *
252  *      would produce a rootGroup field of group 1, a depth field of 1,
253  *      and positions[0] would contain the position of object within
254  *      group1.
255  *
256  *      Submitting:
257  *
258  *          group1(group2(object))
259  *
260  *      would produce a rootGroup field of group1, a depth field of 2,
261  *      positions[0] would hold the position of group2 within group1,
262  *      and positions[1] would hold the position of object within group2.
263  *
264  *
265  *      Note that the contents of the position array are only valid if
266  *      the submitted groups are unchanged since they were submitted
267  *      for picking.
268  *
269  *      If these groups have had items added or removed since they
270  *      were submitted, the positions array will no longer be valid.
271  *
272  *  @field rootGroup        Top level group which was submitted.
273  *  @field depth            Number of valid entries within positions.
274  *  @field positions        Array of group positions leading to the picked object.
275  */
276 typedef struct TQ3HitPath {
277     TQ3GroupObject                              rootGroup;
278     TQ3Uns32                                    depth;
279     TQ3GroupPosition                            *positions;
280 } TQ3HitPath;
281 
282 
283 
284 
285 
286 //=============================================================================
287 //      Function prototypes
288 //-----------------------------------------------------------------------------
289 /*!
290  *  @function
291  *      Q3Pick_GetType
292  *  @discussion
293  *      Get the type of a pick object.
294  *
295  *      Returns kQ3ObjectTypeInvalid if the pick type is unknown.
296  *
297  *  @param pick             The pick to query.
298  *  @result                 The type of the pick object.
299  */
300 Q3_EXTERN_API_C ( TQ3ObjectType  )
301 Q3Pick_GetType (
302     TQ3PickObject                 pick
303 );
304 
305 
306 
307 /*!
308  *  @function
309  *      Q3Pick_GetData
310  *  @discussion
311  *      Get the common state of a pick object.
312  *
313  *  @param pick             The pick object to query.
314  *  @param data             Receives the common state of the pick object.
315  *  @result                 Success or failure of the operation.
316  */
317 Q3_EXTERN_API_C ( TQ3Status  )
318 Q3Pick_GetData (
319     TQ3PickObject                 pick,
320     TQ3PickData                   *data
321 );
322 
323 
324 
325 /*!
326  *  @function
327  *      Q3Pick_SetData
328  *  @discussion
329  *      Set the common state of a pick object.
330  *
331  *  @param pick             The pick object to update.
332  *  @param data             The new common state for the pick object.
333  *  @result                 Success or failure of the operation.
334  */
335 Q3_EXTERN_API_C ( TQ3Status  )
336 Q3Pick_SetData (
337     TQ3PickObject                 pick,
338     const TQ3PickData             *data
339 );
340 
341 
342 
343 /*!
344  *  @function
345  *      Q3Pick_GetVertexTolerance
346  *  @discussion
347  *      Get the vertex tolerance of a pick object.
348  *
349  *  @param pick             The pick object to query.
350  *  @param vertexTolerance  Receives the vertex tolerance of the pick object.
351  *  @result                 Success or failure of the operation.
352  */
353 Q3_EXTERN_API_C ( TQ3Status  )
354 Q3Pick_GetVertexTolerance (
355     TQ3PickObject                 pick,
356     float                         *vertexTolerance
357 );
358 
359 
360 
361 /*!
362  *  @function
363  *      Q3Pick_GetEdgeTolerance
364  *  @discussion
365  *      Get the edge tolerance of a pick object.
366  *
367  *  @param pick             The pick object to query.
368  *  @param edgeTolerance    Receives the edge tolerance of the pick object.
369  *  @result                 Success or failure of the operation.
370  */
371 Q3_EXTERN_API_C ( TQ3Status  )
372 Q3Pick_GetEdgeTolerance (
373     TQ3PickObject                 pick,
374     float                         *edgeTolerance
375 );
376 
377 
378 
379 /*!
380  *  @function
381  *      Q3Pick_SetVertexTolerance
382  *  @discussion
383  *      Set the vertex tolerance of a pick object.
384  *
385  *  @param pick             The pick object to update.
386  *  @param vertexTolerance  The new vertex tolerance of the pick object.
387  *  @result                 Success or failure of the operation.
388  */
389 Q3_EXTERN_API_C ( TQ3Status  )
390 Q3Pick_SetVertexTolerance (
391     TQ3PickObject                 pick,
392     float                         vertexTolerance
393 );
394 
395 
396 
397 /*!
398  *  @function
399  *      Q3Pick_SetEdgeTolerance
400  *  @discussion
401  *      Set the edge tolerance of a pick object.
402  *
403  *  @param pick             The pick object to update.
404  *  @param edgeTolerance    The new edge tolerance of the pick object.
405  *  @result                 Success or failure of the operation.
406  */
407 Q3_EXTERN_API_C ( TQ3Status  )
408 Q3Pick_SetEdgeTolerance (
409     TQ3PickObject                 pick,
410     float                         edgeTolerance
411 );
412 
413 
414 
415 /*!
416  *  @function
417  *      Q3Pick_GetNumHits
418  *  @discussion
419  *      Get the number of hits of a pick object.
420  *
421  *  @param pick             The pick object to query.
422  *  @param numHits          Receives the number of hits of a pick object.
423  *  @result                 Success or failure of the operation.
424  */
425 Q3_EXTERN_API_C ( TQ3Status  )
426 Q3Pick_GetNumHits (
427     TQ3PickObject                 pick,
428     TQ3Uns32                      *numHits
429 );
430 
431 
432 
433 /*!
434  *  @function
435  *      Q3Pick_EmptyHitList
436  *  @discussion
437  *      Empty the hit list of a pick object.
438  *
439  *  @param pick             The pick object to update.
440  *  @result                 Success or failure of the operation.
441  */
442 Q3_EXTERN_API_C ( TQ3Status  )
443 Q3Pick_EmptyHitList (
444     TQ3PickObject                 pick
445 );
446 
447 
448 
449 /*!
450  *  @function
451  *      Q3Pick_GetPickDetailValidMask
452  *  @discussion
453  *      Get the available data mask for a pick result.
454  *
455  *      Pick results are indexed from 0, and the number of available
456  *      pick results is returned by Q3Pick_GetNumHits.
457  *
458  *  @param pick                   The pick object to query.
459  *  @param index                  The index of the hit to query.
460  *  @param pickDetailValidMask    Receives the available data mask for the hit.
461  *  @result                       Success or failure of the operation.
462  */
463 Q3_EXTERN_API_C ( TQ3Status  )
464 Q3Pick_GetPickDetailValidMask (
465     TQ3PickObject                 pick,
466     TQ3Uns32                      index,
467     TQ3PickDetail                 *pickDetailValidMask
468 );
469 
470 
471 
472 /*!
473  *  @function
474  *      Q3Pick_GetPickDetailData
475  *  @discussion
476  *      Get the data for a pick result.
477  *
478  *      When the kQ3PickDetailMaskPath data is requested, it must be disposed
479  *      of by the caller using Q3HitPath_EmptyData.
480  *
481  *      Pick results are indexed from 0, and the number of available
482  *      pick results is returned by Q3Pick_GetNumHits.
483  *
484  *  @param pick             The pick object to query.
485  *  @param index            The index of the hit to query.
486  *  @param pickDetailValue  The type of data requested from the hit.
487  *  @param detailData       Receives the data from the hit.
488  *  @result                 Success or failure of the operation.
489  */
490 Q3_EXTERN_API_C ( TQ3Status  )
491 Q3Pick_GetPickDetailData (
492     TQ3PickObject                 pick,
493     TQ3Uns32                      index,
494     TQ3PickDetail                 pickDetailValue,
495     void                          *detailData
496 );
497 
498 
499 
500 /*!
501  *  @function
502  *      Q3HitPath_EmptyData
503  *  @discussion
504  *      Release the memory allocated by a previous call to Q3Pick_GetPickDetailData.
505  *
506  *  @param hitPath          The hit-path data to release.
507  *  @result                 Success or failure of the operation.
508  */
509 Q3_EXTERN_API_C ( TQ3Status  )
510 Q3HitPath_EmptyData (
511     TQ3HitPath                    *hitPath
512 );
513 
514 
515 
516 /*!
517  *  @function
518  *      Q3WindowPointPick_New
519  *  @discussion
520  *      Create a new window-point pick object.
521  *
522  *  @param data             The data for the pick object.
523  *  @result                 The new pick object.
524  */
525 Q3_EXTERN_API_C ( TQ3PickObject  )
526 Q3WindowPointPick_New (
527     const TQ3WindowPointPickData  *data
528 );
529 
530 
531 
532 /*!
533  *  @function
534  *      Q3WindowPointPick_GetPoint
535  *  @discussion
536  *      Get the pick point of a window-point pick object.
537  *
538  *  @param pick             The pick object to query.
539  *  @param point            Receives the pick point of the pick object.
540  *  @result                 Success or failure of the operation.
541  */
542 Q3_EXTERN_API_C ( TQ3Status  )
543 Q3WindowPointPick_GetPoint (
544     TQ3PickObject                 pick,
545     TQ3Point2D                    *point
546 );
547 
548 
549 
550 /*!
551  *  @function
552  *      Q3WindowPointPick_SetPoint
553  *  @discussion
554  *      Set the pick point of a window-point pick object.
555  *
556  *  @param pick             The pick object to update.
557  *  @param point            The new pick point for the pick object.
558  *  @result                 Success or failure of the operation.
559  */
560 Q3_EXTERN_API_C ( TQ3Status  )
561 Q3WindowPointPick_SetPoint (
562     TQ3PickObject                 pick,
563     const TQ3Point2D              *point
564 );
565 
566 
567 
568 /*!
569  *  @function
570  *      Q3WindowPointPick_GetData
571  *  @discussion
572  *      Get the data of a window-point pick object.
573  *
574  *  @param pick             The pick object to query.
575  *  @param data             Receives the data of the pick object.
576  *  @result                 Success or failure of the operation.
577  */
578 Q3_EXTERN_API_C ( TQ3Status  )
579 Q3WindowPointPick_GetData (
580     TQ3PickObject                 pick,
581     TQ3WindowPointPickData        *data
582 );
583 
584 
585 
586 /*!
587  *  @function
588  *      Q3WindowPointPick_SetData
589  *  @discussion
590  *      Set the data for a window-point pick object.
591  *
592  *  @param pick             The pick object to update.
593  *  @param data             The new data for the pick object.
594  *  @result                 Success or failure of the operation.
595  */
596 Q3_EXTERN_API_C ( TQ3Status  )
597 Q3WindowPointPick_SetData (
598     TQ3PickObject                 pick,
599     const TQ3WindowPointPickData  *data
600 );
601 
602 
603 
604 /*!
605  *  @function
606  *      Q3WindowRectPick_New
607  *  @discussion
608  *      Create a new window-rect pick object.
609  *
610  *  @param data             The data for the pick object.
611  *  @result                 The new pick object.
612  */
613 Q3_EXTERN_API_C ( TQ3PickObject  )
614 Q3WindowRectPick_New (
615     const TQ3WindowRectPickData   *data
616 );
617 
618 
619 
620 /*!
621  *  @function
622  *      Q3WindowRectPick_GetRect
623  *  @discussion
624  *      Get the pick rect of a window-rect pick object.
625  *
626  *  @param pick             The pick object to query.
627  *  @param rect             Receives the pick rect of the pick object.
628  *  @result                 Success or failure of the operation.
629  */
630 Q3_EXTERN_API_C ( TQ3Status  )
631 Q3WindowRectPick_GetRect (
632     TQ3PickObject                 pick,
633     TQ3Area                       *rect
634 );
635 
636 
637 
638 /*!
639  *  @function
640  *      Q3WindowRectPick_SetRect
641  *  @discussion
642  *      Set the pick rect of a window-rect pick object.
643  *
644  *  @param pick             The pick object to update.
645  *  @param rect             The new pick rect of the pick object.
646  *  @result                 Success or failure of the operation.
647  */
648 Q3_EXTERN_API_C ( TQ3Status  )
649 Q3WindowRectPick_SetRect (
650     TQ3PickObject                 pick,
651     const TQ3Area                 *rect
652 );
653 
654 
655 
656 /*!
657  *  @function
658  *      Q3WindowRectPick_GetData
659  *  @discussion
660  *      Get the data of a window-rect pick object.
661  *
662  *  @param pick             The pick object to query.
663  *  @param data             Receives the data of the pick object.
664  *  @result                 Success or failure of the operation.
665  */
666 Q3_EXTERN_API_C ( TQ3Status  )
667 Q3WindowRectPick_GetData (
668     TQ3PickObject                 pick,
669     TQ3WindowRectPickData         *data
670 );
671 
672 
673 
674 /*!
675  *  @function
676  *      Q3WindowRectPick_SetData
677  *  @discussion
678  *      Set the data of a window-rect pick object.
679  *
680  *  @param pick             The pick object to update.
681  *  @param data             The new data for the pick object.
682  *  @result                 Success or failure of the operation.
683  */
684 Q3_EXTERN_API_C ( TQ3Status  )
685 Q3WindowRectPick_SetData (
686     TQ3PickObject                 pick,
687     const TQ3WindowRectPickData   *data
688 );
689 
690 
691 
692 /*!
693  *  @function
694  *      Q3WorldRayPick_New
695  *  @discussion
696  *      Create a new world-ray pick object.
697  *
698  *  @param data             The data for the pick object.
699  *  @result                 The new pick object.
700  */
701 Q3_EXTERN_API_C ( TQ3PickObject  )
702 Q3WorldRayPick_New (
703     const TQ3WorldRayPickData     *data
704 );
705 
706 
707 
708 /*!
709  *  @function
710  *      Q3WorldRayPick_GetRay
711  *  @discussion
712  *      Get the pick ray of a world-ray pick object.
713  *
714  *  @param pick             The pick object to query.
715  *  @param ray              Receives the ray of the pick object.
716  *  @result                 Success or failure of the operation.
717  */
718 Q3_EXTERN_API_C ( TQ3Status  )
719 Q3WorldRayPick_GetRay (
720     TQ3PickObject                 pick,
721     TQ3Ray3D                      *ray
722 );
723 
724 
725 
726 /*!
727  *  @function
728  *      Q3WorldRayPick_SetRay
729  *  @discussion
730  *      Set the pick ray of a world-ray pick object.
731  *
732  *  @param pick             The pick object to update.
733  *  @param ray              The new ray for the pick object.
734  *  @result                 Success or failure of the operation.
735  */
736 Q3_EXTERN_API_C ( TQ3Status  )
737 Q3WorldRayPick_SetRay (
738     TQ3PickObject                 pick,
739     const TQ3Ray3D                *ray
740 );
741 
742 
743 
744 /*!
745  *  @function
746  *      Q3WorldRayPick_GetData
747  *  @discussion
748  *      Get the data of a world-ray pick object.
749  *
750  *  @param pick             The pick object to query.
751  *  @param data             Receives the data for the pick object.
752  *  @result                 Success or failure of the operation.
753  */
754 Q3_EXTERN_API_C ( TQ3Status  )
755 Q3WorldRayPick_GetData (
756     TQ3PickObject                 pick,
757     TQ3WorldRayPickData           *data
758 );
759 
760 
761 
762 /*!
763  *  @function
764  *      Q3WorldRayPick_SetData
765  *  @discussion
766  *      Set the data of a world-ray pick object.
767  *
768  *  @param pick             The pick object to update.
769  *  @param data             The new data for the pick object.
770  *  @result                 Success or failure of the operation.
771  */
772 Q3_EXTERN_API_C ( TQ3Status  )
773 Q3WorldRayPick_SetData (
774     TQ3PickObject                 pick,
775     const TQ3WorldRayPickData     *data
776 );
777 
778 
779 
780 /*!
781  *  @function
782  *      Q3ShapePart_GetType
783  *  @discussion
784  *      Get the type of a shape part object.
785  *
786  *  @param shapePartObject  The shape part to query.
787  *  @result                 The type of the shape part.
788  */
789 Q3_EXTERN_API_C ( TQ3ObjectType  )
790 Q3ShapePart_GetType (
791     TQ3ShapePartObject            shapePartObject
792 );
793 
794 
795 
796 /*!
797  *  @function
798  *      Q3MeshPart_GetType
799  *  @discussion
800  *      Get the type of a mesh part object.
801  *
802  *      Returns kQ3MeshPartTypeMeshFacePart, kQ3MeshPartTypeMeshEdgePart,
803  *      or kQ3MeshPartTypeMeshVertexPart. If the type can not be determined,
804  *      returns kQ3ObjectTypeInvalid.
805  *
806  *  @param meshPartObject   The mesh part to query.
807  *  @result                 The type of the mesh part.
808  */
809 Q3_EXTERN_API_C ( TQ3ObjectType  )
810 Q3MeshPart_GetType (
811     TQ3MeshPartObject             meshPartObject
812 );
813 
814 
815 
816 /*!
817  *  @function
818  *      Q3ShapePart_GetShape
819  *  @discussion
820  *      Get the shape object that contains a shape part object.
821  *
822  *  @param shapePartObject  The shape part to query.
823  *  @param shapeObject      Receives the shape object that contains shapePartObject.
824  *  @result                 Success or failure of the operation.
825  */
826 Q3_EXTERN_API_C ( TQ3Status  )
827 Q3ShapePart_GetShape (
828     TQ3ShapePartObject            shapePartObject,
829     TQ3ShapeObject                *shapeObject
830 );
831 
832 
833 
834 /*!
835  *  @function
836  *      Q3MeshPart_GetComponent
837  *  @discussion
838  *      Get the mesh component that contains a mesh part object.
839  *
840  *  @param meshPartObject   The mesh part to query.
841  *  @param component        Receives the mesh component that contains meshPartObject.
842  *  @result                 Success or failure of the operation.
843  */
844 Q3_EXTERN_API_C ( TQ3Status  )
845 Q3MeshPart_GetComponent (
846     TQ3MeshPartObject             meshPartObject,
847     TQ3MeshComponent              *component
848 );
849 
850 
851 
852 /*!
853  *  @function
854  *      Q3MeshFacePart_GetFace
855  *  @discussion
856  *      Get the mesh face that corresponds to a mesh face part.
857  *
858  *  @param meshFacePartObject    The mesh face to query.
859  *  @param face                  Receives the mesh face that corresponds to meshFacePartObject.
860  *  @result                      Success or failure of the operation.
861  */
862 Q3_EXTERN_API_C ( TQ3Status  )
863 Q3MeshFacePart_GetFace (
864     TQ3MeshFacePartObject         meshFacePartObject,
865     TQ3MeshFace                   *face
866 );
867 
868 
869 
870 /*!
871  *  @function
872  *      Q3MeshEdgePart_GetEdge
873  *  @discussion
874  *      Get the mesh edge that corresponds to a mesh edge part.
875  *
876  *  @param meshEdgePartObject    The mesh edge to query.
877  *  @param edge                  Receives the mesh edge that corresponds to meshEdgePartObject.
878  *  @result                      Success or failure of the operation.
879  */
880 Q3_EXTERN_API_C ( TQ3Status  )
881 Q3MeshEdgePart_GetEdge (
882     TQ3MeshEdgePartObject         meshEdgePartObject,
883     TQ3MeshEdge                   *edge
884 );
885 
886 
887 
888 /*!
889  *  @function
890  *      Q3MeshVertexPart_GetVertex
891  *  @discussion
892  *      Get the mesh vertex that corresponds to a mesh vertex part.
893  *
894  *  @param meshVertexPartObject    The mesh vertex to query.
895  *  @param vertex                  Receives the mesh vertex that corresponds to meshVertedPartObject.
896  *  @result                        Success or failure of the operation.
897  */
898 Q3_EXTERN_API_C ( TQ3Status  )
899 Q3MeshVertexPart_GetVertex (
900     TQ3MeshVertexPartObject       meshVertexPartObject,
901     TQ3MeshVertex                 *vertex
902 );
903 
904 
905 
906 
907 
908 //=============================================================================
909 //      C++ postamble
910 //-----------------------------------------------------------------------------
911 #ifdef __cplusplus
912 }
913 #endif
914 
915 #endif
916 
917 
918