This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Some general ignore patterns | |
build/ | |
obj/ | |
*.o | |
Debug*/ | |
Release*/ | |
*.mode* | |
*.app/ | |
*.pyc | |
.svn/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone git://github.com/armadillu/ofxAnimatable.git; | |
git clone git://github.com/yuichi1004/ofxAnimationKit.git; | |
git clone git://github.com/alinakipoglu/ofxAssimpNISync.git; | |
git clone git://github.com/alinakipoglu/ofxAssimpOpenNISkeletonSync.git; | |
git clone git://github.com/after12am/ofxBoids.git; | |
git clone git://github.com/diasbruno/ofxCompositeMotion.git; | |
git clone git://github.com/paulobarcelos/ofxDisplayStackObject.git; | |
git clone git://github.com/satoruhiga/ofxEasingFunc.git; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// This is a recipe from the O'Reilly Safari Cookbook | |
/// http://safari.oreilly.com/0596007612/cplusplusckbk-CHP-11-SECT-5 | |
/// Usage: | |
/// vector<int> v; | |
/// computeStats(v.begin( ), v.end( ), sum, mean, var, dev, skew, kurt); | |
#pragma once |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// useful for projection alignment, etc: | |
// http://i.imgur.com/rWJLE.jpg | |
int nbOfCol = ofGetWidth() / 25; | |
int boardWidth = ofGetWidth(); | |
int boardHeight = ofGetHeight(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// medianFilter filter; | |
// filter.addValue(5); | |
// filter.addValue(3); | |
// filter.addValue(2); | |
// filter.addValue(100); | |
// filter.addValue(9); | |
// Serial.println(filter.getMedian()); | |
// | |
// filter.addValue(100); | |
// Serial.println(filter.getMedian()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// was noticing sin(ofGetElapsedTimef()) gets crunchy at some point, because of lower resolution in sin / cos. here's an alternative function that seems to help... not tested for speed. | |
float ofGetElapsedTimeForSin(){ | |
long long timeNow = ofGetElapsedTimeMillis(); | |
long long modForTwoPi = (int)(TWO_PI*1000.0); | |
return ((float)(timeNow % modeForTwoPi)/1000.0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in main.cpp | |
ofAppGLFWWindow w; | |
ofSetupOpenGL(&w, 1024,432,OF_WINDOW); // <-------- setup the GL context | |
testApp * app = new testApp(); | |
app->WINDOW = &w; | |
ofRunApp(app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
void testApp::draw(){ | |
glEnable(GL_DEPTH_TEST); | |
ofEnableLighting(); | |
ofLight light; | |
light.setPosition(ofPoint(-200,0, -1000)); | |
light.lookAt( ofPoint(-1000,0,0)); | |
light.setDirectional(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in .h file: | |
ofNode a,b,c; | |
float aEnergy; | |
float bEnergy; | |
float aEnergySmth; | |
float bEnergySmth; | |
float time; | |
ofPolyline nodeLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File.open('test.txt', 'r+') do |f| | |
out = "" | |
f.each do |line| | |
out << line.gsub(/\[([^\]]+)\]\(([^)]+)\)/, '<a target="_blank" href="\2">\1</a>') | |
end | |
f.pos = 0 | |
f.print out | |
f.truncate(f.pos) | |
end |
OlderNewer