Thanks for your kind reply ;)
Does the other computer have Java installed?
Yes, since it has Eclipse and Android SDK installed.
Do you use variables in your call to
size()?
The following of this post is my modified script, and I copy the Data into the "application window" after it exports.
The image shows the folder it has for the application --
http://dl.dropbox.com/u/25433933/img.jpg
Inside the Data folder --
http://dl.dropbox.com/u/25433933/img2.jpg
I have to create the Data folder, otherwise it won't display in my main computer too, help is appreciated ;)
-poserpro
- /**
- NyARToolkit for proce55ing/1.0.0
- (c)2008-2011 nyatla
- airmail(at)ebony.plala.or.jp
-
- 最も短いARToolKitのコードです。
- Hiroマーカを用意してください。
-
- This sample program is most small sample as simpleLite.
- The marker is "patt.hiro".
- */
- import processing.video.*;
- import jp.nyatla.nyar4psg.*;
- import colladaLoader.*;
- ColladaLoader model;
- float angle = 0.08;
- char axis ='y';
-
- Capture cam;
- MultiMarker nya;
- void setup() {
- size(640,480,P3D);
- //copy duff.kmz manually to processing's "data" folder or choose sketch->add file
- model = ColladaLoader.getInstance("cdl.kmz", this);
- //model = ColladaLoader.getInstance(sketchPath("../data/duff.kmz"), this);
- frameRate(20);
- model.scale(3.0f);
- //colorMode(RGB, 100);
- //println(MultiMarker.VERSION);
- cam=new Capture(this,640,480);
- nya=new MultiMarker(this,width,height,"camera_para.dat",NyAR4PsgConfig.CONFIG_PSG);
- nya.addARMarker("patt.hiro",80);
- }
- void draw()
- {
- if (cam.available() !=true) {
- return;
- }
- cam.read();
- nya.detect(cam);
- background(0);
- lights();
- nya.drawBackground(cam);//frustumを考慮した背景描画
- if((!nya.isExistMarker(0))){
- return;
- }
- nya.beginTransform(0);
- //fill(0,0,255);
- translate(0,0,0);
- rotateX(30);
- rotateY(90);
- //box(40);
- model.rotate(angle, axis); //rotates Model as an animation
- model.draw();
- nya.endTransform();
- }
- void mouseDragged()
- {
- //scales model bigger or smaller
- model.scale(1+(pmouseY - mouseY) * 0.01f);
- }
- void keyPressed() {
-
- //shifts translates model in all 3D axis
- if (keyCode == LEFT) {angle = 0; model.shift(-5.0f, 'x');}
- if (keyCode == RIGHT) {angle=0; model.shift(5.0f, 'x');}
- if (keyCode == UP) {angle = 0; model.shift(-5.0f, 'y');}
- if (keyCode == DOWN) {angle = 0; model.shift(5.0f, 'y');}
- if (key == 'f') {angle = 0; model.shift(-5.0f, 'z');}
- if (key == 'b') {angle = 0; model.shift(5.0f, 'z');}
- if (key == 'x'||key == 'y'||key == 'z') {axis = key; angle = 0.08f;}
- }