RSS

(root)/iphone/common : 61 : Jigs/source/JigView.h

« back to all changes in this revision

Viewing changes to Jigs/source/JigView.h

Dömötör Gulyás
2010-01-18 09:03:51
Revision ID: dognotdog@gmail.com-20100118080351-ib2knxvk4w8ssw3h
made common a nested tree

Show diffs side-by-side

added added

removed removed

1
 
//
2
 
//  JigView.h
3
 
//  Jigs
4
 
//
5
 
//  Created by döme on 03.08.2009.
6
 
//  Copyright 2009 __MyCompanyName__. All rights reserved.
7
 
//
8
 
 
9
 
#import "GLESView.h"
10
 
 
11
 
#import "chipmunk.h"
12
 
 
13
 
@class ESShader, JigsawPiece;
14
 
 
15
 
@interface JigView : GLESView
16
 
{
17
 
        GLuint          imageTexture;
18
 
        GLuint          whiteTexture;
19
 
        GLuint          blackGradientTexture;
20
 
        GLuint          whiteGradientTexture;
21
 
        GLuint          moveIconTexture;
22
 
        GLuint          scaleIconTexture;
23
 
        GLuint          rotateIconTexture;
24
 
 
25
 
        ESShader*       jigsawShader;
26
 
        CGSize          imageSize;
27
 
        
28
 
        //NSMutableArray*       pieceVertexArrays;
29
 
        NSMutableArray* jigsawPieces;
30
 
        
31
 
        JigsawPiece*    selectedPiece;
32
 
        
33
 
        UITouch*                initialTouch;
34
 
        UITouch*                secondaryTouch;
35
 
        
36
 
        CGPoint                 rotationTouchLastVector;
37
 
        float                   rotationTouchInitialAngle;
38
 
        float                   oneTouchRotationAccumulator;
39
 
        CGPoint                 oneTouchRotationDelta;
40
 
        CGPoint                 oneTouchRotationCenter;
41
 
        float                   oneTouchRotationCirclelation;
42
 
        
43
 
        float                   oneTouchRotationThreshold;
44
 
        float                   oneTouchRotationFactor;
45
 
        
46
 
        CGPoint                 zoomTouchReference;
47
 
        float                   zoomTouchAccumulator;
48
 
        float                   nonZoomTouchAccumulator;
49
 
        float                   zoomTouchThreshold;
50
 
        float                   zoomFactor;     
51
 
        CGPoint                 zoomCenter;
52
 
        
53
 
        float                   targetGhostSize;
54
 
        float                   pieceSize;
55
 
 
56
 
        cpSpace*                space;
57
 
        cpBody*                 staticBody;
58
 
        cpBody*                 mouseBody;
59
 
        cpPinJoint*             mouseConstraint;
60
 
        
61
 
        BOOL                    piecesChangedSinceLastRedraw;
62
 
        
63
 
        NSLock*                 jigsawLock;
64
 
}
65
 
 
66
 
- (int) numCellsForImageSize: (float) imgSize density: (float) density;
67
 
 
68
 
- (void) piecesChanged;
69
 
- (void) animationCallback: (id) info;
70
 
 
71
 
- (void) generateJigsaw;
72
 
 
73
 
- (void) saveJigsawState;
74
 
- (void) restoreJigsawState;
75
 
 
76
 
 
77
 
@end

Loggerhead 1.17 is a web-based interface for Bazaar branches