00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #import <UIKit/UIKit.h>
00027 #import <QuartzCore/QuartzCore.h>
00028
00029 #import "sgDebug.h"
00030 #import "sgRenderer.h"
00031 #import "sgRendererES1.h"
00032 #import "sgRendererES2.h"
00033 #import "sgTouches.h"
00034 #import "sgAccelerometer.h"
00035 #import "sgEvents.h"
00036 #import "sgAction.h"
00037 #import "sgEntity.h"
00038
00042 @interface sgView : UIView <UIAccelerometerDelegate>
00043 {
00044 @public
00049 sgRenderer *renderer;
00050
00055 sgEntity *first_ent;
00056
00061 sgEvents *eventhandler;
00062
00063 @private
00064 BOOL animating;
00065 NSInteger animationFrameInterval;
00066 id displayLink;
00067
00068 NSTimeInterval lastDrawTime;
00069 NSTimeInterval timestep;
00070
00071 unsigned int orientation;
00072 }
00073
00074 @property (readonly, nonatomic, getter=isAnimating) BOOL animating;
00075 @property (nonatomic) NSInteger animationFrameInterval;
00076 @property (readonly, nonatomic) NSTimeInterval timestep;
00077 @property (readonly, nonatomic) sgRenderer *renderer;
00078 @property (readonly, nonatomic) sgEntity *first_ent;
00079 @property (readonly, nonatomic) sgEvents *eventhandler;
00080
00085 - (void)startAnimation;
00086
00091 - (void)stopAnimation;
00092
00097 - (void)drawView:(id)sender;
00098
00104 - (void)setOrientation:(unsigned int)interfaceOrientation;
00105
00106 @end