www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on August 20, 2008, 08:26:49 pm

Title: What does Animation.getSequenceCount() return?
Post by: AGP on August 20, 2008, 08:26:49 pm
Does it return the number of subsequences in the animation, or does it return the number of frames? Because my MD2 file is supposed to have nearly (or exactly) 260 frames and 4 subsequences, and getSequenceCount() returns 16.0. How do I access the number of frames, and then how do I switch between subsequences? For that matter, how do I access the individual frame names?
Title: Re: What does Animation.getSequenceCount() return?
Post by: AGP on August 21, 2008, 12:14:21 am
Got it. It was a Blender thing (I hate its interface). When I used Max's QTip, it worked like a charm and I got my now 3 animation subsequences. And if anyone who reads this wants to know, getSequenceCount() returns the number of subsequences. I can't tell of a way to find the number of frames, but I guess that's how Egon wants it: jPCT interpolates the animation frames so the entire thing is contained between indexes 0 and 1.0f. Also, there's an Object3D.animate(float, int) with which to pick the subsequences (the int of course).

Egon, if you do read this, for whatever it's worth I found it a little counter-intuitive to put so little in the Animation class and so much in Object3D. The Animation class, in my opinion, should be able to handle everything on its own.
Title: Re: What does Animation.getSequenceCount() return?
Post by: EgonOlsen on August 21, 2008, 12:36:08 am
Egon, if you do read this, for whatever it's worth I found it a little counter-intuitive to put so little in the Animation class and so much in Object3D. The Animation class, in my opinion, should be able to handle everything on its own.
I guess i did that, because the animation has to modify the object's mesh and i don't wanted to put a reference to the object into animation, because that would prevent the animation from being used on several objects at a time...something like that... ;)
Title: Re: What does Animation.getSequenceCount() return?
Post by: AGP on August 21, 2008, 12:48:20 am
I see. Thanks for the explanation.