| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>MD2AnimLength ( md2 )</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- md2 - md2 handle
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Returns the animation length of an md2 model.
<br />
-
<br />
- The animation length is the total amount of animation frames that consist within the md2 file.
- </td>
- </tr>
- </table>
- <h1><a href=../3d_examples/MD2AnimLength.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; MD2AnimLength 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 />
- PositionEntity gargoyle,0,-45,100
<br />
- RotateEntity gargoyle,0,180,0
<br />
-
<br />
- While Not KeyDown( 1 )
<br />
-
<br />
- RenderWorld
<br />
-
<br />
- ; Output animation length to screen
<br />
- Text 0,0,"MD2AnimLength: "+MD2AnimLength( 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=MD2AnimLength&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|