summaryrefslogtreecommitdiff
path: root/vphysics/physics_controller_raycast_vehicle.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /vphysics/physics_controller_raycast_vehicle.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'vphysics/physics_controller_raycast_vehicle.h')
-rw-r--r--vphysics/physics_controller_raycast_vehicle.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/vphysics/physics_controller_raycast_vehicle.h b/vphysics/physics_controller_raycast_vehicle.h
new file mode 100644
index 0000000..944c84d
--- /dev/null
+++ b/vphysics/physics_controller_raycast_vehicle.h
@@ -0,0 +1,46 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H
+#define PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "ivp_controller.hxx"
+#include "ivp_car_system.hxx"
+#include "ivp_controller_raycast_car.hxx"
+
+class IPhysicsObject;
+
+//=============================================================================
+//
+// Raycast Car System
+//
+class CPhysics_Car_System_Raycast_Wheels : public IVP_Controller_Raycast_Car
+{
+
+public:
+
+ CPhysics_Car_System_Raycast_Wheels( IVP_Environment *env, const IVP_Template_Car_System *t );
+ virtual ~CPhysics_Car_System_Raycast_Wheels();
+
+ virtual void do_raycasts( IVP_Event_Sim *, int n_wheels, IVP_Ray_Solver_Template *t_in,
+ IVP_Ray_Hit *hits_out, IVP_FLOAT *friction_of_object_out );
+
+ void update_wheel_positions( void );
+
+ IPhysicsObject *GetWheel( int index );
+
+ virtual const char *get_controller_name() { return "sys:vehicle"; }
+protected:
+
+ void InitCarSystemWheels( const IVP_Template_Car_System *pCarSystem );
+
+ IVP_Real_Object *m_pWheels[IVP_RAYCAST_CAR_MAX_WHEELS];
+};
+
+#endif // PHYSICS_CONTROLLER_RAYCAST_VEHICLE_H