At the start of the world I'm painting on a plane that is perpendicular to z-axis (i.e. parallel to x-y plane). As the sketch starts, the z-axis moves in 3D space and I keep its direction in a normalized PVector.
Which is the rotation I must apply to keep my painting plane perpendicular to current z-axis direction?
All the methods of DataIn class seem to work fine except for getValue() and getStringValue() which are the most interesting, of course.
If I try printXML() it prints out the correct xml file with all the data as expected. But if I use getValue() on a numeric stream it returns "0.0" and if I use getStringValue() on a text stream it returns an empty string.
I guess there is a problem in XML parsing?
I'm using Processing 1.5.1 on a MacBook Pro Mac OSX 10.6.8
I'm having a problem with 'timer' control in GUI for Processing library. Follow me:
import guicomponents.*;
GTimer timer;
void setup(){ size(400,300);
timer = new GTimer(this, this, "foo", 10);
}
void foo() { println("timer!!!"); }
This code just initializes the ctor and in fact doesn't fire 'foo' routine, as expected. Nothing is displayed on the terminal. Moreover this means that the call to the ctor doesn't actually start the timer, and that's correct. As a matter of fact, if you add timer.start(3) right after the ctor call, it fires three times the 'foo' method.
import guicomponents.*;
GTimer timer;
void setup(){ size(400,300);
timer = new GTimer(this, this, "foo", 10); timer.setInterval(5000); timer.start(3); }
void foo() { println("timer!!!"); }
The problem comes out here: running this code I expected to see "timer!!!" three times each one after 5 seconds (including the first one, of course). But what actually happens is that
the first occurrence is displayed after 10 millisecs and the other two after 5 seconds. You can check by changing the interval parameter in ctor call...