Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Version: 1.0 Posted: 2003-01-14 Build Requirements: N/A Runtime Requirements: Carbon Download Sample (Picking_Mesh_ShapeParts.zip, 37.2K) |
||||
DescriptionPickMeshShapePart Sample Code This sample code illustrates how to implement shape part picking for the mesh geometry with the window point pick type. Description The style pickPart style and picking shapePart pick detail constructs allow an application to detect which part of a mesh has been hit. The default pickPart style is the kQ3PickPartsObject level which merely returns a hit if the pick intersects the mesh at any location. If the style's pick part kQ3PickPartsMaskFace/Edge/Vertex levels are set a reference to the shapePart is be returned. An example of this can be seen by selecting various items in the ShapeParts menu and clicking on different locations on the pentagon-shaped mesh. When one of these parts is picked the sample code briefly renders it in a different color. Selecting all pick parts and clicking on a point in the mesh corresponding to all of these will momentarily color each region of the mesh before progressing to the next intersected shape part. New Picking API for 1.5 This sample code is an improvement over an earlier version in that it also demonstrates the new mechanism in QuickDraw 3D 1.5 for getting pick detail information. The function HandleMeshPickHits() in PickMeshShapePart.c is coded to work either way. To experiment with the old and new APIs #define the QD3D_OBSOLETE preprocessor symbol in the PickMeshShapePart_Prefix.h prefix file to one (1) or zero (0), respectively. Note version 1.5 still supports the obsolete API but in the not too distant future obsolete API calls and their associated data structures will no longer be supported. So if your application currently uses the obsolete API get ready for this transition by switching over soon. Document Revision History
|
|