1. Cliff Biffle
  2. kinect-viewer

Commits

Cliff Biffle  committed 8c25cb9

Pinch-zoom gestures now dolly the camera in and out of the scene.

  • Participants
  • Parent commits 1dd892a
  • Branches default

Comments (0)

Files changed (1)

File KVDepthView.m

View file
  • Ignore whitespace
   }
 }
 
+- (void) magnifyWithEvent: (NSEvent *)theEvent {
+  float mag = (float) [theEvent magnification];
+  camera.pos.z += mag;
+  camera.target.z += mag;
+  [self updateProjection];
+  [self setNeedsDisplay: YES];
+}
+
 -(void)keyDown: (NSEvent *)theEvent
 {
   NSString *characters = [theEvent characters];