//
//  ApollonianViewer.h
//  Apollonian Viewer
//
//  Created by Kean on 5/4/12.
//  Copyright 2012 Autodesk. All rights reserved.
//

#import "isgl3d.h"

@interface ApollonianViewer : Isgl3dBasic3DView
{
  @private

  NSMutableArray * _materials;	
  Isgl3dNode * _container;
  Isgl3dSphere * _sphereMesh;

  bool _preSpin;
  bool _paused;
  float _rotation;
  bool _spinAroundY;
  int _spinIncrement;
  
  int _initialSpinAmount;
  
  UITapGestureRecognizer * _tapGestureRecognizer;
  UISwipeGestureRecognizer * _swipeLeftGestureRecognizer;
  UISwipeGestureRecognizer * _swipeRightGestureRecognizer;
  UISwipeGestureRecognizer * _swipeUpGestureRecognizer;
  UISwipeGestureRecognizer * _swipeDownGestureRecognizer;
  UIPinchGestureRecognizer *_pinchGestureRecognizer;
  UIRotationGestureRecognizer *_rotationGestureRecognizer;
}
-(void)createSphere
  :(double)radius
  x:(double)x y:(double)y z:(double)z
  level:(int)level;
@end

@interface ApollonianViewer () <UIGestureRecognizerDelegate>
- (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer;
- (void)swipeGesture:(UISwipeGestureRecognizer *)gestureRecognizer;
- (void)pinchGesture:(UIPinchGestureRecognizer *)gestureRecognizer;
- (void)rotationGesture:(UIRotationGestureRecognizer *)gestureRecognizer;
@end