Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H
  7. #define PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "ivp_controller.hxx"
  12. #include "ivp_car_system.hxx"
  13. #include "ivp_controller_raycast_car.hxx"
  14. class IPhysicsObject;
  15. //=============================================================================
  16. //
  17. // Raycast Car System
  18. //
  19. class CPhysics_Car_System_Raycast_Wheels : public IVP_Controller_Raycast_Car
  20. {
  21. public:
  22. CPhysics_Car_System_Raycast_Wheels( IVP_Environment *env, const IVP_Template_Car_System *t );
  23. virtual ~CPhysics_Car_System_Raycast_Wheels();
  24. virtual void do_raycasts( IVP_Event_Sim *, int n_wheels, IVP_Ray_Solver_Template *t_in,
  25. IVP_Ray_Hit *hits_out, IVP_FLOAT *friction_of_object_out );
  26. void update_wheel_positions( void );
  27. IPhysicsObject *GetWheel( int index );
  28. virtual const char *get_controller_name() { return "sys:vehicle"; }
  29. protected:
  30. void InitCarSystemWheels( const IVP_Template_Car_System *pCarSystem );
  31. IVP_Real_Object *m_pWheels[IVP_RAYCAST_CAR_MAX_WHEELS];
  32. };
  33. #endif // PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H