DI-Guy C++ SDK Reference
13.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
diguyMotionDirection.h
Go to the documentation of this file.
1
2
/*********************************************************************
3
** Copyright (c) 1992-2014 VT MAK
4
** All rights reserved.
5
*********************************************************************/
6
7
8
/*********************************************************************
9
**
10
*t diguyMotionDirection Type Declaration
11
**
12
*/
13
14
#ifndef __diguyMotionDirection_H
15
#define __diguyMotionDirection_H
16
17
#ifdef SWIG
18
%module
diguyMotionDirection
19
#else
20
#define CPLUSPLUS_ONLY
21
#endif
22
23
extern
"C"
{
24
25
#include <
declspec_diguy.h
>
26
27
28
/****************************************************************************/
29
typedef
enum
{
30
DIGUY_MOTION_DIRECTION_NONE
= 0,
31
DIGUY_MOTION_DIRECTION_FORWARD
,
32
DIGUY_MOTION_DIRECTION_BACKWARD
,
33
DIGUY_MOTION_DIRECTION_LEFT
,
34
DIGUY_MOTION_DIRECTION_RIGHT
,
35
DIGUY_MOTION_DIRECTION_LOCOMOTION
,
36
37
DIGUY_MOTION_DIRECTION_UP
,
38
DIGUY_MOTION_DIRECTION_DOWN
,
39
DIGUY_MOTION_DIRECTION_TURN_LEFT
,
40
DIGUY_MOTION_DIRECTION_TURN_RIGHT
,
41
DIGUY_MOTION_DIRECTION_NONLINEAR
,
42
DIGUY_MOTION_DIRECTION_LINEAR_OFFAXIS
,
43
DIGUY_MOTION_DIRECTION_INHERIT
,
44
DIGUY_MOTION_DIRECTION_UNKNOWN
,
45
DIGUY_MOTION_DIRECTION_COUNT
46
}
diguyMotionDirection
;
47
48
/*l
49
*b Description:
50
**
51
** This function converts the passed direction enumeration into
52
** a NULL-terminated C-style string.
53
**
54
*b Returns:
55
**
56
** C-style string identifying direction
57
**
58
*b Callable From:
59
**
60
*- - C++
61
*- - Script
62
*/
63
BDI_DECLSPEC_diguy
64
const
char
*
diguy_motion_direction_to_string
(
diguyMotionDirection
direction);
65
66
/*l
67
*b Description:
68
**
69
** This function converts the passed C-style string into an
70
** enumerated value.
71
**
72
** Directions are used in functions such as
73
** diguyCharacter::get_action_from_description().
74
**
75
*b Returns:
76
**
77
** enumeration value of direction
78
**
79
*b Callable From:
80
**
81
*- - C++
82
*- - Script
83
*/
84
BDI_DECLSPEC_diguy
85
diguyMotionDirection
diguy_motion_direction_from_string
(
const
char
*
string
);
86
87
/*l
88
*b Description:
89
**
90
** This function converts the passed direction enumeration into
91
** a floating point angle. The returned angle is in degrees.
92
**
93
** Currently only the following directions return useful angles:
94
**
95
*- - DIGUY_MOTION_DIRECTION_FORWARD (angle = 0)
96
*- - DIGUY_MOTION_DIRECTION_BACKWARD (angle = 180)
97
*- - DIGUY_MOTION_DIRECTION_LEFT (angle = 90)
98
*- - DIGUY_MOTION_DIRECTION_RIGHT (angle = 270)
99
**
100
** All other directions return an angle of 0.
101
**
102
*b Returns:
103
**
104
** yaw angle of direction in degrees
105
**
106
*b Callable From:
107
**
108
*- - C++
109
*- - Script
110
*/
111
BDI_DECLSPEC_diguy
112
float
diguy_motion_direction_to_angle
(
diguyMotionDirection
direction);
113
114
/*l
115
*b Description:
116
**
117
** This function converts the passed angle into a
118
** direction enumeration.
119
**
120
** Currently only the following directions will be returned:
121
**
122
*- - DIGUY_MOTION_DIRECTION_FORWARD (angle approx. 0)
123
*- - DIGUY_MOTION_DIRECTION_BACKWARD (angle approx. 180)
124
*- - DIGUY_MOTION_DIRECTION_LEFT (angle approx. 90)
125
*- - DIGUY_MOTION_DIRECTION_RIGHT (angle approx. 270)
126
*- - DIGUY_MOTION_DIRECTION_UNKNOWN (everything else)
127
**
128
** If the passed angle isn't within the specified error amount
129
** of any direction's "exact" angle, the value
130
** DIGUY_MOTION_DIRECTION_UNKNOWN will be returned.
131
**
132
*b Arguments:
133
**
134
*a angle - angle for which to retrieve direction, in degrees
135
*a allowed_error - how much error there can be from the
136
*a direction's "exact" angle
137
**
138
*b Returns:
139
**
140
** enumeration value of direction
141
**
142
*b Callable From:
143
**
144
*- - C++
145
*- - Script
146
*/
147
BDI_DECLSPEC_diguy
148
diguyMotionDirection
diguy_motion_direction_from_angle
(
float
angle,
149
float
allowed_error = 1.0f);
150
151
152
}
/* end extern "C" */
153
154
#endif
/* __diguyMotionDirection_H */
155
156
157
/*********************************************************************
158
** Copyright (c) 1992-2014 VT MAK
159
** All rights reserved.
160
*********************************************************************/
161
include
diguyMotionDirection.h
Generated on Wed Jul 9 2014 21:35:59 for DI-Guy C++ SDK Reference by
1.8.3.1