ControllerControllerCollision.generated.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Physics
  7. * @{
  8. */
  9. /// <summary>Contains data about a collision between two character controllers.</summary>
  10. [StructLayout(LayoutKind.Sequential), SerializeObject]
  11. public partial struct ControllerControllerCollision
  12. {
  13. ///<summary>
  14. /// Returns a subset of this struct. This subset usually contains common fields shared with another struct.
  15. ///</summary>
  16. public ControllerCollision GetBase()
  17. {
  18. ControllerCollision value;
  19. value.position = position;
  20. value.normal = normal;
  21. value.motionDir = motionDir;
  22. value.motionAmount = motionAmount;
  23. return value;
  24. }
  25. ///<summary>
  26. /// Assigns values to a subset of fields of this struct. This subset usually contains common field shared with
  27. /// another struct.
  28. ///</summary>
  29. public void SetBase(ControllerCollision value)
  30. {
  31. position = value.position;
  32. normal = value.normal;
  33. motionDir = value.motionDir;
  34. motionAmount = value.motionAmount;
  35. }
  36. /// <summary>
  37. /// Component of the controller that was touched. Can be null if the controller has no component parent, in which case
  38. /// check #controllerRaw.
  39. /// </summary>
  40. public CharacterController controller;
  41. /// <summary>Contact position.</summary>
  42. public Vector3 position;
  43. /// <summary>Contact normal.</summary>
  44. public Vector3 normal;
  45. /// <summary>Direction of motion after the hit.</summary>
  46. public Vector3 motionDir;
  47. /// <summary>Magnitude of motion after the hit.</summary>
  48. public float motionAmount;
  49. }
  50. /** @} */
  51. }