| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>MD2AnimTime ( md2 )</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- md2 - md2 handle
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Returns the animation time of an md2 model.
<br />
-
<br />
- The animation time is the exact moment that the md2 is at with regards its frames of animation. For example, if the md2 at a certain moment in time is moving between the third and fourth frames, then MD2AnimTime will return a number in the region 3-4.
- </td>
- </tr>
- </table>
- <h1><a href=../3d_examples/MD2AnimTime.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; MD2AnimTime Example
<br />
- ; -------------------
<br />
-
<br />
- Graphics3D 640,480
<br />
- SetBuffer BackBuffer()
<br />
-
<br />
- camera=CreateCamera()
<br />
-
<br />
- light=CreateLight()
<br />
- RotateEntity light,90,0,0
<br />
-
<br />
- ; Load md2
<br />
- gargoyle=LoadMD2( "media/gargoyle/gargoyle.md2")
<br />
-
<br />
- ; Load md2 texture
<br />
- garg_tex=LoadTexture( "media/gargoyle/gargoyle.bmp" )
<br />
-
<br />
- ; Apply md2 texture to md2
<br />
- EntityTexture gargoyle,garg_tex
<br />
-
<br />
- ; Animate md2
<br />
- AnimateMD2 gargoyle,1,0.1,32,46
<br />
-
<br />
- PositionEntity gargoyle,0,-45,100
<br />
- RotateEntity gargoyle,0,180,0
<br />
-
<br />
- While Not KeyDown( 1 )
<br />
-
<br />
- UpdateWorld
<br />
- RenderWorld
<br />
-
<br />
- ; Output current animation frame to screen
<br />
- Text 0,0,"MD2AnimTime: "+MD2AnimTime( gargoyle )
<br />
-
<br />
- Flip
<br />
-
<br />
- Wend
<br />
-
<br />
- End
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=MD2AnimTime&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|