File: JOYAxes3D.h

package info (click to toggle)
sameboy 1.0.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,632 kB
  • sloc: ansic: 29,954; objc: 22,249; asm: 1,424; pascal: 1,373; makefile: 1,064; xml: 111
file content (26 lines) | stat: -rw-r--r-- 579 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#import <Foundation/Foundation.h>
#import "JOYInput.h"

typedef enum {
    JOYAxes3DUsageNone,
    JOYAxes3DUsageAcceleration,
    JOYAxes3DUsageOrientation,
    JOYAxes3DUsageGyroscope,
    JOYAxes3DUsageNonGenericMax,
    
    JOYAxes3DUsageGeneric0 = 0x10000,
} JOYAxes3DUsage;

typedef struct {
    double x, y, z;
} JOYPoint3D;

@interface JOYAxes3D : JOYInput
+ (NSString *)usageToString: (JOYAxes3DUsage) usage;
- (JOYPoint3D)rawValue;
- (JOYPoint3D)normalizedValue; // For orientation
- (JOYPoint3D)gUnitsValue; // For acceleration
@property JOYAxes3DUsage usage;
@end