C++ SDK Reference
12.5
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
diguy_api.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
*t DI-Guy API, Main Header File
30
**
31
** The API is subject to change in future releases.
32
**
33
*b Link against: libdiguy
34
*/
35
36
#ifndef __diguy_api_H
37
#define __diguy_api_H
38
39
#ifdef SWIG
40
%module diguy_api
41
#else
42
#define CPLUSPLUS_ONLY
43
#endif
44
45
#ifdef CPLUSPLUS_ONLY
46
47
#include <
diguy_constants.h
>
48
49
class
diguyApp
;
50
#include "
diguy_typedefs.h
"
// needed for diguyScenarioCallback
51
52
#include <
declspec_diguy.h
>
53
54
#endif
55
56
#ifdef __cplusplus
57
extern
"C"
{
58
#endif
59
60
61
/*****************************************************************************/
67
#ifdef CPLUSPLUS_ONLY
68
69
/*l
70
*b Description:
71
**
72
** This function sets the filename of the top-level configuration file
73
** that will be read by the DI-Guy software. The default is "diguy.cfg".
74
**
75
** This function must be called before diguy_initialize_[platform]().
76
**
77
** It should rarely be necessary to use this function.
78
**
79
*b Callable From:
80
**
81
*- - C++
82
**
83
*b Arguments:
84
**
85
*a cfg_file - filename of desired configuration file
86
**
87
*b Returns:
88
**
89
** 0 on success, -1 on failure
90
**
91
*b C++ Example:
92
**
93
*e #include <diguy_graphics_ogl.h>
94
*e
95
*e diguy_set_cfg_file("custom.cfg");
96
*e diguy_ogl_initialize(NULL);
97
*/
98
BDI_DECLSPEC_diguy
99
int
diguy_set_cfg_file
(
const
char
* cfg_file);
100
101
/*l
102
*b Description:
103
**
104
** This function sets the base directory in which to search for DI-Guy
105
** files.
106
**
107
** This function must be called before diguy_initialize_[platform]().
108
**
109
** It should rarely be necessary to use this function. In typical use,
110
** this directory will be read from the DIGUY environment variable.
111
**
112
** Calling this function will override the directory specified in the
113
** DIGUY environment variable.
114
**
115
** The base directory can be retrieved by using the function
116
** diguyApp::get_diguy_base_dir_path().
117
**
118
*b Callable From:
119
**
120
*- - C++
121
**
122
*b Arguments:
123
**
124
*a directory_name - override directory in which to search for DI-Guy files
125
**
126
*b Returns:
127
**
128
** 0 on success, -1 on failure
129
**
130
*b C++ Example:
131
**
132
*e #include <diguy_graphics_ogl.h>
133
*e
134
*e diguy_set_diguy_base_dir_path("c:/DI-Guy_alternate_directory");
135
*e diguy_ogl_initialize(NULL);
136
*/
137
BDI_DECLSPEC_diguy
138
int
diguy_set_diguy_base_dir_path
(
const
char
* directory_name);
139
140
/*l
141
*b Description:
142
**
143
** This function shuts down the DI-Guy software, removing all characters
144
** and cleaning up memory allocated by the library. No objects created
145
** by the DI-Guy software should be referenced after this call is made.
146
**
147
*i This function should only be called once per program execution.
148
*i Do not try to re-initialize the DI-Guy software after calling
149
*i this function.
150
**
151
**
152
*b Callable From:
153
**
154
*- - C++
155
**
156
*b Returns:
157
**
158
** 0 on success, -1 on failure
159
**
160
*b C++ Example:
161
**
162
*e diguy_deinitialize();
163
*/
164
BDI_DECLSPEC_diguy
165
int
diguy_deinitialize
();
166
167
#endif
168
169
170
/*****************************************************************************/
176
/*l
177
*b Description:
178
**
179
** This function returns a pointer to the DI-Guy application object.
180
** Only one application object exists per DI-Guy run. The application
181
** object is created during DI-Guy initialize calls; e.g.
182
** diguy_ogl_initialize().
183
**
184
*b Returns:
185
**
186
** a pointer of type diguyApp
187
**
188
*b Callable From:
189
**
190
*- - C++
191
**
192
*b C++ Example:
193
**
194
*e diguyApp* app = diguy_get_app();
195
**
196
*/
197
BDI_DECLSPEC_diguy
198
diguyApp
*
diguy_get_app
();
199
200
/*l
201
** Description:
202
**
203
** This function allocates and returns an empty object of type
204
** diguyScenario. This is the top-level "container" of most
205
** DI-Guy types, and includes objects of type diguyCharacter,
206
** diguyViewCamera, diguySceneObject, and diguySignal.
207
**
208
*b Callable From:
209
**
210
*- - C++
211
**
212
*b Returns:
213
**
214
** Pointer to object of type diguyScenario if successful;
215
** NULL if not.
216
**
217
*b C++ Example:
218
**
219
*e diguyScenario* sc = diguy_create_scenario();
220
*e if (sc)
221
*e {
222
*e sc->load("my_scenario.dss");
223
*e }
224
**
225
*/
226
BDI_DECLSPEC_diguy
227
diguyScenario
*
diguy_create_scenario
();
228
229
/*l
230
** Description:
231
**
232
** This function destroys an object of type diguyScenario allocated
233
** by diguy_create_scenario().
234
**
235
*b Callable From:
236
**
237
*- - C++
238
**
239
*b Returns:
240
**
241
** 0 on success, -1 on failure
242
**
243
*b C++ Example:
244
**
245
*e diguyScenario* sc = diguy_create_scenario();
246
*e // ...
247
*e diguy_destroy_scenario(sc);
248
**
249
*/
250
BDI_DECLSPEC_diguy
251
int
diguy_destroy_scenario
(
diguyScenario
* scenario);
252
253
254
255
/*****************************************************************************/
261
#ifdef CPLUSPLUS_ONLY
262
263
/*l
264
*b Description:
265
**
266
** This utility function changes the order of Euler angle triples.
267
** DI-Guy uses the order ZXY for all 3D rotations.
268
**
269
*b Callable From:
270
**
271
*- - C++
272
**
273
*b Returns:
274
**
275
** 0 on success, -1 on failure
276
*/
277
BDI_DECLSPEC_diguy
278
int
diguy_convert_euler_angle_order
(
float
src_rx,
279
float
src_ry,
280
float
src_rz,
281
diguyEulerAngleOrder
src_order,
282
float
* dest_rx,
283
float
* dest_ry,
284
float
* dest_rz,
285
diguyEulerAngleOrder
dest_order);
286
287
/*l
288
*b Description:
289
**
290
** This utility function converts a DI-Guy ZXY Euler angle triple
291
** into a quaternion.
292
**
293
*b Callable From:
294
**
295
*- - C++
296
**
297
*b Returns:
298
**
299
** 0 on success, -1 on failure
300
*/
301
BDI_DECLSPEC_diguy
302
int
diguy_convert_euler_angles_to_quaternion
(
const
float
* euler_angle_ptr,
303
float
* quat_ptr);
304
305
/*l
306
*b Description:
307
**
308
** To be written.
309
**
310
*b Callable From:
311
**
312
*- - C++
313
**
314
*b Returns:
315
**
316
** 0 on success, -1 on failure
317
*/
318
BDI_DECLSPEC_diguy
319
int
diguy_extract_translation_and_euler_angles_from_matrix
(
float
mat[4][4],
320
float
* translation,
321
float
* euler_angles,
322
diguyEulerAngleOrder
euler_angle_order);
323
324
/*l
325
*b Description:
326
**
327
** To be written.
328
**
329
*b Callable From:
330
**
331
*- - C++
332
**
333
*b Returns:
334
**
335
** 0 on success, -1 on failure
336
*/
337
BDI_DECLSPEC_diguy
338
int
diguy_create_matrix_from_translation_and_euler_angles
(
float
mat[4][4],
339
float
translation[3],
340
float
euler_angles[3],
341
diguyEulerAngleOrder
euler_angle_order);
342
343
#endif
344
345
#ifdef __cplusplus
346
}
347
#endif
348
349
#endif
/* __diguy_api_H */
350
351
352
/*
353
* Copyright (C) 1992-2013 Boston Dynamics
354
* ALL RIGHTS RESERVED.
355
*
356
* These coded instructions, statements, and computer programs
357
* contain unpublished proprietary information of Boston Dynamics
358
* and are protected by Copyright Laws of the United States.
359
* They may not be used, duplicated, or disclosed in any form, in
360
* whole or in part, without the prior written consent from Boston
361
* Dynamics.
362
*
363
* RESTRICTED RIGHTS LEGEND
364
* Use, duplication, or disclosure by the government is subject
365
* to restrictions as set forth in FAR 52.227.19(c)(2) or
366
* subparagraph (c)(1)(ii) of the Rights in Technical Data and
367
* Computer Software clause at DFARS 252.227-7013 and/or in
368
* similar or successor clauses in the FAR, or the DOD or NASA
369
* FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the
370
* Commercial Computer Software--Restricted Rights at 48 CFR
371
* 52.227-19, as applicable. Unpublished-rights reserved under
372
* the Copyright Laws of the United States.
373
* Contractor/Manufacturer is:
374
* Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.
375
*/
376
include
diguy_api.h
Generated on Wed Sep 18 2013 11:47:08 for C++ SDK Reference by
1.8.3.1