From 64c89ab53447a004002ec0b0db94fd0a1e632cf6 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 28 Jan 2018 22:20:49 +0000 Subject: POC driver --- ofxHelios/example/src/main.cpp | 12 ++++ ofxHelios/example/src/ofApp.cpp | 123 ++++++++++++++++++++++++++++++++++++++++ ofxHelios/example/src/ofApp.h | 25 ++++++++ 3 files changed, 160 insertions(+) create mode 100644 ofxHelios/example/src/main.cpp create mode 100644 ofxHelios/example/src/ofApp.cpp create mode 100644 ofxHelios/example/src/ofApp.h (limited to 'ofxHelios/example/src') diff --git a/ofxHelios/example/src/main.cpp b/ofxHelios/example/src/main.cpp new file mode 100644 index 0000000..fc3ded3 --- /dev/null +++ b/ofxHelios/example/src/main.cpp @@ -0,0 +1,12 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main( ){ + ofSetupOpenGL(1024,1024,OF_WINDOW); + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp( new testApp()); + +} diff --git a/ofxHelios/example/src/ofApp.cpp b/ofxHelios/example/src/ofApp.cpp new file mode 100644 index 0000000..e629ae0 --- /dev/null +++ b/ofxHelios/example/src/ofApp.cpp @@ -0,0 +1,123 @@ +#include "ofApp.h" + +int MAX_POINTS=30000; +int NUM_POINTS=1024; +int LASER_INTENSITY=37; + +//-------------------------------------------------------------- +void testApp::setup(){ + laser.set_pts(MAX_POINTS); + laser.set_intensity(LASER_INTENSITY); +} + +//-------------------------------------------------------------- +void testApp::update(){ + ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)); + +} + +//-------------------------------------------------------------- +void testApp::draw(){ + ofBackground(0); + ofSetColor(255,255,255); +/* + if (line.size()){ + current++; + } + ofPolyline todraw; + for (int i=max(0,min(current,(int)line.size())) ;i