作者 主题: 将processing程序移植到openFrameworks中  (阅读 3397 次)

vinjn

  • Moderator 版主
  • Hero Member
  • *****
  • 帖子: 586
将processing程序移植到openFrameworks中
« 于: 八月 25, 2011, 09:10:06 下午 »
先留这个一个头文件,细节很多,慢慢送上
同时用过p5和OF的人应该明白其中的含义

processing.h

程序代码
#pragma once

#define millis() ofGetSystemTime()
#define random(a,b) ofRandom(a,b)
#define color ofColor
#define strokeWeight(w) ofSetLineWidth(w)
#define stroke(clr) ofSetColor(clr)
#define rect(a,b,c,d) ofRect(a,b,c,d)
#define vertex(x,y) ofVertex(x,y)
#define frameCount ofGetFrameNum()
#define String std::string
#define background(r,g,b) ofBackground(r,g,b)
#define LINES
#define beginShape(a) ofBeginShape()
#define endShape(b) ofEndShape(b)
#define final const
#define boolean bool

#undef class
#define class struct

#define println(str) printf("%s\n", str)

inline float sq(float n){return n*n;}

JSVSTX

  • Newbie
  • *
  • 帖子: 17
Re: 将processing程序移植到openFrameworks中
« 回复 #1 于: 十一月 09, 2012, 05:32:05 下午 »
啊,vinjin老师没有后文了么。。。

vinjn

  • Moderator 版主
  • Hero Member
  • *****
  • 帖子: 586
Re: 将processing程序移植到openFrameworks中
« 回复 #2 于: 十一月 10, 2012, 02:44:37 下午 »
是vinjn,谢谢
应该是没后文了,个人不喜欢OF
« 最后编辑时间: 十一月 10, 2012, 02:47:55 下午 作者 vinjn »

Tags: