Permalink
Browse files

Merge branch 'master' of github.com:Kajakklubben/48pixels

Conflicts:
	code/testApp.cpp
  • Loading branch information...
2 parents fabf04d + e02acf4 commit 7ad8ed5cb01c8644059f1cdd8693a05c928fa139 @timgarbos timgarbos committed Apr 20, 2012
Showing with 41 additions and 3 deletions.
  1. +4 −2 code/testApp.cpp
  2. +14 −0 code/tracker.cpp
  3. +22 −0 code/tracker.h
  4. +1 −1 osx/Project.xcconfig
View
@@ -2,7 +2,7 @@
//--------------------------------------------------------------
void testApp::setup(){
-
+ tracker.setup();
ofBackground(255,255,255);
ofSetWindowTitle("graphics example");
ofSetFrameRate(60);
@@ -12,11 +12,13 @@ void testApp::setup(){
//--------------------------------------------------------------
void testApp::update(){
game.update(1);
+ tracker.update();
}
//--------------------------------------------------------------
void testApp::draw(){
game.draw();
+ tracker.drawDebug();
}
//--------------------------------------------------------------
@@ -62,4 +64,4 @@ void testApp::gotMessage(ofMessage msg){
//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
-}
+}
View
@@ -0,0 +1,14 @@
+#include "tracker.h"
+
+void Tracker::setup(){
+ videoGrabber.initGrabber(640, 480);
+}
+
+void Tracker::update(){
+ videoGrabber.update();
+}
+
+void Tracker::drawDebug(){
+ videoGrabber.draw(0, 0, 640, 480);
+}
+
View
@@ -2,7 +2,29 @@
#include "ofxOpenCv.h"
+enum BlockColor {
+ BlockRed,
+ BlockPoo
+};
+
+struct Block {
+ BlockColor color;
+ bool invalid;
+};
+
+
+//--------
+
class Tracker {
+
+public:
+ void setup();
+ void update();
+ void drawDebug();
+ Block blocks[8][6];
+
+private:
+ ofVideoGrabber videoGrabber;
};
View
@@ -6,4 +6,4 @@ OF_PATH = ../../..
#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
OTHER_LDFLAGS = $(OF_CORE_LIBS)
-HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
+HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) $(OF_PATH)/addons/ofxOpenCv/src $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include/opencv

0 comments on commit 7ad8ed5

Please sign in to comment.