Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 18 - QuickDraw 3D Pointing Device Manager


Summary of the QuickDraw 3D Pointing Device Manager

C Summary

Constants

#define kQ3ControllerSetChannelMaxDataSize      256

Data Types

Controller Data Types

typedef struct TQ3ControllerData {
   char                       *signature;
   unsigned long              valueCount;
   unsigned long              channelCount;
   TQ3ChannelGetMethod        channelGetMethod;
   TQ3ChannelSetMethod        channelSetMethod;
} TQ3ControllerData;
typedef void                                 *TQ3ControllerRef;

QuickDraw 3D Pointing Device Manager Routines

Creating and Managing Controllers

TQ3ControllerRef Q3Controller_New (
const TQ3ControllerData *controllerData);
TQ3Status Q3Controller_GetListChanged (
TQ3Boolean *listChanged, 
unsigned long *serialNumber);
TQ3Status Q3Controller_Next(TQ3ControllerRef controllerRef, 
TQ3ControllerRef *nextControllerRef);
TQ3Status Q3Controller_Decommission (
TQ3ControllerRef controllerRef);
TQ3Status Q3Controller_GetActivation (
TQ3ControllerRef controllerRef, 
TQ3Boolean *active);
TQ3Status Q3Controller_SetActivation (
TQ3ControllerRef controllerRef, 
TQ3Boolean active);
TQ3Status Q3Controller_GetSignature (
TQ3ControllerRef controllerRef, 
char *signature, 
unsigned long numChars);
TQ3Status Q3Controller_GetChannel (
TQ3ControllerRef controllerRef, 
unsigned long channel, 
void *data, 
unsigned long *dataSize);
TQ3Status Q3Controller_SetChannel (
TQ3ControllerRef controllerRef, 
unsigned long channel, 
const void *data, 
unsigned long dataSize);
TQ3Status Q3Controller_GetValueCount (
TQ3ControllerRef controllerRef, 
unsigned long *valueCount);
TQ3Status Q3Controller_SetTracker (
TQ3ControllerRef controllerRef, 
TQ3TrackerObject tracker);
TQ3Status Q3Controller_HasTracker (
TQ3ControllerRef controllerRef, 
TQ3Boolean *hasTracker);
TQ3Status Q3Controller_Track2DCursor (
TQ3ControllerRef controllerRef, 
TQ3Boolean *track2DCursor);
TQ3Status Q3Controller_Track3DCursor (
TQ3ControllerRef controllerRef, 
TQ3Boolean *track3DCursor);
TQ3Status Q3Controller_GetButtons (
TQ3ControllerRef controllerRef, 
unsigned long *buttons);
TQ3Status Q3Controller_SetButtons (
TQ3ControllerRef controllerRef, 
unsigned long buttons);
TQ3Status Q3Controller_GetTrackerPosition (
TQ3ControllerRef controllerRef, 
TQ3Point3D *position);
TQ3Status Q3Controller_SetTrackerPosition (
TQ3ControllerRef controllerRef, 
const TQ3Point3D *position);
TQ3Status Q3Controller_MoveTrackerPosition (
TQ3ControllerRef controllerRef, 
const TQ3Vector3D *delta);
TQ3Status Q3Controller_GetTrackerOrientation (
TQ3ControllerRef controllerRef, 
TQ3Quaternion *orientation);
TQ3Status Q3Controller_SetTrackerOrientation (
TQ3ControllerRef controllerRef, 
const TQ3Quaternion *orientation);
TQ3Status Q3Controller_MoveTrackerOrientation (
TQ3ControllerRef controllerRef, 
const TQ3Quaternion *delta);
TQ3Status Q3Controller_GetValues (
TQ3ControllerRef controllerRef, 
unsigned long valueCount, 
float *values, 
TQ3Boolean *changed, 
unsigned long *serialNumber);
TQ3Status Q3Controller_SetValues (
TQ3ControllerRef controllerRef, 
const float *values, 
unsigned long valueCount);

Managing Controller States

TQ3ControllerStateObject Q3ControllerState_New (
TQ3ControllerRef controllerRef);
TQ3Status Q3ControllerState_SaveAndReset (
TQ3ControllerStateObject controllerStateObject);
TQ3Status Q3ControllerState_Restore (
TQ3ControllerStateObject controllerStateObject);

Creating and Managing Trackers

TQ3TrackerObject Q3Tracker_New(TQ3TrackerNotifyFunc notifyFunc);
TQ3Status Q3Tracker_GetNotifyThresholds (
TQ3TrackerObject trackerObject, 
float *positionThresh, 
float *orientationThresh);
TQ3Status Q3Tracker_SetNotifyThresholds (
TQ3TrackerObject trackerObject, 
float positionThresh, 
float orientationThresh);
TQ3Status Q3Tracker_GetActivation (
TQ3TrackerObject trackerObject, 
TQ3Boolean *active);
TQ3Status Q3Tracker_SetActivation (
TQ3TrackerObject trackerObject, 
TQ3Boolean active);
TQ3Status Q3Tracker_GetEventCoordinates (
TQ3TrackerObject trackerObject, 
unsigned long timeStamp, 
unsigned long *buttons, 
TQ3Point3D *position, 
TQ3Quaternion *orientation);
TQ3Status Q3Tracker_SetEventCoordinates (
TQ3TrackerObject trackerObject, 
unsigned long timeStamp, 
unsigned long buttons, 
const TQ3Point3D *position, 
const TQ3Quaternion *orientation);
TQ3Status Q3Tracker_GetButtons(TQ3TrackerObject trackerObject, 
unsigned long *buttons);
TQ3Status Q3Tracker_ChangeButtons (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef, 
unsigned long buttons, 
unsigned long buttonMask);
TQ3Status Q3Tracker_GetPosition (
TQ3TrackerObject trackerObject, 
TQ3Point3D *position, 
TQ3Vector3D *delta, 
TQ3Boolean *changed, 
unsigned long *serialNumber);
TQ3Status Q3Tracker_SetPosition (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef, 
const TQ3Point3D *position);
TQ3Status Q3Tracker_MovePosition (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef, 
const TQ3Vector3D *delta);
TQ3Status Q3Tracker_GetOrientation (
TQ3TrackerObject trackerObject, 
TQ3Quaternion *orientation, 
TQ3Quaternion *delta, 
TQ3Boolean *changed, 
unsigned long *serialNumber);
TQ3Status Q3Tracker_SetOrientation (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef, 
const TQ3Quaternion *orientation);
TQ3Status Q3Tracker_MoveOrientation (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef, 
const TQ3Quaternion *delta);

Application-Defined Routines

typedef TQ3Status (*TQ3ChannelGetMethod) (
TQ3ControllerRef controllerRef, 
unsigned long channel, 
void *data, 
unsigned long *dataSize);
typedef TQ3Status (*TQ3ChannelSetMethod) (
TQ3ControllerRef controllerRef, 
unsigned long channel, 
const void *data, 
unsigned long dataSize);
typedef TQ3Status (*TQ3TrackerNotifyFunc) (
TQ3TrackerObject trackerObject, 
TQ3ControllerRef controllerRef);


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help