HingeJointDrive.generated.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Physics
  7. * @{
  8. */
  9. /// <summary>Properties of a drive that drives the joint's angular velocity towards a paricular value.</summary>
  10. [StructLayout(LayoutKind.Sequential), SerializeObject]
  11. public partial struct HingeJointDrive
  12. {
  13. /// <summary>Initializes the struct with default values.</summary>
  14. public static HingeJointDrive Default()
  15. {
  16. HingeJointDrive value = new HingeJointDrive();
  17. value.speed = 0f;
  18. value.forceLimit = 3.40282347E+38f;
  19. value.gearRatio = 1f;
  20. value.freeSpin = false;
  21. return value;
  22. }
  23. /// <summary>Target speed of the joint.</summary>
  24. public float speed;
  25. /// <summary>Maximum torque the drive is allowed to apply .</summary>
  26. public float forceLimit;
  27. /// <summary>Scales the velocity of the first body, and its response to drive torque is scaled down.</summary>
  28. public float gearRatio;
  29. /// <summary>
  30. /// If the joint is moving faster than the drive's target speed, the drive will try to break. If you don't want the
  31. /// breaking to happen set this to true.
  32. /// </summary>
  33. public bool freeSpin;
  34. }
  35. /** @} */
  36. }