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
#!/usr/bin/env python | |
import os, sys | |
imgs = [x for x in os.listdir('.') if x.endswith('@2x.png')] | |
for i in imgs: | |
t = i.replace('@2x.png', '.png') | |
os.system("convert -resize 50%% %s %s" % (i, t)) |
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
class PolygonArc | |
{ | |
public: | |
PolygonArc() | |
{ | |
curveResolution = 4; | |
} | |
void draw() |
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
#include "testApp.h" | |
//-------------------------------------------------------------- | |
void testApp::setup() | |
{ | |
ofSetFrameRate(60); | |
ofSetVerticalSync(true); | |
ofBackground(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
#include "kdtree.h" | |
template<class T> | |
class ofxKdTree | |
{ | |
public: | |
ofxKdTree() | |
{ | |
kd = kd_create(3); |
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
#pragma once | |
#include "ofMain.h" | |
template <class T> | |
class ofxSmooth | |
{ | |
T value, value_t; | |
float smooth; | |
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
#pragma once | |
#include "ofMain.h" | |
#include "ofxOsc.h" | |
#define OFX_RECOSC_SAVE_XML | |
#ifdef OFX_RECOSC_SAVE_XML | |
#include "ofxXmlSettings.h" | |
#endif |
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
#pragma once | |
#include "ofMain.h" | |
#include <tr1/array> | |
/* | |
// EXAMPLE | |
#include "testApp.h" | |
#include "ofxSimpleParticleSystem.h" |
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
#include "testApp.h" | |
static CGLContextObj ctx; | |
static CGLPixelFormatObj pixStuff; | |
class MyThread : public ofThread | |
{ | |
public: | |
ofImage image; |
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
inline ofMatrix4x4 homography2glModelViewMatrix(const cv::Mat &homography) | |
{ | |
ofMatrix4x4 matrix; | |
matrix(0, 0) = homography.at<double>(0, 0); | |
matrix(0, 1) = homography.at<double>(1, 0); | |
matrix(0, 2) = 0; | |
matrix(0, 3) = homography.at<double>(2, 0); | |
matrix(1, 0) = homography.at<double>(0, 1); |
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 readDepthPixelsToImage(ofFloatImage &image) | |
{ | |
glPopAttrib(); | |
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT ); | |
glPixelStorei(GL_PACK_ALIGNMENT, 1); | |
glReadPixels(0, 0, image.getWidth(), image.getHeight(), GL_DEPTH_COMPONENT, GL_FLOAT, image.getPixels()); | |
glPopClientAttrib(); | |
image.update(); | |
} |