RaycastVehicle.pkg 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 SetWheelDampingRelaxation(int wheel, float damping);
  14. void SetWheelDampingCompression(int wheel, float compression);
  15. void SetWheelFrictionSlip(int wheel, float slip);
  16. void SetWheelRollInfluence(int wheel, float rollInfluence);
  17. void SetEngineForce(int wheel, float force);
  18. void SetBrake(int wheel, float force);
  19. void SetWheelRadius(int wheel, float wheelRadius);
  20. void ResetWheels();
  21. void SetWheelRestLength(int wheel, float length);
  22. void SetWheelSkidInfo(int wheel, float factor);
  23. bool WheelIsGrounded(int wheel) const;
  24. void SetMaxSuspensionTravel(int wheel, float maxSuspensionTravel);
  25. void SetWheelDirection(int wheel, Vector3 direction);
  26. void SetWheelAxle(int wheel, Vector3 axle);
  27. void SetMaxSideSlipSpeed(float speed);
  28. void SetWheelSkidInfoCumulative(int wheel, float skid);
  29. void SetInAirRPM(float rpm);
  30. void Init();
  31. Vector3 GetWheelPosition(int wheel);
  32. Quaternion GetWheelRotation(int wheel);
  33. Vector3 GetWheelConnectionPoint(int wheel);
  34. int GetNumWheels();
  35. Node *GetWheelNode(int wheel);
  36. float GetSteeringValue(int wheel) const;
  37. float GetWheelSuspensionStiffness(int wheel) const;
  38. float GetWheelDampingRelaxation(int wheel) const;
  39. float GetWheelDampingCompression(int wheel) const;
  40. float GetWheelFrictionSlip(int wheel) const;
  41. float GetWheelRollInfluence(int wheel) const;
  42. float GetEngineForce(int wheel) const;
  43. float GetBrake(int wheel) const;
  44. float GetWheelRadius(int wheel) const;
  45. float GetWheelRestLength(int wheel) const;
  46. float GetWheelSkidInfo(int wheel) const;
  47. float GetMaxSuspensionTravel(int wheel);
  48. float GetWheelSideSlipSpeed(int wheel) const;
  49. float GetMaxSideSlipSpeed() const;
  50. float GetWheelSkidInfoCumulative(int wheel) const;
  51. Vector3 GetWheelDirection(int wheel) const;
  52. bool IsFrontWheel(int wheel) const;
  53. Vector3 GetWheelAxle(int wheel) const;
  54. Vector3 GetContactPosition(int wheel) const;
  55. Vector3 GetContactNormal(int wheel) const;
  56. float GetInAirRPM() const;
  57. };