Subversion Repositories Mobile Apps.GyroMouse

Rev

Rev 1 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 5
Line 44... Line 44...
44
    var gravX: Double?
44
    var gravX: Double?
45
    var gravY: Double?
45
    var gravY: Double?
46
    var gravZ: Double?
46
    var gravZ: Double?
47
    var rotatX: Double?
47
    var rotatX: Double?
48
    var rotatZ: Double?
48
    var rotatZ: Double?
49
    //var pitch: Double?
-
 
50
    //var yaw: Double?
-
 
51
    var accX: Double?
49
    var accX: Double?
52
    var accY: Double?
50
    var accY: Double?
53
    var accZ: Double?
51
    var accZ: Double?
54
    
52
    
55
    var roll: Double?
53
    var roll: Double?
Line 75... Line 73...
75
            scrollVelocity = aDecoder.decodeDouble(forKey: "scrollVelocity")
73
            scrollVelocity = aDecoder.decodeDouble(forKey: "scrollVelocity")
76
            fallthrough
74
            fallthrough
77
        case .movement:
75
        case .movement:
78
            rotatX = aDecoder.decodeDouble(forKey: "rotatX")
76
            rotatX = aDecoder.decodeDouble(forKey: "rotatX")
79
            rotatZ = aDecoder.decodeDouble(forKey: "rotatZ")
77
            rotatZ = aDecoder.decodeDouble(forKey: "rotatZ")
80
            //pitch = aDecoder.decodeDoubleForKey("pitch")
-
 
81
            //yaw = aDecoder.decodeDoubleForKey("yaw")
-
 
82
            gravX = aDecoder.decodeDouble(forKey: "gravX")
78
            gravX = aDecoder.decodeDouble(forKey: "gravX")
83
            gravY = aDecoder.decodeDouble(forKey: "gravY")
79
            gravY = aDecoder.decodeDouble(forKey: "gravY")
84
            gravZ = aDecoder.decodeDouble(forKey: "gravZ")
80
            gravZ = aDecoder.decodeDouble(forKey: "gravZ")
85
            accX = aDecoder.decodeDouble(forKey: "accX")
81
            accX = aDecoder.decodeDouble(forKey: "accX")
86
            accY = aDecoder.decodeDouble(forKey: "accY")
82
            accY = aDecoder.decodeDouble(forKey: "accY")
Line 113... Line 109...
113
            fallthrough
109
            fallthrough
114
        case .movement:
110
        case .movement:
115
            aCoder.encode(gravX!, forKey: "gravX")
111
            aCoder.encode(gravX!, forKey: "gravX")
116
            aCoder.encode(gravY!, forKey: "gravY")
112
            aCoder.encode(gravY!, forKey: "gravY")
117
            aCoder.encode(gravZ!, forKey: "gravZ")
113
            aCoder.encode(gravZ!, forKey: "gravZ")
118
            //aCoder.encodeDouble(pitch!, forKey: "pitch")
-
 
119
            //aCoder.encodeDouble(yaw!, forKey: "yaw")
-
 
120
            aCoder.encode(rotatX!, forKey: "rotatX")
114
            aCoder.encode(rotatX!, forKey: "rotatX")
121
            aCoder.encode(rotatZ!, forKey: "rotatZ")
115
            aCoder.encode(rotatZ!, forKey: "rotatZ")
122
            aCoder.encode(accX!, forKey: "accX")
116
            aCoder.encode(accX!, forKey: "accX")
123
            aCoder.encode(accY!, forKey: "accY")
117
            aCoder.encode(accY!, forKey: "accY")
124
            aCoder.encode(accZ!, forKey: "accZ")
118
            aCoder.encode(accZ!, forKey: "accZ")