ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / Examples / iPhone / FreeFlight / Classes / EAGLView.h
diff --git a/mardrone/ARDrone_SDK_Version_1_8_20110726/Examples/iPhone/FreeFlight/Classes/EAGLView.h b/mardrone/ARDrone_SDK_Version_1_8_20110726/Examples/iPhone/FreeFlight/Classes/EAGLView.h
new file mode 100644 (file)
index 0000000..450b0e4
--- /dev/null
@@ -0,0 +1,42 @@
+//
+//  EAGLView.h
+//  FreeFlight
+//
+//  Created by Frédéric D'HAEYER on 16/10/09.
+//  Copyright Parrot SA 2009. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+
+#import "ESRenderer.h"
+#import "ARDrone.h"
+
+// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
+// The view content is basically an EAGL surface you render your OpenGL scene into.
+// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
+@interface EAGLView : UIView 
+{    
+@private
+       id <ESRenderer> renderer;
+       
+       BOOL animating;
+       NSInteger animationFrameInterval;
+       // Use of the CADisplayLink class is the preferred method for controlling your animation timing.
+       // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop.
+       // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink
+       // isn't available.
+    NSTimer *animationTimer;
+       
+       ARDrone *drone;
+}
+
+@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
+@property (nonatomic) NSInteger animationFrameInterval;
+
+//- (id) initWithCoder:(NSCoder*)coder;
+- (id) initWithFrame:(CGRect)frame;
+- (void) setDrone:(ARDrone*)drone;
+- (void) changeState:(BOOL)inGame;
+- (void) drawView;
+@end