blob: 944c84d4134ccc3799b1ff1c0f4ff56e638b8f8e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
|