proposition of API change (addAnimator in particular)

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
elhim
Posts: 16
Joined: Sat Mar 13, 2004 12:37 am
Location: LI, NY

proposition of API change (addAnimator in particular)

Post by elhim »

i've struggled a bit with the problem i described earlier here:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2050

and to avoid further problems i propose separation of ISceneNode::addAnimator() into addAnimator() and addCollisionAnimator(), which would allow storing the collision animator separately and calling it after all the other animators.
I personaly don't see any problems that could arise from this, but what does the developer/community have to say about this? If people agree i can implement it myself. doesn't take much work and saves a lot of trouble (imho).
comments are welcome, since i might've been completely wrong for the beginning, but yet i want this to be fixed, cause i really need it. also don't want to have to make my own version for my own needs, which would have to be update with every release. thanks
Luke923
Posts: 59
Joined: Wed Nov 05, 2003 5:26 am

Post by Luke923 »

I've been having issues with that, too. I've played around with it a little, but I cannot seem to get it fixed. One of the things that I tried to do is, since the Animators for an IAnimatedSceneNode is nothing more than a deque (double-ended queue), I tried adding to the engine a second addAnimator() function that adds the collision animator to the back of the deque, but still no luck.

I haven't messed with it much lately, but it would be nice if this is something that can get fixed. Maybe I can get this working.
"Object-oriented programming is an exceptionally bad idea which could only have originated in California."
- E.W. Dijkstra
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I thought about an more generic extended addAnimator() method with an additional parameter to make it possible to influcense where the animator will be added. For example at the end or the front. Maybe something like this: addAnimator(ISceneNodeAnimator* anim, bool front=false); Maybe this would be ok?
elhim
Posts: 16
Joined: Sat Mar 13, 2004 12:37 am
Location: LI, NY

Post by elhim »

oh, good idea. and there could be two versions of the function, one with the parameter, one without. want me to write a patch (for 0.6 obviously)? but there seem to be some other bugs with multiple animators which i haven't looked at much, but i sure will after this gets fixed
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hm, I think a second default parameter is enough (set to false to ensure backwards compatibility), no need for a second method. I think the other problems I've heard of are because most animators don't update the position of the node after changing it. But I am just guessing.
Post Reply