Commits

Cliff Biffle committed 733cdf0

Removed the KVSpaceModel protocol.

Comments (0)

Files changed (5)

 
 #import "types.h"
 
-@protocol KVSpaceModel;
+@class KVRenderer;
 
 typedef struct {
   vec3f_t pos;
   NSColor *deviceWhite;  
 }
 
-@property(retain) id <KVSpaceModel> spaceModel;
+@property(retain) KVRenderer *spaceModel;
 
 @property(assign) BOOL frozen;
 @property(assign, nonatomic) BOOL anaglyph;
  */
 
 #import "KVDepthView.h"
-#import "KVSpaceModel.h"
 #import "KVRenderer.h"
 #import "KVDepthRecorder.h"
 #import "trackball.h"
 
 #import <Cocoa/Cocoa.h>
 
-#import "KVSpaceModel.h"
 #import "types.h"
 
 // Projects depth and color data into 3D space, starting from
 // scratch at each frame and describing only the nearest visible
 // surfaces.
-@interface KVRenderer : NSObject <KVSpaceModel> {
+@interface KVRenderer : NSObject {
   // Memoized linearization function for 12-bit depth samples.
   float linearizationTable[2048];
 
   uint16_t depthImage[480][640];
 }
 
+// Called within an active GL context to allocate any resources.
+- (void) initGL;
+
+// Most recent frame of depth samples, in the format generated by
+// KVDataSource.  Note that the setter will either make an internal
+// copy of this or simply use it to update an internal model.
+- (void) setDepthSamples: (NSData *) depthSamples;
+
+// Most recent frame of depth samples, in the format generated by
+// KVDataSource.  Note that the setter will either make an internal
+// copy of this or simply use it to update an internal model.
+- (void) setColorSamples: (NSData *) colorSamples;
+
+- (void) drawInCurrentOpenGLContextWithOptions: (NSDictionary *) options;
+
 @end
 
 extern NSString * const KVPolygonMode;

KVSpaceModel.h

-/*
- * Copyright 2010 Cliff L. Biffle.  All Rights Reserved.
- * Use of this source code is governed by the Apache License 2.0,
- * which can be found in the LICENSE file.
- */
-
-#import <Cocoa/Cocoa.h>
-
-// Transforms raw camera depth and color information into a model
-// of the scene, and translates that model into something visible
-// through OpenGL.
-@protocol KVSpaceModel <NSObject>
-
-// Called within an active GL context to allocate any resources.
-- (void) initGL;
-
-// Most recent frame of depth samples, in the format generated by
-// KVDataSource.  Note that the setter will either make an internal
-// copy of this or simply use it to update an internal model.
-- (void) setDepthSamples: (NSData *) depthSamples;
-
-// Most recent frame of depth samples, in the format generated by
-// KVDataSource.  Note that the setter will either make an internal
-// copy of this or simply use it to update an internal model.
-- (void) setColorSamples: (NSData *) colorSamples;
-
-- (void) drawInCurrentOpenGLContextWithOptions: (NSDictionary *) options;
-
-@end

KinectViewer.xcodeproj/project.pbxproj

 		C70E6690129C8FD5004A44B3 /* libusb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = libusb.h; sourceTree = "<group>"; };
 		C70E669F129C9005004A44B3 /* libdriver.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libdriver.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		C70E66C9129C9121004A44B3 /* libusb-1.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libusb-1.0.dylib"; path = "usr/local/lib/libusb-1.0.dylib"; sourceTree = SDKROOT; };
-		C758081A12A4C22400391C33 /* KVSpaceModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KVSpaceModel.h; sourceTree = "<group>"; };
 		C758083212A4C46700391C33 /* KVRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KVRenderer.h; sourceTree = "<group>"; };
 		C758083312A4C46700391C33 /* KVRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KVRenderer.m; sourceTree = "<group>"; };
 		C7759B3F12A8B1EB003479EF /* KVDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KVDataSource.h; sourceTree = "<group>"; };
 		C7F36B8812A19EBD00EBC3AB /* Model */ = {
 			isa = PBXGroup;
 			children = (
-				C758081A12A4C22400391C33 /* KVSpaceModel.h */,
 				C758083212A4C46700391C33 /* KVRenderer.h */,
 				C758083312A4C46700391C33 /* KVRenderer.m */,
 			);