DI-Guy SDK Documentation  13.6
diguyVehicleNearCollision.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2022 MAK Technologies, Inc.
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************
8  **
9  *t diguyVehicleNearCollision
10  **
11  *b Link against: libdiguy
12  */
13 
14 #ifndef __diguyVehicleNearCollision_H
15 #define __diguyVehicleNearCollision_H
16 
17 #ifdef SWIG
19 #else
20 #define CPLUSPLUS_ONLY
21 #endif
22 
23 #ifdef CPLUSPLUS_ONLY
24 #include <stdio.h> // for NULL
25 class diguyCharacter;
26 class diguyScenario;
27 class diguySceneObject;
28 #endif
29 
30 #include <declspec_diguy.h>
31 #include <diguy_constants.h>
32 
33 
34 /****************************************************************************/
35 class BDI_DECLSPEC_diguy diguyVehicleNearCollision
36 {
37 
38 public:
39 
40 /*****************************************************************************/
49  /*l
50  *b Returns:
51  ** speed of vehicle being approached in near collision, in m/s
52  */
53  float get_approached_vehicle_speed();
54 
55  /*l
56  *b Returns:
57  **
58  ** name of approached vehicle
59  */
60  const char* get_approached_vehicle_name();
61 
62  /*l
63  *b Returns:
64  **
65  ** speed of approaching vehicle, in m/s
66  */
67  float get_approaching_vehicle_speed();
68 
69  /*l
70  *b Returns:
71  **
72  ** name of approached vehicle
73  */
74  const char* get_approaching_vehicle_name();
75 
76 
77  float get_distance();
78 
79  float get_time_to_next_check();
80 
81  /*l
82  *b Description:
83  **
84  ** XXX
85  **
86  *b Returns:
87  **
88  ** 1, if the collision is valid. If 0, there is not
89  */
90  int get_active() {return m_is_active;}
91 
92 #ifdef CPLUSPLUS_ONLY
93 
99 private:
102 
103  friend class bdiScenario;
104  friend class bdiScenarioCharacter;
105  friend class diguyCharacter;
106  friend class bdiScenarioVehicleController;
107 
108  /*l
109  ** A private constructor.
110  */
112  diguyCharacter* vehicle = NULL);
114  /*
115  * Private data members.
116  */
117  diguyScenario* m_scenario;
118  diguyCharacter* m_approached_vehicle;
119  diguyCharacter* m_approaching_vehicle;
120  float m_distance;
121  float m_time_to_next_check;
122  int m_is_active;
123 
124 #endif
125 
126 };
127 
128 
129 #endif /* __diguyVehicleNearCollision_H */
Definition: diguyVehicleNearCollision.h:33
Represents the scenario currently being portrayed.
Definition: diguyScenario.h:99
The class that represents a DI-Guy Entity in the world.
Definition: diguyCharacter.h:82
A scene object is a static (that is, non-moving) object in the scenario. Scene objects are the basic ...
Definition: diguySceneObject.h:43
static diguyScenario * scenario
Definition: simple_playback_ogl.cpp:57