Game Development Reference
In-Depth Information
if (!cp && bone->next){
bones.ClearAll();
return;
}
bone = bone->next;
}
}
SetTitle(dlg.GetFileTitle());
}
The next step is to display the file contents moving. We start a timer that
has an increment defined by the member variable frametime. Since
windows timers use a millisecond parameter, we convert the floating-point
value into an integer millisecond value by multiplying the value by 1000
and taking the integer part. The purpose of the timer function call is to
transform the object. We can achieve this by updating the current frame
value. If this exceeds the total number of frames then frame is reset to
zero. Then each bone is transformed starting with the top level parent. A
parent object updates all its children using a recursive function call, until
Figure 12.9 The BVHViewer application displaying a walk action.
Search Nedrilad ::




Custom Search