float GetFrameSpeed( void );
Amount of time in seconds since beginning of drawing previous frame until beginning of drawing last (current) frame.
The GetFrameSpeed method is useful to retrieve information about how long took drawing of the previous frame. This information can be used for example to update position of moving (animated) objects or for another similar purposes. For example if you know that some object is moving at certain speed, you can update itís coordinates by aplying the time returned from GetFrameSpeed and speed vector to current objectís position.
The GetFrameSpeed method needs to be called between calling the COpenGL::DrawBegin and COpenGL::DrawEnd methods. Propsed use is this:
|1.||Call DrawBegin method|
|1.||Call GetFrameSpeed method|
|1.||Use retrieved frame speed time to update animated objects (positions, rotations, textures etc)|
|1.||Draw the scene and animated objects|
|1.||Call DrawEnd method|
StartAnimation, StopAnimation, IsAnimationStarted, SMovementInfo structure, DrawBegin
|© 2001 Solid Graphics, All rights reserved.|
|To view this site, we require use of either Netscape Navigator 4.0 or higher or Internet Explorer 4.0 or higher.|