btVehicleRaycaster.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org
  3. *
  4. * Permission to use, copy, modify, distribute and sell this software
  5. * and its documentation for any purpose is hereby granted without fee,
  6. * provided that the above copyright notice appear in all copies.
  7. * Erwin Coumans makes no representations about the suitability
  8. * of this software for any purpose.
  9. * It is provided "as is" without express or implied warranty.
  10. */
  11. #ifndef BT_VEHICLE_RAYCASTER_H
  12. #define BT_VEHICLE_RAYCASTER_H
  13. #include "LinearMath/btVector3.h"
  14. /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting
  15. struct btVehicleRaycaster
  16. {
  17. virtual ~btVehicleRaycaster()
  18. {
  19. }
  20. struct btVehicleRaycasterResult
  21. {
  22. btVehicleRaycasterResult() : m_distFraction(btScalar(-1.)){};
  23. btVector3 m_hitPointInWorld;
  24. btVector3 m_hitNormalInWorld;
  25. btScalar m_distFraction;
  26. };
  27. virtual void* castRay(const btVector3& from, const btVector3& to, btVehicleRaycasterResult& result) = 0;
  28. };
  29. #endif //BT_VEHICLE_RAYCASTER_H