As everybody knows there is a big mess with time units in all of ID3DXAnimation methods. At least I lost, that I cannot for example calculate how to get to know how many ms is till AnimationSet loop end and start from the beginning. So could You help me fill up the below. This is some kind of summary of time units.
Summary of time units in DirectX:
1.) .X file
AnimationKey {
4;
92;
0;16;0.999995,-0.000000, ...
160;16; ...
320;16; ...
480;16; ..
640;16; ...
...
1200 (all animation key frame ticks)
}
I suppose this what is bold is called in english "animation key frame ticks". When I began to learn I thought that those are [ms]
2.)
ID3DXAnimationController - methods KeyTrackEnable/Speed/etc. take times in [s] unit
ID3DXAnimationController - method AdvanceTime take also time in [s] unit
ID3DXAnimationController - ID3DXTRACK_DESC { float Speed, ..} what is the time unit of Speed variable?
ID3DXAnimationController - KeyTrackPosition - probably also time in [s]
3.)
ID3DXAnimationSet GetSourceTicksPerSecond() - returns the number of animation key frame ticks per second, in most cases the value is equal to 480. (in one book I read that it tells how many times the interpolation is done per second, in other words tell how many AdvanceTime() is invoked per second, but I am not sure if it is true because when I increase time in AdvanceTime() method the animationSet is executed much faster, so this was boolshit in the book I suppose)
ID3DXAnimationSet - GetPeriod() returns the number which is equal to "all animation key frame ticks" / GetSourceTicksPerSecond(), so in other words it tells how many seconds the AnimationSet loop lasts.
ID3DXAnimationSet - double GetPeriodicPosition(double position) - I completely don't understand from the documentation what is the argument and return value
As far as my problem is concerned how to get to know how much ms is till animationSet will reach the end of loop?
LPD3DXANIMATIONSET set;
mAnimCtrl->GetAnimationSet(mCurrentAnimationSet, &set); //in my case this returns to me the same as mAnimCtrl->GetTrackAnimationSet)(mCurrentTrack, &set);
float lastTime = static_cast<float>(set->GetPeriod() - ?????? )
Thanks in advance for help






