MD2AnimLength.htm 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>MD2AnimLength ( md2 )</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. md2 - md2 handle
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. Returns the animation length of an md2 model. <br />
  21. <br />
  22. The animation length is the total amount of animation frames that consist within the md2 file.
  23. </td>
  24. </tr>
  25. </table>
  26. <h1><a href=../3d_examples/MD2AnimLength.bb>Example</a></h1>
  27. <table>
  28. <tr>
  29. <td>
  30. ; MD2AnimLength Example <br />
  31. ; --------------------- <br />
  32. <br />
  33. Graphics3D 640,480 <br />
  34. SetBuffer BackBuffer() <br />
  35. <br />
  36. camera=CreateCamera() <br />
  37. <br />
  38. light=CreateLight() <br />
  39. RotateEntity light,90,0,0 <br />
  40. <br />
  41. ; Load md2 <br />
  42. gargoyle=LoadMD2( "media/gargoyle/gargoyle.md2") <br />
  43. <br />
  44. ; Load md2 texture <br />
  45. garg_tex=LoadTexture( "media/gargoyle/gargoyle.bmp" ) <br />
  46. <br />
  47. ; Apply md2 texture to md2 <br />
  48. EntityTexture gargoyle,garg_tex <br />
  49. <br />
  50. PositionEntity gargoyle,0,-45,100 <br />
  51. RotateEntity gargoyle,0,180,0 <br />
  52. <br />
  53. While Not KeyDown( 1 ) <br />
  54. <br />
  55. RenderWorld <br />
  56. <br />
  57. ; Output animation length to screen <br />
  58. Text 0,0,"MD2AnimLength: "+MD2AnimLength( gargoyle ) <br />
  59. <br />
  60. Flip <br />
  61. <br />
  62. Wend <br />
  63. <br />
  64. End
  65. </td>
  66. </tr>
  67. </table>
  68. <br>
  69. <a target=_top href=../index.htm>Index</a><br>
  70. <br>
  71. 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>
  72. </html>