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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Open Dynamics Engine: DrawStuff</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>DrawStuff</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structds_functions.html">dsFunctions</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set of functions to be used as callbacks by the simulation loop. <a href="structds_functions.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g28560ea1b64c1d83095bcdfce9caf9dc">dsSimulationLoop</a> (int argc, char **argv, int window_width, int window_height, struct <a class="el" href="structds_functions.html">dsFunctions</a> *fn)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Does the complete simulation. <a href="#g28560ea1b64c1d83095bcdfce9caf9dc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g7a2a69ac611d5dc6ffc8e43b0a743472">dsError</a> (char *msg,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">exit with error message. <a href="#g7a2a69ac611d5dc6ffc8e43b0a743472"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#ga84175b14c3c31daae08a9c88acc2b02">dsDebug</a> (char *msg,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">exit with error message and core dump. <a href="#ga84175b14c3c31daae08a9c88acc2b02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#gbca5fa4076aa9e45caa049f33e8cf168">dsPrint</a> (char *msg,...)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">print log message <a href="#gbca5fa4076aa9e45caa049f33e8cf168"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g8e4ea933c31d207ec57949fbb3a75815">dsSetViewpoint</a> (float xyz[3], float hpr[3])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the viewpoint. <a href="#g8e4ea933c31d207ec57949fbb3a75815"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#gaa22f45ad00e0010a1440985ac51b18b">dsGetViewpoint</a> (float xyz[3], float hpr[3])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the viewpoint. <a href="#gaa22f45ad00e0010a1440985ac51b18b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g6c13a5a310b9e00c45150058e669ebad">dsStop</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stop the simulation loop. <a href="#g6c13a5a310b9e00c45150058e669ebad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g02f3f096703d49f5a9e497aec0b85f75">dsElapsedTime</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the elapsed time (on wall-clock). <a href="#g02f3f096703d49f5a9e497aec0b85f75"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g8a3d6f8fecc8c7d5a206bed35f17ba7a">dsSetTexture</a> (int texture_number)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Toggle the rendering of textures. <a href="#g8a3d6f8fecc8c7d5a206bed35f17ba7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g3221a0d1360621eaad7c54597671c092">dsSetColor</a> (float red, float green, float blue)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the color with which geometry is drawn. <a href="#g3221a0d1360621eaad7c54597671c092"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g440940cfaef61775e37c33b055b832af">dsSetColorAlpha</a> (float red, float green, float blue, float alpha)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the color and transparency with which geometry is drawn. <a href="#g440940cfaef61775e37c33b055b832af"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#gfba4fde6b0b74f6cd422036dedd08836">dsDrawBox</a> (const float pos[3], const float R[12], const float sides[3])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a box. <a href="#gfba4fde6b0b74f6cd422036dedd08836"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g0802e7641f8028182b69fabc729a6704">dsDrawSphere</a> (const float pos[3], const float R[12], float radius)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a sphere. <a href="#g0802e7641f8028182b69fabc729a6704"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#gcfcbae15cee67eceb45cd96bf01484d4">dsDrawTriangle</a> (const float pos[3], const float R[12], const float *v0, const float *v1, const float *v2, int solid)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a triangle. <a href="#gcfcbae15cee67eceb45cd96bf01484d4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0b09b41f1f6500b293678aa1691f1537"></a><!-- doxytag: member="drawstuff::dsDrawCylinder" ref="g0b09b41f1f6500b293678aa1691f1537" args="(const float pos[3], const float R[12], float length, float radius)" -->
DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g0b09b41f1f6500b293678aa1691f1537">dsDrawCylinder</a> (const float pos[3], const float R[12], float length, float radius)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a z-aligned cylinder. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gce8f6c8a9f2871dac2f5e7f159b96feb"></a><!-- doxytag: member="drawstuff::dsDrawCapsule" ref="gce8f6c8a9f2871dac2f5e7f159b96feb" args="(const float pos[3], const float R[12], float length, float radius)" -->
DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#gce8f6c8a9f2871dac2f5e7f159b96feb">dsDrawCapsule</a> (const float pos[3], const float R[12], float length, float radius)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a z-aligned capsule. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g61b166a9b7c04063a27be982051f4af5"></a><!-- doxytag: member="drawstuff::dsDrawLine" ref="g61b166a9b7c04063a27be982051f4af5" args="(const float pos1[3], const float pos2[3])" -->
DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g61b166a9b7c04063a27be982051f4af5">dsDrawLine</a> (const float pos1[3], const float pos2[3])</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a line. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g4b8754994a4cca9d51fce16445f0d612"></a><!-- doxytag: member="drawstuff::dsDrawConvex" ref="g4b8754994a4cca9d51fce16445f0d612" args="(const float pos[3], const float R[12], float *_planes, unsigned int _planecount, float *_points, unsigned int _pointcount, unsigned int *_polygons)" -->
DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g4b8754994a4cca9d51fce16445f0d612">dsDrawConvex</a> (const float pos[3], const float R[12], float *_planes, unsigned int _planecount, float *_points, unsigned int _pointcount, unsigned int *_polygons)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Draw a convex shape. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DS_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__drawstuff.html#g211aa83d5c5d102cdda303cc7aeb2fd5">dsSetSphereQuality</a> (int n)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the quality with which curved objects are rendered. <a href="#g211aa83d5c5d102cdda303cc7aeb2fd5"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
DrawStuff is a library for rendering simple 3D objects in a virtual environment, for the purposes of demonstrating the features of ODE. It is provided for demonstration purposes and is not intended for production use.<h2><a class="anchor" name="Notes">
Notes</a></h2>
In the virtual world, the z axis is "up" and z=0 is the floor.<p>
The user is able to click+drag in the main window to move the camera: left button - pan and tilt. right button - forward and sideways. left + right button (or middle button) - sideways and up. <hr><h2>Function Documentation</h2>
<a class="anchor" name="ga84175b14c3c31daae08a9c88acc2b02"></a><!-- doxytag: member="drawstuff.h::dsDebug" ref="ga84175b14c3c31daae08a9c88acc2b02" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsDebug </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
exit with error message and core dump.
<p>
this functions tries to dump core or start the debugger. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em> </td><td>format strin, like printf, without the newline character. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gfba4fde6b0b74f6cd422036dedd08836"></a><!-- doxytag: member="drawstuff.h::dsDrawBox" ref="gfba4fde6b0b74f6cd422036dedd08836" args="(const float pos[3], const float R[12], const float sides[3])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsDrawBox </td>
<td>(</td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>pos</em>[3], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>R</em>[12], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>sides</em>[3]</td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Draw a box.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>is the x,y,z of the center of the object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>R</em> </td><td>is a 3x3 rotation matrix for the object, stored by row like this: [ R11 R12 R13 0 ] [ R21 R22 R23 0 ] [ R31 R32 R33 0 ] </td></tr>
<tr><td valign="top"></td><td valign="top"><em>sides[]</em> </td><td>is an array of x,y,z side lengths. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g0802e7641f8028182b69fabc729a6704"></a><!-- doxytag: member="drawstuff.h::dsDrawSphere" ref="g0802e7641f8028182b69fabc729a6704" args="(const float pos[3], const float R[12], float radius)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsDrawSphere </td>
<td>(</td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>pos</em>[3], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>R</em>[12], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>radius</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Draw a sphere.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>Position of center. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>R</em> </td><td>orientation. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>radius</em> </td><td></td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gcfcbae15cee67eceb45cd96bf01484d4"></a><!-- doxytag: member="drawstuff.h::dsDrawTriangle" ref="gcfcbae15cee67eceb45cd96bf01484d4" args="(const float pos[3], const float R[12], const float *v0, const float *v1, const float *v2, int solid)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsDrawTriangle </td>
<td>(</td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>pos</em>[3], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float </td>
<td class="paramname"> <em>R</em>[12], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float * </td>
<td class="paramname"> <em>v0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float * </td>
<td class="paramname"> <em>v1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float * </td>
<td class="paramname"> <em>v2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>solid</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Draw a triangle.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>Position of center </td></tr>
<tr><td valign="top"></td><td valign="top"><em>R</em> </td><td>orientation </td></tr>
<tr><td valign="top"></td><td valign="top"><em>v0</em> </td><td>first vertex </td></tr>
<tr><td valign="top"></td><td valign="top"><em>v1</em> </td><td>second </td></tr>
<tr><td valign="top"></td><td valign="top"><em>v2</em> </td><td>third vertex </td></tr>
<tr><td valign="top"></td><td valign="top"><em>solid</em> </td><td>set to 0 for wireframe </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g02f3f096703d49f5a9e497aec0b85f75"></a><!-- doxytag: member="drawstuff.h::dsElapsedTime" ref="g02f3f096703d49f5a9e497aec0b85f75" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API double dsElapsedTime </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the elapsed time (on wall-clock).
<p>
It returns the nr of seconds since the last call to this function.
</div>
</div><p>
<a class="anchor" name="g7a2a69ac611d5dc6ffc8e43b0a743472"></a><!-- doxytag: member="drawstuff.h::dsError" ref="g7a2a69ac611d5dc6ffc8e43b0a743472" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsError </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
exit with error message.
<p>
This function displays an error message then exit. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em> </td><td>format strin, like printf, without the newline character. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gaa22f45ad00e0010a1440985ac51b18b"></a><!-- doxytag: member="drawstuff.h::dsGetViewpoint" ref="gaa22f45ad00e0010a1440985ac51b18b" args="(float xyz[3], float hpr[3])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsGetViewpoint </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>xyz</em>[3], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>hpr</em>[3]</td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the viewpoint.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>xyz</em> </td><td>position </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hpr</em> </td><td>heading,pitch,roll. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="gbca5fa4076aa9e45caa049f33e8cf168"></a><!-- doxytag: member="drawstuff.h::dsPrint" ref="gbca5fa4076aa9e45caa049f33e8cf168" args="(char *msg,...)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsPrint </td>
<td>(</td>
<td class="paramtype">char * </td>
<td class="paramname"> <em>msg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"> <em>...</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
print log message
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>msg</em> </td><td>format string, like printf, without the <br>
. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g3221a0d1360621eaad7c54597671c092"></a><!-- doxytag: member="drawstuff.h::dsSetColor" ref="g3221a0d1360621eaad7c54597671c092" args="(float red, float green, float blue)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSetColor </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>red</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>green</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>blue</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the color with which geometry is drawn.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>red</em> </td><td>Red component from 0 to 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>green</em> </td><td>Green component from 0 to 1 </td></tr>
<tr><td valign="top"></td><td valign="top"><em>blue</em> </td><td>Blue component from 0 to 1 </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g440940cfaef61775e37c33b055b832af"></a><!-- doxytag: member="drawstuff.h::dsSetColorAlpha" ref="g440940cfaef61775e37c33b055b832af" args="(float red, float green, float blue, float alpha)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSetColorAlpha </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>red</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>green</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>blue</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>alpha</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the color and transparency with which geometry is drawn.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>alpha</em> </td><td>Note that alpha transparency is a misnomer: it is alpha opacity. 1.0 means fully opaque, and 0.0 means fully transparent. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g211aa83d5c5d102cdda303cc7aeb2fd5"></a><!-- doxytag: member="drawstuff.h::dsSetSphereQuality" ref="g211aa83d5c5d102cdda303cc7aeb2fd5" args="(int n)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSetSphereQuality </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>n</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set the quality with which curved objects are rendered.
<p>
Higher numbers are higher quality, but slower to draw. This must be set before the first objects are drawn to be effective. Default sphere quality is 1, default capsule quality is 3.
</div>
</div><p>
<a class="anchor" name="g8a3d6f8fecc8c7d5a206bed35f17ba7a"></a><!-- doxytag: member="drawstuff.h::dsSetTexture" ref="g8a3d6f8fecc8c7d5a206bed35f17ba7a" args="(int texture_number)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSetTexture </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>texture_number</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Toggle the rendering of textures.
<p>
It changes the way objects are drawn. these changes will apply to all further dsDrawXXX() functions. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>the</em> </td><td>texture number must be a DS_xxx texture constant. The current texture is colored according to the current color. At the start of each frame, the texture is reset to none and the color is reset to white. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g8e4ea933c31d207ec57949fbb3a75815"></a><!-- doxytag: member="drawstuff.h::dsSetViewpoint" ref="g8e4ea933c31d207ec57949fbb3a75815" args="(float xyz[3], float hpr[3])" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSetViewpoint </td>
<td>(</td>
<td class="paramtype">float </td>
<td class="paramname"> <em>xyz</em>[3], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float </td>
<td class="paramname"> <em>hpr</em>[3]</td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the viewpoint.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>xyz</em> </td><td>camera position. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>hpr</em> </td><td>contains heading, pitch and roll numbers in degrees. heading=0 points along the x axis, pitch=0 is looking towards the horizon, and roll 0 is "unrotated". </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g28560ea1b64c1d83095bcdfce9caf9dc"></a><!-- doxytag: member="drawstuff.h::dsSimulationLoop" ref="g28560ea1b64c1d83095bcdfce9caf9dc" args="(int argc, char **argv, int window_width, int window_height, struct dsFunctions *fn)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsSimulationLoop </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>argv</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>window_width</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>window_height</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structds_functions.html">dsFunctions</a> * </td>
<td class="paramname"> <em>fn</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Does the complete simulation.
<p>
This function starts running the simulation, and only exits when the simulation is done. Function pointers should be provided for the callbacks. <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>argv</em> </td><td>supports flags like '-notex' '-noshadow' '-pause' </td></tr>
<tr><td valign="top"></td><td valign="top"><em>fn</em> </td><td>Callback functions. </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="g6c13a5a310b9e00c45150058e669ebad"></a><!-- doxytag: member="drawstuff.h::dsStop" ref="g6c13a5a310b9e00c45150058e669ebad" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DS_API void dsStop </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Stop the simulation loop.
<p>
Calling this from within <a class="el" href="group__drawstuff.html#g28560ea1b64c1d83095bcdfce9caf9dc" title="Does the complete simulation.">dsSimulationLoop()</a> will cause it to exit and return to the caller. it is the same as if the user used the exit command. using this outside the loop will have no effect.
</div>
</div><p>
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 12 08:36:52 2007 for Open Dynamics Engine by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
|