C++ SDK Reference  12.5
 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-2013 Boston Dynamics
4  * ALL RIGHTS RESERVED.
5  *
6  * These coded instructions, statements, and computer programs
7  * contain unpublished proprietary information of Boston Dynamics
8  * and are protected by Copyright Laws of the United States.
9  * They may not be used, duplicated, or disclosed in any form, in
10  * whole or in part, without the prior written consent from Boston
11  * Dynamics.
12  *
13  * RESTRICTED RIGHTS LEGEND
14  * Use, duplication, or disclosure by the government is subject
15  * to restrictions as set forth in FAR 52.227.19(c)(2) or
16  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
17  * Computer Software clause at DFARS 252.227-7013 and/or in
18  * similar or successor clauses in the FAR, or the DOD or NASA
19  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
20  * Commercial Computer Software--Restricted Rights at 48 CFR
21  * 52.227-19, as applicable. Unpublished-rights reserved under
22  * the Copyright Laws of the United States.
23  * Contractor/Manufacturer is:
24  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
25  */
26 
27 
28 /*********************************************************************
29  **
30  *t diguyMotionDirection Type Declaration
31  **
32  */
33 
34 #ifndef __diguyMotionDirection_H
35 #define __diguyMotionDirection_H
36 
37 #ifdef SWIG
39 #else
40 #define CPLUSPLUS_ONLY
41 #endif
42 
43 extern "C" {
44 
45 #include <declspec_diguy.h>
46 
47 
48 /****************************************************************************/
49 typedef enum {
55 
66 
67 /*l
68  *b Description:
69  **
70  ** This function converts the passed direction enumeration into
71  ** a NULL-terminated C-style string.
72  **
73  *b Returns:
74  **
75  ** C-style string identifying direction
76  **
77  *b Callable From:
78  **
79  *- - C++
80  *- - Script
81  */
82 BDI_DECLSPEC_diguy
84 
85 /*l
86  *b Description:
87  **
88  ** This function converts the passed C-style string into an
89  ** enumerated value.
90  **
91  ** Directions are used in functions such as
92  ** diguyCharacter::get_action_from_description().
93  **
94  *b Returns:
95  **
96  ** enumeration value of direction
97  **
98  *b Callable From:
99  **
100  *- - C++
101  *- - Script
102  */
103 BDI_DECLSPEC_diguy
105 
106 /*l
107  *b Description:
108  **
109  ** This function converts the passed direction enumeration into
110  ** a floating point angle. The returned angle is in degrees.
111  **
112  ** Currently only the following directions return useful angles:
113  **
114  *- - DIGUY_MOTION_DIRECTION_FORWARD (angle = 0)
115  *- - DIGUY_MOTION_DIRECTION_BACKWARD (angle = 180)
116  *- - DIGUY_MOTION_DIRECTION_LEFT (angle = 90)
117  *- - DIGUY_MOTION_DIRECTION_RIGHT (angle = 270)
118  **
119  ** All other directions return an angle of 0.
120  **
121  *b Returns:
122  **
123  ** yaw angle of direction in degrees
124  **
125  *b Callable From:
126  **
127  *- - C++
128  *- - Script
129  */
130 BDI_DECLSPEC_diguy
132 
133 /*l
134  *b Description:
135  **
136  ** This function converts the passed angle into a
137  ** direction enumeration.
138  **
139  ** Currently only the following directions will be returned:
140  **
141  *- - DIGUY_MOTION_DIRECTION_FORWARD (angle approx. 0)
142  *- - DIGUY_MOTION_DIRECTION_BACKWARD (angle approx. 180)
143  *- - DIGUY_MOTION_DIRECTION_LEFT (angle approx. 90)
144  *- - DIGUY_MOTION_DIRECTION_RIGHT (angle approx. 270)
145  *- - DIGUY_MOTION_DIRECTION_UNKNOWN (everything else)
146  **
147  ** If the passed angle isn't within the specified error amount
148  ** of any direction's "exact" angle, the value
149  ** DIGUY_MOTION_DIRECTION_UNKNOWN will be returned.
150  **
151  *b Arguments:
152  **
153  *a angle - angle for which to retrieve direction, in degrees
154  *a allowed_error - how much error there can be from the
155  *a direction's "exact" angle
156  **
157  *b Returns:
158  **
159  ** enumeration value of direction
160  **
161  *b Callable From:
162  **
163  *- - C++
164  *- - Script
165  */
166 BDI_DECLSPEC_diguy
168  float allowed_error = 1.0f);
169 
170 
171 } /* end extern "C" */
172 
173 #endif /* __diguyMotionDirection_H */
174 
175 
176 /*
177  * Copyright (C) 1992-2013 Boston Dynamics
178  * ALL RIGHTS RESERVED.
179  *
180  * These coded instructions, statements, and computer programs
181  * contain unpublished proprietary information of Boston Dynamics
182  * and are protected by Copyright Laws of the United States.
183  * They may not be used, duplicated, or disclosed in any form, in
184  * whole or in part, without the prior written consent from Boston
185  * Dynamics.
186  *
187  * RESTRICTED RIGHTS LEGEND
188  * Use, duplication, or disclosure by the government is subject
189  * to restrictions as set forth in FAR 52.227.19(c)(2) or
190  * subparagraph (c)(1)(ii) of the Rights in Technical Data and
191  * Computer Software clause at DFARS 252.227-7013 and/or in
192  * similar or successor clauses in the FAR, or the DOD or NASA
193  * FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
194  * Commercial Computer Software--Restricted Rights at 48 CFR
195  * 52.227-19, as applicable. Unpublished-rights reserved under
196  * the Copyright Laws of the United States.
197  * Contractor/Manufacturer is:
198  * Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
199  */
200