bttypeconvs.monkey2 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. Namespace mojo3d.bullet
  2. Public
  3. #rem monkeydoc Extension methods for bullet type conversions.
  4. #end
  5. Struct Vec3f Extension
  6. Operator To:btVector3()
  7. Return New btVector3( x,y,z )
  8. End
  9. End
  10. #rem monkeydoc Extension methods for bullet type conversions.
  11. #end
  12. Struct btVector3 Extension
  13. Operator To:Vec3f()
  14. Return New Vec3f( x,y,z )
  15. End
  16. End
  17. #rem monkeydoc Extension methods for bullet type conversions.
  18. #end
  19. Struct Vec4f Extension
  20. Operator To:btVector4()
  21. Return New btVector4( x,y,z,w )
  22. End
  23. End
  24. #rem monkeydoc Extension methods for bullet type conversions.
  25. #end
  26. Struct btVector4 Extension
  27. Operator To:Vec4f()
  28. Return New Vec4f( x,y,z,w )
  29. End
  30. End
  31. #rem monkeydoc Extension methods for bullet type conversions.
  32. #end
  33. Struct Mat3f Extension
  34. Operator To:btMatrix3x3()
  35. Return New btMatrix3x3( i.x,j.x,k.x, i.y,j.y,k.y, i.z,j.z,k.z )
  36. End
  37. End
  38. #rem monkeydoc Extension methods for bullet type conversions.
  39. #end
  40. Struct btMatrix3x3 Extension
  41. Operator To:Mat3f()
  42. Return New Mat3f( Cast<Vec3f>( getColumn(0) ),Cast<Vec3f>( getColumn(1) ),Cast<Vec3f>( getColumn(2) ) )
  43. End
  44. End
  45. #rem monkeydoc Extension methods for bullet type conversions.
  46. #end
  47. Struct AffineMat4f Extension
  48. Operator To:btTransform()
  49. Return New btTransform( Cast<btMatrix3x3>( m ),Cast<btVector3>( t ) )
  50. End
  51. End
  52. #rem monkeydoc Extension methods for bullet type conversions.
  53. #end
  54. Struct btTransform Extension
  55. Operator To:AffineMat4f()
  56. Return New AffineMat4f( Cast<Mat3f>( getBasis() ),Cast<Vec3f>( getOrigin() ) )
  57. End
  58. End