RaycastVehicle.pkg 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. $#include "Physics/RaycastVehicle.h"
  2. class RaycastVehicle : public LogicComponent
  3. {
  4. RaycastVehicle(Urho3D::Context* context);
  5. ~RaycastVehicle();
  6. static void RegisterObject(Context* context);
  7. virtual void ApplyAttributes();
  8. void AddWheel(Node *wheelNode, Vector3 wheelDirection, Vector3 wheelAxle, float restLength, float wheelRadius, bool frontWheel);
  9. void ResetSuspension(void);
  10. void UpdateWheelTransform(int wheel, bool interpolated);
  11. void SetSteeringValue(int wheel, float steeringValue);
  12. void SetWheelSuspensionStiffness(int wheel, float stiffness);
  13. void SetWheelMaxSuspensionForce(int wheel, float force);
  14. void SetWheelDampingRelaxation(int wheel, float damping);
  15. void SetWheelDampingCompression(int wheel, float compression);
  16. void SetWheelFrictionSlip(int wheel, float slip);
  17. void SetWheelRollInfluence(int wheel, float rollInfluence);
  18. void SetEngineForce(int wheel, float force);
  19. void SetBrake(int wheel, float force);
  20. void SetWheelRadius(int wheel, float wheelRadius);
  21. void ResetWheels();
  22. void SetWheelRestLength(int wheel, float length);
  23. void SetWheelSkidInfo(int wheel, float factor);
  24. bool WheelIsGrounded(int wheel) const;
  25. void SetMaxSuspensionTravel(int wheel, float maxSuspensionTravel);
  26. void SetWheelDirection(int wheel, Vector3 direction);
  27. void SetWheelAxle(int wheel, Vector3 axle);
  28. void SetMaxSideSlipSpeed(float speed);
  29. void SetWheelSkidInfoCumulative(int wheel, float skid);
  30. void SetInAirRPM(float rpm);
  31. void SetCoordinateSystem(const IntVector3& coordinateSystem = RIGHT_UP_FORWARD);
  32. void Init();
  33. Vector3 GetWheelPosition(int wheel);
  34. Quaternion GetWheelRotation(int wheel);
  35. Vector3 GetWheelConnectionPoint(int wheel);
  36. int GetNumWheels();
  37. Node *GetWheelNode(int wheel);
  38. float GetSteeringValue(int wheel) const;
  39. float GetWheelSuspensionStiffness(int wheel) const;
  40. float GetWheelMaxSuspensionForce(int wheel) const;
  41. float GetWheelDampingRelaxation(int wheel) const;
  42. float GetWheelDampingCompression(int wheel) const;
  43. float GetWheelFrictionSlip(int wheel) const;
  44. float GetWheelRollInfluence(int wheel) const;
  45. float GetEngineForce(int wheel) const;
  46. float GetBrake(int wheel) const;
  47. float GetWheelRadius(int wheel) const;
  48. float GetWheelRestLength(int wheel) const;
  49. float GetWheelSkidInfo(int wheel) const;
  50. float GetMaxSuspensionTravel(int wheel);
  51. float GetWheelSideSlipSpeed(int wheel) const;
  52. float GetMaxSideSlipSpeed() const;
  53. float GetWheelSkidInfoCumulative(int wheel) const;
  54. Vector3 GetWheelDirection(int wheel) const;
  55. bool IsFrontWheel(int wheel) const;
  56. Vector3 GetWheelAxle(int wheel) const;
  57. Vector3 GetContactPosition(int wheel) const;
  58. Vector3 GetContactNormal(int wheel) const;
  59. float GetInAirRPM() const;
  60. IntVector3 GetCoordinateSystem() const;
  61. static const IntVector3 RIGHT_UP_FORWARD;
  62. static const IntVector3 RIGHT_FORWARD_UP;
  63. static const IntVector3 UP_FORWARD_RIGHT;
  64. static const IntVector3 UP_RIGHT_FORWARD;
  65. static const IntVector3 FORWARD_RIGHT_UP;
  66. static const IntVector3 FORWARD_UP_RIGHT;
  67. };