RectangleBoxBody.qml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import QtQuick 2.0
  2. import Box2D 2.0
  3. Rectangle {
  4. id: rectangle
  5. property alias body: boxBody
  6. property alias fixture: box
  7. // Body properties
  8. property alias world: boxBody.world
  9. property alias linearDamping: boxBody.linearDamping
  10. property alias angularDamping: boxBody.angularDamping
  11. property alias bodyType: boxBody.bodyType
  12. property alias bullet: boxBody.bullet
  13. property alias sleepingAllowed: boxBody.sleepingAllowed
  14. property alias fixedRotation: boxBody.fixedRotation
  15. property alias active: boxBody.active
  16. property alias awake: boxBody.awake
  17. property alias linearVelocity: boxBody.linearVelocity
  18. property alias angularVelocity: boxBody.angularVelocity
  19. property alias fixtures: boxBody.fixtures
  20. property alias gravityScale: boxBody.gravityScale
  21. // Box properties
  22. property alias density: box.density
  23. property alias friction: box.friction
  24. property alias restitution: box.restitution
  25. property alias sensor: box.sensor
  26. property alias categories: box.categories
  27. property alias collidesWith: box.collidesWith
  28. property alias groupIndex: box.groupIndex
  29. Body {
  30. id: boxBody
  31. target: rectangle
  32. Box {
  33. id: box
  34. width: rectangle.width
  35. height: rectangle.height
  36. }
  37. }
  38. }