15 Constants

15 Hit Information Masks

You specify a hit information mask in the mask field of a pick data structure to indicate the type of information you want returned for the items in a hit list. When QuickDraw3D returns a hit list to you, it sets the bits in the validMask field of a hit data structure to indicate the types of information it is returning. The hit information masks correspond to the fields in the hit data structure. See "Hit Data Structure" on page 15-23 for a more complete description of the information these masks specify.

typedef enum TQ3PickDetailMasks {
 kQ3PickDetailNone                = 0,
 kQ3PickDetailMaskPickID                = 1 << 0,
 kQ3PickDetailMaskPath               = 1 << 1,
 kQ3PickDetailMaskObject               = 1 << 2,
 kQ3PickDetailMaskLocalToWorldMatrix                = 1 << 3,
 kQ3PickDetailMaskXYZ               = 1 << 4,
 kQ3PickDetailMaskDistance               = 1 << 5,
 kQ3PickDetailMaskNormal                = 1 << 6,
 kQ3PickDetailMaskShapePart               = 1 << 7
} TQ3PickDetailMasks;

Constant descriptions

kQ3PickDetailNone
No pick detail. This mask results in faster picking, because various calculations do not need to be performed.
kQ3PickDetailMaskPickID
The picking ID of the picked object.
kQ3PickDetailMaskPath
The path through the model's group hierarchy to the picked object.
kQ3PickDetailMaskObject
A reference to the object handle of the picked object.
kQ3PickDetailMaskLocalToWorldMatrix
The matrix that transforms the local coordinate system of the picked object to the world coordinate system. Note that the local-to-world transform matrix for a multiply-referenced object differs for each reference to the object.
kQ3PickDetailMaskXYZ
The point of intersection between the picked object and the pick geometry in world space.
kQ3PickDetailMaskDistance
The distance between the picked object and the origin of the pick geometry.
kQ3PickDetailMaskNormal
The surface normal of the picked object at the point of intersection with the pick geometry. The magnitude of this normal should always be normalized.
kQ3PickDetailMaskShapePart
The shape part object of the picked object.
Constant descriptions

3D Graphics Programming with QuickDraw 3D - 17 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker