about constant draw()

Hi all,

I’ve got some kind of real beginner question, about the way to program with a constant draw() function.

I think It’s an important point because this problem could appears in a lot of differents cases.

I’m looking for move some value to another one, using this really nice robert penner classes given in this forum.

It’s about a camara in a 3D environment.

when I’m using for the camara

Cam->moveTo(ofCamara3D::camz, 500, 500);  


void ofCamara3D::moveTo(float & origZ, int _z, int _vel) {  
	  beginning		= origZ; // here is my problem  
	  change 		= _z - origZ;  
	  duration		= _vel;  
	  camz = Quint::easeOut (time, beginning, change, duration);  

I can’t catch the starting value of the camera, because this one is constantly changing, and the equation goes wrong.

Is there a way to “fix” theses kinds of values in this case ?
I’m sure I could fixx it with dirty boolean code, but I’m sure there is a more elgegant way.

Thanks for your help,

hey martial.

are you trying to use cppglue or just the easing equations. I suspect you’re using the bare equations as if they were tweens, but can’t really guess…

Can you post more complete code? like what you call in update() and draw() and were the variables used come from? (ie: where do you get time from, …)



Thanks for your reply !

I could finally fix my problems… I just need some time to adapt me from flash programming logic to c++

And It needs a lot of time !