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/src/colourPolyline.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ofxHelios/src/colourPolyline.cpp (limited to 'ofxHelios/src/colourPolyline.cpp') diff --git a/ofxHelios/src/colourPolyline.cpp b/ofxHelios/src/colourPolyline.cpp new file mode 100644 index 0000000..24b1e00 --- /dev/null +++ b/ofxHelios/src/colourPolyline.cpp @@ -0,0 +1,40 @@ +#include "colourPolyline.h" + + +void colourPolyline::addVertex( float x, float y){ + addVertex(ofPoint(x,y)); +} + +void colourPolyline::addVertex( const ofPoint& p ){ + addVertex(p, ofColor(255,255,255)); +} + +void colourPolyline::addVertex( float x, float y, int r, int g, int b){ + addVertex(ofPoint(x,y),ofColor(r,g,b)); +} + +void colourPolyline::addVertex( const ofPoint& p , int r, int g, int b){ + addVertex(p,ofColor(r,g,b)); +} + +void colourPolyline::addVertex( const ofPoint& p , const ofColor& c){ + ofPolyline::addVertex(p); + pointColours.push_back(c); +} + + + +ofColor colourPolyline::getColourAt(int i){ + return pointColours[i]; +} + +void colourPolyline::draw(){ + for (int i=0;i