Permalink
Browse files

Initial commit

  • Loading branch information...
1 parent f24e721 commit fb11651ead82a07166a580e1235ff1ca6781ff9d @HalfdanJ committed Oct 3, 2012
View
@@ -0,0 +1,3 @@
+[submodule "ofxCocoaPlugins"]
+ path = ofxCocoaPlugins
+ url = git@github.com:HalfdanJ/ofxCocoaPlugins.git
View
@@ -0,0 +1,5 @@
+//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
+//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
+
+OFX_PATH = $(SOURCE_ROOT)/ofxCocoaPlugins/
+#include "./ofxCocoaPlugins/ofxCocoaPlugins/ConfigInclude.xcconfig"

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,17 @@
+//
+// AppDelegate.h
+// DEW
+//
+// Created by Admin on 26/03/12.
+
+#import <ofxCocoaPlugins/ofxCocoaPlugins.h>
+#import <Cocoa/Cocoa.h>
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>{
+ ofxCocoaPlugins *ocp;
+ NSWindow * window;
+}
+
+@property (assign) IBOutlet NSWindow *window;
+
+@end
@@ -0,0 +1,42 @@
+//
+// AppDelegate.m
+// DEW
+//
+// Created by Admin on 26/03/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+#import "Test.h"
+
+@implementation AppDelegate
+
+@synthesize window;
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ ocp = [[ofxCocoaPlugins alloc] initWithAppDelegate:self];
+ [ocp setNumberOutputviews:2];
+ [ocp addHeader:@"Setup"];
+ [ocp addPlugin:[[Keystoner alloc] initWithSurfaces:[NSArray arrayWithObjects:@"Floor", @"Wall", nil]] midiChannel:1];
+ [ocp addPlugin:[[Cameras alloc] initWithNumberCameras:1] midiChannel:1];
+ [ocp addPlugin:[[CameraCalibration alloc] init] midiChannel:1];
+ [ocp addPlugin:[[BlobTracker2d alloc] init] midiChannel:2];
+ [ocp addPlugin:[[Tracker alloc] init] midiChannel:2];
+ [ocp addPlugin:[[Midi alloc] init] midiChannel:2];
+// [ocp addPlugin:[[OSCControl alloc] init] midiChannel:3];
+
+ [ocp addHeader:@"DEW"];
+ [ocp addPlugin:[[Test alloc] init] midiChannel:12];
+
+ [ocp loadPlugins];
+
+}
+
+@end
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'DEW' target in the 'DEW' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
@@ -0,0 +1,9 @@
+#pragma once
+#import <ofxCocoaPlugins/Plugin.h>
+
+
+@interface Test : ofPlugin {
+
+}
+
+@end
@@ -0,0 +1,90 @@
+#import "Test.h"
+#import <ofxCocoaPlugins/Keystoner.h>
+
+@implementation Test
+
+-(void)initPlugin{
+ [self addPropF:@"whiteBack"];
+ [self addPropF:@"whiteFront"];
+ [self addPropF:@"grovKalibrering"];
+
+}
+
+//
+//----------------
+//
+
+
+-(void)setup{
+}
+
+//
+//----------------
+//
+
+
+-(void)update:(NSDictionary *)drawingInformation{
+}
+
+//
+//----------------
+//
+
+-(void)draw:(NSDictionary *)drawingInformation{
+ ofFill();
+ if(ViewNumber == 0){
+ if(PropF(@"whiteBack")){
+ ofSetColor(255, 255, 255);
+ ofRect(0, 0, 1, 1);
+
+ ofSetColor(0, 0, 0);
+ ApplySurface(@"Floor"){
+ ofSetLineWidth(10);
+ ofLine(0,-0.5,0,1.2);
+ ofLine(0.3333,-0.5,0.3333,1.2);
+ ofLine(0.66666,-0.5,0.66666,1.2);
+ ofLine(1,-0.5,1,1.2);
+ ofSetLineWidth(1);
+ } PopSurfaceWithoutSoftedge();
+ }
+
+
+
+ } else {
+ if(PropF(@"whiteFront")){
+ ofSetColor(255, 255, 255);
+ ofRect(0, 0, 1, 1);
+ }
+ }
+
+
+ if(PropF(@"grovKalibrering")){
+ if([GetPlugin(Keystoner) selectedOutputview] == ViewNumber){
+ int selProj = [GetPlugin(Keystoner) selectedProjector];
+ int numViews = 1;
+ if(ViewNumber == 0)
+ numViews = 3;
+
+ ApplySurface(@"Floor"){
+ ofSetColor(255, 0, 0);
+ ofRect(1.0/numViews*selProj, 0, 1.0/numViews, 1);
+ ofNoFill();
+ ofSetColor(255, 255, 255);
+ ofSetLineWidth(3);
+ ofRect(1.0/numViews*selProj, 0, 1.0/numViews, 1);
+ ofSetLineWidth(1);
+ ofFill();
+ } PopSurfaceWithoutSoftedge();
+ }
+ }
+
+}
+
+//
+//----------------
+//
+
+-(void)controlDraw:(NSDictionary *)drawingInformation{
+}
+
+@end
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1070</int>
+ <string key="IBDocument.SystemVersion">11C74</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1617</string>
+ <string key="IBDocument.AppKitVersion">1138.23</string>
+ <string key="IBDocument.HIToolboxVersion">567.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">1617</string>
+ </object>
+ <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSCustomView</string>
+ <string>NSUserDefaultsController</string>
+ <string>NSCustomObject</string>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">Test</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSCustomView" id="1005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomView" id="15891041">
+ <reference key="NSNextResponder" ref="1005"/>
+ <int key="NSvFlags">-2147483380</int>
+ <string key="NSFrame">{{0, 89}, {340, 292}}</string>
+ <reference key="NSSuperview" ref="1005"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:499</string>
+ <string key="NSClassName">PluginOpenGLControlView</string>
+ </object>
+ </object>
+ <string key="NSFrameSize">{537, 381}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
+ <reference key="NSNextKeyView" ref="15891041"/>
+ <string key="NSClassName">NSView</string>
+ </object>
+ <object class="NSUserDefaultsController" id="565373534">
+ <bool key="NSSharedInstance">YES</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">2</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">controlGlView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="15891041"/>
+ </object>
+ <int key="connectionID">176</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="15891041"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">55</int>
+ <reference key="object" ref="565373534"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">175</int>
+ <reference key="object" ref="15891041"/>
+ <reference key="parent" ref="1005"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>1.IBPluginDependency</string>
+ <string>175.IBPluginDependency</string>
+ <string>55.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <reference key="dict.values" ref="0"/>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">330</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">PluginOpenGLControlView</string>
+ <string key="superclassName">NSOpenGLView</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/PluginOpenGLControlView.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
Oops, something went wrong.

0 comments on commit fb11651

Please sign in to comment.