C++ SDK Reference  12.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
diguy_constants.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, Constants and Enumerations
30  **
31  ** The API is subject to change in future releases.
32  **
33  */
34 
35 #ifndef __diguy_constants_H
36 #define __diguy_constants_H
37 
38 #ifdef SWIG
39 %module diguy_constants
40 #else
41 #define CPLUSPLUS_ONLY
42 #endif
43 
44 #ifdef CPLUSPLUS_ONLY
45 #include <declspec_bdiutil.h>
46 #endif
47 
48 
49 /*****************************************************************************/
50 /*****************************************************************************/
59 #define DIGUY_VERSION_STRING "12.5.1"
60 
61 #define DIGUY_VERSION_MAJOR 12
62 #define DIGUY_VERSION_MINOR 5
63 #define DIGUY_VERSION_POINT 1
64 
65 
66 #define DIGUY_REQUIRED_DATA_VERSION_MAJOR 12
67 #define DIGUY_REQUIRED_DATA_VERSION_MINOR 5
68 #define DIGUY_REQUIRED_DATA_VERSION_POINT 0
69 
70 
71 /*****************************************************************************/
72 /*****************************************************************************/
76 /*****************************************************************************/
77 /*****************************************************************************/
78 
79 
80 /****************************************************************************/
81 /*l
82  *b Description:
83  **
84  ** DI-Guy radians and degrees conversion factors.
85  **
86  */
87 #define DIGUY_PI (3.14159265358979323f)
88 
89 #define DIGUY_RAD2DEG (180.0f / DIGUY_PI)
90 #define DIGUY_DEG2RAD (DIGUY_PI / 180.0f)
91 
92 
93 /****************************************************************************/
94 /*l
95  *b Description:
96  **
97  ** This value is a magic number that, when passed to certain functions,
98  ** means that the function should use or compute an appropriate default
99  ** value for the argument.
100  **
101  */
102 #define DIGUY_DEFAULT_FLOAT (-16384.0f)
103 
104 
105 /****************************************************************************/
106 /*l
107  *b Description:
108  **
109  ** This value is a magic number that, when passed to certain functions,
110  ** means that the function should use or compute an appropriate default
111  ** value for the argument.
112  **
113  */
114 #define DIGUY_DEFAULT_INT (-16384)
115 
116 
117 /*****************************************************************************/
118 /*****************************************************************************/
122 /*****************************************************************************/
123 /*****************************************************************************/
124 
125 
126 /****************************************************************************/
127 /*l
128  *b Description:
129  **
130  ** DI-Guy callbacks return a value of type diguyCallbackReturn,
131  ** which will be DIGUY_CALLBACK_STOP or DIGUY_CALLBACK_CONTINUE.
132  ** If the callback returns DIGUY_CALLBACK_STOP, the default handler
133  ** of the function will not be called; the callback is asserting
134  ** that it has done everything necessary for the function call.
135  ** If the callback returns DIGUY_CALLBACK_CONTINUE, the default
136  ** handler for the function will be called after the callback.
137  **
138  */
139 typedef enum
140 {
143 
145 
146 
147 /****************************************************************************/
148 /*l
149  *b Description:
150  **
151  ** DI-Guy character classes. This is a high-level description of the
152  ** type of thing a character represents.
153  **
154  */
155 typedef enum
156 {
168 
170 
172 /****************************************************************************/
173 /*l
174  *b Description:
175  **
176  ** This is an enumeration of the different modes a
177  ** DI-Guy character can be in. See diguyCharacter::get_action_mode(),
178  ** diguyCharacter::get_position_mode().
179  */
180 typedef enum
181 {
185 
187 
189 /****************************************************************************/
190 /*l
191  *b Description:
192  **
193  ** This is an enumeration of the different parameter comparison
194  ** options that can be specified to various DI-Guy function calls,
195  ** such as diguyCharacter::get_action_from_description().
196  */
197 typedef enum
198 {
208 /****************************************************************************/
209 /*l
210  *b Description:
211  **
212  ** This is an enumeration of the different muzzles that can
213  ** be specified to various DI-Guy function calls, such as
214  ** diguyCharacter::set_default_weapon_muzzle() and
215  ** diguyCharacter::fire_weapon().
216  */
217 typedef enum
218 {
228 
229 /****************************************************************************/
230 /*l
231  *b Description:
232  **
233  ** This is an enumeration of the different impact types that are found
234  ** in diguyImpact.
235  */
236 typedef enum
237 {
245 
246 
247 /****************************************************************************/
248 /*l
249  *b Description:
250  **
251  ** DI-Guy camera move modes.
252  **
253  ** In DI-Guy Scenario in Camera Input Mode, the movement
254  ** mode of the camera determines what will happen when
255  ** mouse buttons are pressed in the view window.
256  */
257 typedef enum
258 {
262 
264 
265 
266 /****************************************************************************/
267 /*l
268  *b Description:
269  **
270  ** DI-Guy camera projection modes.
271  **
272  */
273 typedef enum
274 {
279 
281 
282 
283 /****************************************************************************/
284 /*l
285  *b Description:
286  **
287  ** DI-Guy fog modes.
288  **
289  */
290 typedef enum
291 {
299 
301 
302 
303 /****************************************************************************/
304 /*l
305  *b Description:
306  **
307  ** DI-Guy history types.
308  **
309  */
310 typedef enum
311 {
317 
319 
320 
321 /****************************************************************************/
322 /*l
323  *b Description:
324  **
325  ** DI-Guy renderer class ids.
326  **
327  */
328 enum
329 {
330  DIGUY_CLASSID_START = 0x400,
331 
335 
341 } ;
342 
343 
344 /****************************************************************************/
345 /*l
346  *b Description:
347  **
348  ** DI-Guy renderer pass masks, set via diguyApp::set_render_pass_flags().
349  *>
350  *i DIGUY_RENDER_PASS_SKIP_PARTICLES
351  **
352  ** Particle rendering is skipped.
353  **
354  *i DIGUY_RENDER_PASS_USE_STORED_LOD_SETTINGS
355  **
356  ** LOD recalculation is skipped (for built-in OGL pipeline).
357  **
358  *i DIGUY_RENDER_PASS_REFLECTION
359  **
360  ** Internal use; water reflection objects are skipped.
361  **
362  *i DIGUY_RENDER_PASS_SHADOW
363  **
364  ** Shadow pass assumed; water, environmental effects are skipped.
365  **
366  *i DIGUY_RENDER_PASS_INTERSECTION
367  **
368  ** Pick pass assumed; link and shape colors are sent.
369  *<
370  */
372 {
375  DIGUY_RENDER_PASS_REFLECTION = 0x00000004,
376  DIGUY_RENDER_PASS_SHADOW = 0x00000008,
377  DIGUY_RENDER_PASS_INTERSECTION = 0x00000010
378 };
379 
381 /*****************************************************************************/
382 /*****************************************************************************/
405 typedef enum
406 {
409  DIGUY_LOAD_ASYNC = 2,
414 /****************************************************************************/
415 /*l
416  *b Description:
417  **
418  ** DI-Guy error codes.
419  **
420  */
421 enum
422 {
423  DIGUY_ERROR = -1,
424 
442 };
443 
444 
445 /****************************************************************************/
446 /*l
447  *b Description:
448  **
449  ** DI-Guy vector indices.
450  **
451  */
452 enum
453 {
461  DIGUY_VEC_RY,
462 
463  DIGUY_VEC_QX = 0,
464  DIGUY_VEC_QY,
465  DIGUY_VEC_QZ,
467 };
468 
469 
470 /****************************************************************************/
471 /*l
472  *b Description:
473  **
474  ** DI-Guy graphics joint types.
475  **
476  */
477 typedef enum
478 {
492 
494 
495 
496 /****************************************************************************/
497 /*l
498  *b Description:
499  **
500  ** When a scene is rendered in order to select a DI-Guy object from,
501  ** say, a mouse click, the type of object selected is identified by
502  ** this enumeration.
503  **
504  */
505 enum
506 {
524 };
527 /****************************************************************************/
528 /*l
529  *b Description:
530  **
531  ** This enumeration identifies which playback mode time should follow.
532  ** Only valid inside DI-Guy Scenario.
533  */
534 typedef enum
535 {
545 
547 
548 BDI_DECLSPEC_bdiutil const char* diguy_playback_mode_to_string(diguyScenarioPlaybackMode playback_mode);
549 BDI_DECLSPEC_bdiutil diguyScenarioPlaybackMode diguy_playback_mode_from_string(const char* string);
550 
551 
552 /****************************************************************************/
553 /*l
554  *b Description:
555  **
556  ** This enumeration lists the visibility options for various objects
557  ** in the DI-Guy Scenario environment.
558  */
559 typedef enum
560 {
561  DIGUY_VISIBLE_NONE = 0,
569 /****************************************************************************/
570 /*l
571  *b Description:
572  **
573  ** This enumeration lists which parts of a visual object may need to be
574  ** updated. The values can be or-ed together.
575  **
576  *i DIGUY_GRAPHICS_VISUAL_UPDATE_NONE
577  **
578  ** Nothing in the visual needs to be updated.
579  **
580  *i DIGUY_GRAPHICS_VISUAL_UPDATE_GEOMETRY
581  **
582  ** The overall geometry of the visual needs to be updated. This means
583  ** that vertices and other parts of polygons need to be recalculated.
584  **
585  *i DIGUY_GRAPHICS_VISUAL_UPDATE_POSITION
586  **
587  ** The position and/or orientation of the visual needs to be updated.
588  ** The overall geometry of the visual (polygons, lines, etc.) remains
589  ** unchanged.
590  **
591  *i DIGUY_GRAPHICS_VISUAL_UPDATE_MATERIAL
592  **
593  ** The material of the visual needs to be updated. This can include
594  ** color, fill options, line width, etc. The geometry and position of
595  ** the visual remain the same.
596  **
597  *i DIGUY_GRAPHICS_VISUAL_UPDATE_ALL
598  **
599  ** All aspects of the visual need to be updated.
600  **
601  */
602 typedef enum
603 {
609 
611 
612 
613 /****************************************************************************/
614 /*l
615  *b Description:
616  **
617  ** DI-Guy Euler angle orders.
618  **
619  */
620 typedef enum
621 {
629 
631 
632 
633 /****************************************************************************/
634 /*l
635  *b Description:
636  **
637  ** This enumeration is used for various variables in the
638  ** diguyScenarioMergeSettings object. In general it tells
639  ** the diguyScenario::merge() function whether to load
640  ** objects of a specified type at all, and if so, what to
641  ** do if a merged object conflicts with an existing object.
642  **
643  *i DIGUY_MERGE_FLAG_DONT_MERGE
644  **
645  ** Objects in the merged scenario are not loaded.
646  **
647  *i DIGUY_MERGE_FLAG_OVERWRITE_EXISTING
648  **
649  ** Objects in the merged scenario are loaded.
650  **
651  ** In the case of a conflict, the exiting object is overwritten
652  ** with the values of the merge object.
653  **
654  *i DIGUY_MERGE_FLAG_KEEP_BOTH
655  **
656  ** Objects in the merged scenario are loaded.
657  **
658  ** In the case of a conflict, both the exiting object
659  ** and the merge object are kept, with no modifications.
660  ** Note that this will leave some ambiguity of referencing
661  ** objects by name. A warning will be printed.
662  **
663  ** Note that this value is here to allow for backward
664  ** compatibility; it is not recommended for general use.
665  **
666  *i DIGUY_MERGE_FLAG_KEEP_EXISTING_ONLY
667  **
668  ** Objects in the merged scenario are loaded.
669  **
670  ** In the case of a conflict, the exiting object is kept
671  ** as is and the merge object is discarded.
672  **
673  *i DIGUY_MERGE_FLAG_KEEP_EXISTING_ONLY_AND_WARN
674  **
675  ** Same as DIGUY_MERGE_FLAG_KEEP_EXISTING, but also prints
676  ** a warning.
677  **
678  *i DIGUY_MERGE_FLAG_RENAME_MERGED
679  **
680  ** Objects in the merged scenario are loaded.
681  **
682  ** In the case of a conflict, both the exiting object
683  ** and the merge object are kept, but the merged object
684  ** is renamed.
685  **
686  *i DIGUY_MERGE_FLAG_RENAME_MERGED_AND_WARN
687  **
688  ** Same as DIGUY_MERGE_FLAG_RENAME_MERGED, but also prints
689  ** a warning.
690  **
691  *i DIGUY_MERGE_FLAG_RENAME_MERGED_IF_NOT_EQUAL
692  **
693  ** Objects in the merged scenario are loaded.
694  **
695  ** In the case of a conflict, the existing object and merged
696  ** object are checked for "equality". If they are the same,
697  ** the existing object will be kept and the merge object will
698  ** be discarded. If they are different, both objects will
699  ** be kept, but the merge object will be renamed.
700  **
701  */
702 typedef enum
703 {
712 
714 
715 
716 /****************************************************************************/
717 /*l
718  *b Description:
719  **
720  ** This enumeration tells DI-Guy what values to use as defaults
721  ** when the diguyScenario::create_merge_settings() functions
722  ** is called. See the documentation for that function for
723  ** details on what the different values mean.
724  **
725  */
726 typedef enum
727 {
733 
737 /****************************************************************************/
738 /*l
739  *b Description:
740  **
741  ** This enumeration tells DI-Guy which scenario elements should be
742  ** reset after the merge is complete.
743  **
744  */
745 typedef enum
746 {
750 
752 
753 
754 /****************************************************************************/
755 /*l
756  *b Description:
757  **
758  ** This enumeration lists the cursors returnable by the plugin
759  ** function get_cursor().
760  **
761  *i DIGUY_PLUGIN_MOUSE_CURSOR_NONE
762  **
763  ** Plugin takes responsibility for drawing cursor, if any.
764  **
765  *i DIGUY_PLUGIN_MOUSE_CURSOR_LEFT_ARROW
766  **
767  ** The standard window-system left arrow cursor is shown.
768  **
769  *i DIGUY_PLUGIN_MOUSE_CURSOR_CROSSHAIR
770  **
771  ** Crosshair (plus-shaped) cursor is shown.
772  **
773  *i DIGUY_PLUGIN_MOUSE_CURSOR_POINTING_HAND
774  **
775  ** Pointing hand cursor is shown.
776  **
777  *i DIGUY_PLUGIN_MOUSE_CURSOR_FORBIDDEN
778  **
779  ** Action forbidden cursor is shown.
780  */
781 typedef enum
782 {
792 /****************************************************************************/
793 /*l
794  *b Description:
795  **
796  ** This enumeration lists which cross-sections are available for
797  ** DI-Guy chain simulation visuals.
798  **
799  *i DIGUY_CHAIN_CROSS_SECTION_SQUARE
800  **
801  ** The square cross-section is good for tube-like visuals, such as
802  ** hoses. The normals of the square cross-section point radially
803  ** outward from the center, giving the visual a rounded, tube-like
804  ** appearance.
805  **
806  *i DIGUY_CHAIN_CROSS_SECTION_PLUS
807  **
808  ** The plus cross-section is good for thin, chain-like visuals.
809  **
810  *i DIGUY_CHAIN_CROSS_SECTION_COIL
811  **
812  ** The coil cross-section is good for wires. The chain masses are
813  ** connected by line segments.
814  */
815 typedef enum
816 {
824 /****************************************************************************/
825 /*l
826  *b Description:
827  **
828  */
829 #define DIGUY_LOAD_MANAGER_NUM_ZONES (4)
830 #define DIGUY_LOAD_MANAGER_NUM_NONVISIBLE_ZONE_INDEX (3)
833 /****************************************************************************/
834 /*l
835  *b Description:
836  **
837  ** This enumeration lists the input modes available in DI-Guy
838  ** Scenario views (3D windows) and for DI-Guy Author.
839  */
840 typedef enum
841 {
864 BDI_DECLSPEC_bdiutil const char* diguy_input_mode_to_string(diguyScenarioInputMode input_mode);
865 BDI_DECLSPEC_bdiutil diguyScenarioInputMode diguy_input_mode_from_string(const char* string);
868 /****************************************************************************/
869 /*l
870  *b Description:
871  **
872  ** This enumeration lists the windows that can be shown in the
873  ** DI-Guy Scenario application.
874  */
875 typedef enum
876 {
905 /****************************************************************************/
906 /*l
907  *b Description:
908  **
909  ** This enumeration lists different types of editing actions that
910  ** can be performed in the DI-Guy Scenario application.
911  */
912 typedef enum
913 {
914  // File menu
924  // Edit menu
931 
932  // Help menu
936 
937  // number of edit actions
939 
941 
942 
943 /****************************************************************************/
944 /*l
945  *b Description:
946  **
947  ** This enumeration lists "special" (non-ASCII) keys that DI-Guy plugins
948  ** may respond to.
949  **
950  ** (These enumerations currently match the Qt 4 Qt::Key_* values.)
951  */
952 enum
953 {
954  DIGUY_SPECIAL_KEY_MIN = 0x1000000,
955  DIGUY_SPECIAL_KEY_ESC = 0x1000000,
956  DIGUY_SPECIAL_KEY_TAB = 0x1000001,
957  DIGUY_SPECIAL_KEY_BACKTAB = 0x1000002,
958  DIGUY_SPECIAL_KEY_BACKSPACE = 0x1000003,
959  DIGUY_SPECIAL_KEY_RETURN = 0x1000004,
960  DIGUY_SPECIAL_KEY_ENTER = 0x1000005,
961  DIGUY_SPECIAL_KEY_INSERT = 0x1000006,
962  DIGUY_SPECIAL_KEY_DELETE = 0x1000007,
963  DIGUY_SPECIAL_KEY_PAUSE = 0x1000008,
964  DIGUY_SPECIAL_KEY_PRINT = 0x1000009,
965  DIGUY_SPECIAL_KEY_HOME = 0x1000010,
966  DIGUY_SPECIAL_KEY_END = 0x1000011,
967  DIGUY_SPECIAL_KEY_LEFT = 0x1000012,
968  DIGUY_SPECIAL_KEY_UP = 0x1000013,
969  DIGUY_SPECIAL_KEY_RIGHT = 0x1000014,
970  DIGUY_SPECIAL_KEY_DOWN = 0x1000015,
971  DIGUY_SPECIAL_KEY_PAGE_UP = 0x1000016,
972  DIGUY_SPECIAL_KEY_PAGE_DOWN = 0x1000017,
973 
974  DIGUY_SPECIAL_F1 = 0x1000030,
975  DIGUY_SPECIAL_F2 = 0x1000031,
976  DIGUY_SPECIAL_F3 = 0x1000032,
977  DIGUY_SPECIAL_F4 = 0x1000033,
978  DIGUY_SPECIAL_F5 = 0x1000034,
979  DIGUY_SPECIAL_F6 = 0x1000035,
980  DIGUY_SPECIAL_F7 = 0x1000036,
981  DIGUY_SPECIAL_F8 = 0x1000037,
982  DIGUY_SPECIAL_F9 = 0x1000038,
983  DIGUY_SPECIAL_F10 = 0x1000039,
984  DIGUY_SPECIAL_F11 = 0x100003A,
985  DIGUY_SPECIAL_F12 = 0x100003B,
986 
987  DIGUY_SPECIAL_KEY_MAX = 0x10000FF
988 };
989 
990 
991 /****************************************************************************/
992 /*l
993  *b Description:
994  **
995  ** DI-Guy aim algorithms.
996  **
997  */
998 typedef enum
999 {
1002 
1004 
1005 
1006 
1007 
1008 /*****************************************************************************/
1009 /*****************************************************************************/
1013 /*****************************************************************************/
1014 /*****************************************************************************/
1015 
1016 
1017 /****************************************************************************/
1018 /*l
1019  *b Description:
1020  **
1021  ** This enumeration lists the methods available for collision detection
1022  ** and avoidance against dynamic objects.
1023  **
1024  *i DIGUY_DYNAMIC_AVOIDANCE_METHOD_DISABLED
1025  **
1026  ** Dynamic objects are not detected or avoided. In effect this means
1027  ** that characters will walk through each other.
1028  **
1029  ** If a crowd is far away from the viewpoint, it is not obvious that
1030  ** this is happening. Disabling the crowd's dynamic avoidance can
1031  ** reduce the overhead of the crowd on performance.
1032  **
1033  *i DIGUY_DYNAMIC_AVOIDANCE_METHOD_REPULSION_ZONES
1034  **
1035  ** Characters are surrounded by zones of repulsion. Other characters
1036  ** that enter these zones have their position, orientation, and/or
1037  ** action changed to try to get out of the zones.
1038  **
1039  *i DIGUY_DYNAMIC_AVOIDANCE_METHOD_SIMPLE
1040  **
1041  ** This is an experimental method that is still being developed.
1042  ** It should not be used for now.
1043  */
1044 typedef enum
1045 {
1049 
1051 
1052 
1053 /****************************************************************************/
1054 /*l
1055  *b Description:
1056  **
1057  ** This enumeration lists the methods available for collision detection
1058  ** and avoidance against static objects in the environment. These are
1059  ** usually scene objects and non-moving props.
1060  **
1061  *i DIGUY_STATIC_AVOIDANCE_METHOD_DISABLED
1062  **
1063  ** Static objects are not detected or avoided. In effect this means
1064  ** that characters can walk through walls.
1065  **
1066  ** If a crowd is not near any buildings, walls, or solid objects,
1067  ** disabling static avoidance can reduce the overhead of the crowd
1068  ** on performance.
1069  **
1070  *i DIGUY_STATIC_AVOIDANCE_METHOD_FEELERS
1071  **
1072  ** The character uses 'feelers' to detect static objects and turn
1073  ** away from them.
1074  */
1075 typedef enum
1076 {
1079 
1081 
1082 
1083 /****************************************************************************/
1084 /*l
1085  *b Description:
1086  **
1087  ** This enumeration lists the standard feelers used for static object
1088  ** avoidance used by I-Guy and agent characters.
1089  */
1090 typedef int diguyCharacterFeelerNumber;
1091 
1092 enum
1093 {
1098  DIGUY_CHARACTER_FEELER_R, // right
1099  DIGUY_CHARACTER_FEELER_BL, // back left
1100  DIGUY_CHARACTER_FEELER_BR, // back right
1101  DIGUY_CHARACTER_FEELER_B, // back
1103 };
1104 
1105 
1106 /****************************************************************************/
1107 /*l
1108  *b Description:
1109  **
1110  ** This enumeration lists the state character feelers may be in.
1111  **
1112  *i DIGUY_CHARACTER_FEELER_STATUS_NO_CONTACT
1113  **
1114  ** Feeler is not in contact with anything.
1115  **
1116  *i DIGUY_CHARACTER_FEELER_STATUS_CONTACT_TURN
1117  **
1118  ** Feeler is in contact with an object just enough to cause the
1119  ** character to begin to turn.
1120  **
1121  *i DIGUY_CHARACTER_FEELER_STATUS_CONTACT_COLLIDE
1122  **
1123  ** Feeler is in close contact with an object. The object should be
1124  ** pushing the character away.
1125  **
1126  *i DIGUY_CHARACTER_FEELER_STATUS_CONTACT_TURN_AND_COLLIDE
1127  **
1128  ** Feeler is within both turn and contact distances of an object.
1129  */
1130 typedef enum
1131 {
1136 
1138 
1139 
1140 /****************************************************************************/
1141 /*l
1142  *b Description:
1143  **
1144  ** This enumeration lists the turn directions a feeler can use when
1145  ** its status is DIGUY_CHARACTER_FEELER_STATUS_CONTACT_TURN.
1146  **
1147  *i DIGUY_CHARACTER_FEELER_TURN_DIRECTION_NONE
1148  **
1149  ** Feeler does not turn the character.
1150  **
1151  *i DIGUY_CHARACTER_FEELER_TURN_DIRECTION_L
1152  **
1153  ** Feeler turns the character to the left.
1154  **
1155  *i DIGUY_CHARACTER_FEELER_TURN_DIRECTION_R
1156  **
1157  ** Feeler turns the character to the right.
1158  **
1159  *i DIGUY_CHARACTER_FEELER_TURN_DIRECTION_L_OR_R
1160  **
1161  ** Feeler turns the character to the left or right, whichever
1162  ** will result in the turn behavior ending more quickly.
1163  */
1164 typedef enum
1165 {
1167  DIGUY_CHARACTER_FEELER_TURN_DIRECTION_L, // as string: "left"
1169  DIGUY_CHARACTER_FEELER_TURN_DIRECTION_L_OR_R // as string: "left_or_right"
1174 /****************************************************************************/
1175 /*l
1176  *b Description:
1177  **
1178  ** Directions a character can be traveling on a navigation path
1179  ** (nav path).
1180  **
1181  ** The travel behavior of agents use nav paths.
1182  **
1183  */
1184 typedef enum
1185 {
1186  DIGUY_NAV_PATH_DIRECTION_UNKNOWN = 0, // as string: "unknown"
1187  DIGUY_NAV_PATH_DIRECTION_FORWARD, // as string: "forward"
1188  DIGUY_NAV_PATH_DIRECTION_BACKWARD, // as string: "backward"
1190 
1192 
1193 
1194 /****************************************************************************/
1195 /*l
1196  *b Description:
1197  **
1198  ** What a character following a nav path will do once it reaches the
1199  ** end of a nav path.
1200  **
1201  ** The travel behavior of agents use nav paths.
1202  **
1203  *i DIGUY_NAV_PATH_AT_END_REVERSE
1204  **
1205  ** Agent reverses direction on the nav path, going through waypoints
1206  ** in opposite order.
1207  **
1208  *i DIGUY_NAV_PATH_AT_END_LOOP
1209  **
1210  ** Agent's next waypoint is waypoint 0. Best when last waypoint and
1211  ** first waypoint are close to each other, as in a loop path.
1212  **
1213  *i DIGUY_NAV_PATH_AT_END_STOP
1214  **
1215  ** Stop at the end, switching to behavior none.
1216  **
1217  *i DIGUY_NAV_PATH_AT_END_TELEPORT
1218  **
1219  ** Teleport to the beginning. In general agents should be out of view
1220  ** at the beginning and end of the path, if possible.
1221  */
1222 typedef enum
1223 {
1224  DIGUY_NAV_PATH_AT_END_UNKNOWN = 0, // as string: "unknown"
1225  DIGUY_NAV_PATH_AT_END_REVERSE, // as string: "reverse"
1226  DIGUY_NAV_PATH_AT_END_LOOP, // as string: "loop"
1227  DIGUY_NAV_PATH_AT_END_STOP, // as string: "stop"
1228  DIGUY_NAV_PATH_AT_END_TELEPORT, // as string: "teleport"
1229 
1230  // internal use only
1232 
1234 
1236 
1237 
1238 /****************************************************************************/
1239 /*l
1240  *b Description:
1241  **
1242  ** Errors various nav path functions may return.
1243  */
1244 typedef enum
1245 {
1256 
1257 
1258 /****************************************************************************/
1259 /*l
1260  *b Description:
1261  **
1262  ** Selection methods for records from crowd profiles.
1263  */
1264 typedef enum
1265 {
1273 /****************************************************************************/
1274 /*l
1275  *b Description:
1276  **
1277  ** DI-Guy agent repulsion zones for characters with dynamic
1278  ** avoidance method DIGUY_DYNAMIC_AVOIDANCE_METHOD_REPULSION_ZONES.
1279  */
1280 typedef enum
1288 
1290 
1291 
1292 /****************************************************************************/
1293 /*l
1294  *b Description:
1295  **
1296  ** DI-Guy agent behaviors.
1297  **
1298  ** Following is a short description of each behavior. See the DI-Guy AI
1299  ** documentation for more details.
1300  **
1301  *i DIGUY_AGENT_BEHAVIOR_NONE
1302  **
1303  ** Agent functionality is completely inactive. The character's actions
1304  ** are determined by its character path or direct DI-Guy API calls.
1305  **
1306  *i DIGUY_AGENT_BEHAVIOR_TRAVEL
1307  **
1308  ** Agent attempts to travel close to a path shape. Many agents can use
1309  ** the same path shape for the travel behavior.
1310  **
1311  *i DIGUY_AGENT_BEHAVIOR_PATH_FOLLOW
1312  **
1313  ** Similar to DIGUY_AGENT_BEHAVIOR_TRAVEL, but agent follows a
1314  ** character path instead of a path shape, and attempts to match the
1315  ** timing of the character path in addition to the path shape. If the
1316  ** agent is interrupted from the path, it will attempt to resume it
1317  ** where it left off.
1318  **
1319  *i DIGUY_AGENT_BEHAVIOR_WANDER
1320  **
1321  ** Agent wanders a region. In this case wander means it will select a
1322  ** random point within the region and move close to it, and then wait
1323  ** there for a period of time before selecting a new point in the
1324  ** region.
1325  **
1326  *i DIGUY_AGENT_BEHAVIOR_MINGLE
1327  **
1328  ** Similar to wander, but agents attempt to move together to various
1329  ** places in the region.
1330  **
1331  *i DIGUY_AGENT_BEHAVIOR_FLEE
1332  **
1333  ** Agent attempts to move away from a specified character or point.
1334  **
1335  *i DIGUY_AGENT_BEHAVIOR_PURSUE
1336  **
1337  ** Agent attempts to stay close to a specified character or member of a
1338  ** group.
1339  **
1340  *i DIGUY_AGENT_BEHAVIOR_ATTACK
1341  **
1342  ** Similar to pursue, but once agents are close enough they will attack
1343  ** the target.
1344  **
1345  *i DIGUY_AGENT_BEHAVIOR_IDLE
1346  **
1347  ** Agent has no particular automatic behavior; it follows its path or
1348  ** moves toward its desired position as set by
1349  ** diguyCharacter::set_desired_position(). It will affect other agents
1350  ** in its crowd, and if pushed away from its desired position it will
1351  ** move back to it.
1352  */
1353 typedef enum
1354 {
1355  DIGUY_AGENT_BEHAVIOR_UNKNOWN = -1, // as string: "unknown"
1356  DIGUY_AGENT_BEHAVIOR_NONE = 0, // as string: "none"
1357  DIGUY_AGENT_BEHAVIOR_TRAVEL, // as string: "travel"
1358  DIGUY_AGENT_BEHAVIOR_PATH_FOLLOW, // as string: "path_follow"
1359  DIGUY_AGENT_BEHAVIOR_WANDER, // as string: "wander"
1360  DIGUY_AGENT_BEHAVIOR_FLEE, // as string: "flee"
1361  DIGUY_AGENT_BEHAVIOR_PURSUE, // as string: "pursue"
1362  DIGUY_AGENT_BEHAVIOR_MINGLE, // as string: "mingle"
1363  DIGUY_AGENT_BEHAVIOR_ATTACK, // as string: "attack"
1364  DIGUY_AGENT_BEHAVIOR_IDLE, // as string: "idle"
1366 
1368 
1369 
1370 /****************************************************************************/
1371 /*l
1372  *b Description:
1373  **
1374  ** DI-Guy agent untrap methods.
1375  **
1376  ** Following is a short description of each untrap method. See the
1377  ** DI-Guy AI documentation for more details.
1378  **
1379  *i DIGUY_AGENT_UNTRAP_METHOD_NONE
1380  **
1381  ** The agent makes no attempt to become untrapped. This can result in
1382  ** the agent blindly walking into a wall until its desired position
1383  ** changes.
1384  **
1385  *i DIGUY_AGENT_UNTRAP_METHOD_NAV_PATH
1386  **
1387  ** The agent will try to create a nav path in its current region to its
1388  ** desired position. If the desired position is not inside the region,
1389  ** a valid nav path may not be able to be found.
1390  **
1391  *i DIGUY_AGENT_UNTRAP_METHOD_RANDOM_TURN
1392  **
1393  ** The agent will stop moving and turn a random amount. This minor
1394  ** course change can sometimes move a character around a small
1395  ** obstacle.
1396  **
1397  *i DIGUY_AGENT_UNTRAP_METHOD_GHOST
1398  **
1399  ** Agent feelers will stop having an effect for a short time. This
1400  ** allows the agent to walk through a wall toward its desired
1401  ** position.
1402  **
1403  *i DIGUY_AGENT_UNTRAP_METHOD_TELEPORT
1404  **
1405  ** This is an extreme method, typically used as a last resort. The
1406  ** agent abruptly teleports to its desired position.
1407  **
1408  *i DIGUY_AGENT_UNTRAP_METHOD_STOP_MOVING
1409  **
1410  ** Somewhat similar to DIGUY_AGENT_UNTRAP_METHOD_NONE, but the current
1411  ** behavior of the agent is set to none, and the agent character's
1412  ** desired position is set to its current position.
1413  */
1414 typedef enum
1415 {
1416  DIGUY_AGENT_UNTRAP_METHOD_NONE = 0, // as string: "none"
1417  DIGUY_AGENT_UNTRAP_METHOD_NAV_PATH, // as string: "nav_path"
1418  DIGUY_AGENT_UNTRAP_METHOD_RANDOM_TURN, // as string: "random_turn"
1419  DIGUY_AGENT_UNTRAP_METHOD_GHOST, // as string: "ghost"
1420  DIGUY_AGENT_UNTRAP_METHOD_TELEPORT, // as string: "teleport"
1421  DIGUY_AGENT_UNTRAP_METHOD_STOP_MOVING, // as string: "stop_moving"
1423 
1425 
1426 
1427 /****************************************************************************/
1428 /*l
1429  *b Description:
1430  **
1431  ** DI-Guy region painting modes.
1432  **
1433  ** Painting modes identify what happens when a region paintbrush is used
1434  ** in some of the DI-Guy input modes.
1435  **
1436  *i DIGUY_REGION_PAINTBRUSH_MODE_ADDITIVE
1437  **
1438  ** Painting will add area to the current subregion. This may end up
1439  ** adding area to the base subregion, as well, as it contains at
1440  ** least the areas of all subregions.
1441  **
1442  *i DIGUY_REGION_PAINTBRUSH_MODE_ERASE
1443  **
1444  ** Painting will remove area from the current subregion. If the base
1445  ** subregion is erased, all matching areas in other subregions will be
1446  ** erased, as well.
1447  **
1448  *i DIGUY_REGION_PAINTBRUSH_MODE_UNGROUND_CLAMP
1449  **
1450  ** Documentation pending.
1451  **
1452  *i DIGUY_REGION_PAINTBRUSH_MODE_MOVE_MESH
1453  **
1454  ** Documentation pending.
1455  **
1456  *i DIGUY_REGION_PAINTBRUSH_MODE_REACHABLE
1457  **
1458  ** Documentation pending.
1459  **
1460  *i DIGUY_REGION_PAINTBRUSH_INTERNAL_MODE_UPDATE_BEHAVIOR_PATH
1461  **
1462  ** Internal use only.
1463  **
1464  *i DIGUY_REGION_PAINTBRUSH_INTERNAL_MODE_REPLACE
1465  **
1466  ** Internal use only.
1467  **
1468  */
1469 typedef enum
1479 
1481 
1482 
1483 /****************************************************************************/
1484 /*l
1485  *b Description:
1486  **
1487  ** DI-Guy subregions.
1488  **
1489  ** Regions are irregularly shaped areas in the scene that can be used
1490  ** in a number of ways.
1491  **
1492  ** Regions contain a number of subregions. Each subregion is represented
1493  ** by a different color, and most often the subregions are referred to
1494  ** by their color. Subregions are not mutually exclusive; a point in
1495  ** the scene may be in all of the base, populate, and green subregions,
1496  ** for example.
1497  **
1498  ** Many functions that take one subregion as an argument use the string
1499  ** name of the subregion.
1500  **
1501  ** Functions that can have multiple subregions specified use a subregion
1502  ** mask made up of diguySubregionMask values that can be or'ed together
1503  ** to indicate multiple valid subregions. See diguySubregionMask for
1504  ** more information.
1505  **
1506  *i DIGUY_SUBREGION_BASE
1507  **
1508  ** This subregion is really a "super-region", in that its bounds contain
1509  ** all of the other subregions, and possibly more.
1510  **
1511  ** If any subregion of a top-level region is expanded beyond the bounds
1512  ** of the base subregion, the base subregion will be expanded until
1513  ** it encompasses the expansion.
1514  **
1515  ** If, however, a non-base subregion is subsequently shrunk, the base
1516  ** subregion will not shrink.
1517  **
1518  ** If the base subregion is shrunk, any portion of each non-base
1519  ** subregion that is no longer in the base subregion will be removed.
1520  **
1521  *i DIGUY_SUBREGION_POPULATE
1522  **
1523  ** The subregion into which new crowd agents will be placed if the
1524  ** region is populated or repopulated. This subregion is typically
1525  ** purple.
1526  **
1527  ** DIGUY_SUBREGION_[color]
1528  **
1529  ** The "color" subregions are free to be used in any way a scenario
1530  ** designer wants. Their colors are based on their name.
1531  **
1532  *i DIGUY_SUBREGION_ROAD
1533  **
1534  ** Road subregions are commonly used as preferred subregions for vehicle
1535  ** travel, and repulsion subregions for human travel. This subregion
1536  ** is typically gray.
1537  **
1538  *i DIGUY_SUBREGION_SIDEWALK
1539  **
1540  ** Sidewalk subregions are commonly used as preferred subregions for
1541  ** human travel, and repulsion subregions for vehicles. This subregion
1542  ** is typically white.
1543  **
1544  *i DIGUY_SUBREGION_CROSSWALK
1545  **
1546  ** Humans will tend to prefer crosswalk subregions over road subregions,
1547  ** but prefer sidewalk subregions over crosswalk subregions. This
1548  ** subregion is typically a light yellow.
1549  */
1550 typedef enum
1552  DIGUY_SUBREGION_BASE = 0, // as string: "base"
1553  DIGUY_SUBREGION_POPULATE, // as string: "populate"
1555  DIGUY_SUBREGION_RED, // as string: "red"
1556  DIGUY_SUBREGION_GREEN, // as string: "green"
1557  DIGUY_SUBREGION_BLUE, // as string: "blue"
1558  DIGUY_SUBREGION_YELLOW, // as string: "yellow"
1559  DIGUY_SUBREGION_ORANGE, // as string: "orange"
1560  DIGUY_SUBREGION_WHITE, // as string: "white"
1561 
1562  DIGUY_SUBREGION_ROAD, // as string: "road"
1563  DIGUY_SUBREGION_SIDEWALK, // as string: "sidewalk"
1564  DIGUY_SUBREGION_CROSSWALK, // as string: "crosswalk"
1565 
1567 
1569 
1570 
1571 BDI_DECLSPEC_bdiutil const char* diguy_subregion_index_to_string(diguySubregionIndex subregion_index);
1572 BDI_DECLSPEC_bdiutil diguySubregionIndex diguy_subregion_index_from_string(const char* string);
1574 
1575 /****************************************************************************/
1576 /*l
1577  *b Description:
1578  **
1579  ** DI-Guy subregions mask values.
1580  **
1581  *b Example:
1582  **
1583  ** To specify that a function can use either the red or blue subregions,
1584  ** the following syntax is used.
1585  **
1586  ** In Perl or C++:
1587  **
1588  *e DIGUY_SUBREGION_MASK_RED | DIGUY_SUBREGION_MASK_BLUE
1589  **
1590  ** In Lua:
1591  **
1592  *e bit.bor( DIGUY_SUBREGION_MASK_RED, DIGUY_SUBREGION_MASK_BLUE,...)
1593  **
1594  ** Lua does not natively support bitfields, but support is automatically
1595  ** added via the "LuaBit" library located in $(DIGUY)/bin/lua/bit.lua.
1596  */
1597 typedef enum
1598 {
1599  DIGUY_SUBREGION_MASK_NONE = 0x00000000,
1600  DIGUY_SUBREGION_MASK_BASE = 0x00000020,
1601  DIGUY_SUBREGION_MASK_POPULATE = 0x00000040,
1602 
1603  DIGUY_SUBREGION_MASK_RED = 0x00000080,
1604  DIGUY_SUBREGION_MASK_GREEN = 0x00000100,
1605  DIGUY_SUBREGION_MASK_BLUE = 0x00000200,
1606  DIGUY_SUBREGION_MASK_YELLOW = 0x00000400,
1607  DIGUY_SUBREGION_MASK_ORANGE = 0x00000800,
1608  DIGUY_SUBREGION_MASK_WHITE = 0x00001000,
1609 
1610  DIGUY_SUBREGION_MASK_ROAD = 0x00002000,
1611  DIGUY_SUBREGION_MASK_SIDEWALK = 0x00004000,
1612  DIGUY_SUBREGION_MASK_CROSSWALK = 0x00008000,
1613 
1615 
1616 
1617 /****************************************************************************/
1618 /*l
1619  *b Description:
1620  **
1621  ** DI-Guy geometry tags.
1622  **
1623  */
1624 typedef enum
1625 {
1626  DIGUY_GEOMETRY_TAG_NONE = 0x00000000,
1627  DIGUY_GEOMETRY_TAG_DOOR = 0x00000010,
1628  DIGUY_GEOMETRY_TAG_INSIDE = 0x00000020,
1629  DIGUY_GEOMETRY_TAG_OUTSIDE = 0x00000040,
1630  DIGUY_GEOMETRY_TAG_ROOF = 0x00000080,
1631 
1633 
1634 
1635 /****************************************************************************/
1636 /*l
1637  *b Description:
1638  **
1639  ** DI-Guy navigation mesh path planner cost masks.
1640  **
1641  */
1642 typedef enum
1643 {
1644  DIGUY_NAVMESH_SHORTEST_PATH = 0x00000001,
1645  DIGUY_NAVMESH_LEAST_VISIBLE = 0x00000002,
1646  DIGUY_NAVMESH_MESH_EDGE = 0x00000004,
1648  DIGUY_NAVMESH_MESH_AVOID_EDGES = 0x00000008,
1652 
1653 /****************************************************************************/
1654 /*
1655  * USMC chain of command:
1656  *
1657  * fire team - three individuals - corporal
1658  * squad - three teams - sergeant
1659  * platoon - three squads (usually) - lieutenant
1660  * company - three platoons - captain
1661  * battalion - three companies - lt. colonel
1662  * regiment (or brigade) - three battalions - ?
1663  * division - three regiments - ?
1664  * marine corps - three or more divisions - ?
1665  *
1666  */
1667 typedef enum
1668 {
1670 
1671  DIGUY_TACTICS_UNIT_TYPE_MARINE, // an individual
1689  DIGUY_TACTICS_UNIT_TYPE_ARMY // two or more corps
1690 
1692 
1693 
1694 /****************************************************************************/
1695 /*l
1696  *b Description:
1697  **
1698  ** This enumeration lists the methods in which the datetime of a scenario
1699  ** can advance.
1700  **
1701  *i DIGUY_DATETIME_ADVANCE_METHOD_MANUAL
1702  **
1703  ** Datetime does not advance automatically. It can only be set
1704  ** manually, e.g. by a diguyScenario::set_current_datetime() call.
1705  **
1706  *i DIGUY_DATETIME_ADVANCE_METHOD_REAL_TIME_RATE
1707  **
1708  ** Datetime advances at the same rate as realtime.
1709  **
1710  *i DIGUY_DATETIME_ADVANCE_METHOD_SIMULATION_TIME_RATE
1711  **
1712  ** Datetime advances at the same rate as simulation time.
1713  */
1714 typedef enum
1719 
1721 
1722 
1723 /****************************************************************************/
1724 /*l
1725  *b Description:
1726  **
1727  *i DIGUY_DATETIME_NETWORK_MODE_LOCAL_ONLY
1728  **
1729  ** Datetime data will be handled locally on this host. No data will be
1730  ** sent on the netword, and no data will be read from the network.
1731  **
1732  *i DIGUY_DATETIME_NETWORK_MODE_BROADCAST
1733  **
1734  ** Datetime data will be sent from this host to other hosts in the
1735  ** network. The datetime will be encoded in a custom
1736  ** DIGUY_CUSTOM_PDU_ID_BROADCAST_EXERCISE_DATETIME PDU. In general
1737  ** there should be only one host on the network broadcasting datetime
1738  ** data; all others should receive or ignore it.
1739  **
1740  *i DIGUY_DATETIME_NETWORK_MODE_RECEIVE
1741  **
1742  ** Datetime data will be read from the network from custom
1743  ** DIGUY_CUSTOM_PDU_ID_BROADCAST_EXERCISE_DATETIME PDUs.
1744  */
1745 typedef enum
1746 {
1750 
1752 
1753 
1754 /*****************************************************************************/
1755 /*****************************************************************************/
1759 /*****************************************************************************/
1760 /*****************************************************************************/
1763 /****************************************************************************/
1764 /*l
1765  *b Description:
1766  **
1767  ** This enumeration lists units of speed that can be passed to some
1768  ** DI-Guy API functions.
1769  **
1770  ** Note that if one of these values is used specifying an acceleration,
1771  ** add an implicit "per second" to the end. e.g., if 10.0 is passed as
1772  ** an acceleration, with units DIGUY_SPEED_UNITS_MILES_PER_HOUR,
1773  ** the resulting acceleration would be 10.0 miles per hour per second;
1774  ** or in other words, every 1 second speed would increase by 10.0 miles
1775  ** per hour.
1776  */
1777 typedef enum
1778 {
1782 
1783 } diguySpeedUnits;
1784 
1785 
1786 /****************************************************************************/
1787 /*l
1788  *b Description:
1789  **
1790  ** This enumeration lists the ways that data can be generated for DI-Guy
1791  ** characters. Data typically comes from the DI-Guy motion engine,
1792  ** but at times may be generated by other simulation methods.
1793  */
1794 typedef enum
1795 {
1803 
1804 
1805 /****************************************************************************/
1806 /*l
1807  *b Description:
1808  **
1809  ** This enumeration lists the modes that a DI-Guy character physics sim
1810  ** can be in, when the character simulator is set to
1811  ** DIGUY_CHARACTER_SIMULATOR_PHYSICS_SIM_MODULE.
1812  */
1813 typedef enum
1814 {
1819 
1821 
1822 
1823 /****************************************************************************/
1824 /*l
1825  *b Description:
1826  **
1827  ** This enumeration lists the collision groups that a DI-Guy physics sim
1828  ** object can be in. Characters in different collision groups may not
1829  ** have collisions calculated between them.
1830  */
1831 typedef enum
1832 {
1839 
1844 
1849 
1851 
1853 
1855 
1856 
1857 /****************************************************************************/
1858 /*l
1859  *b Description:
1860  **
1861  ** This enumeration lists the modes that the DI-Guy vehicle simulator
1862  ** can be in.
1863  */
1864 typedef enum
1865 {
1871 
1873 
1874 
1875 /*****************************************************************************/
1876 /*****************************************************************************/
1880 /*****************************************************************************/
1881 /*****************************************************************************/
1882 
1883 
1884 /*****************************************************************************/
1885 /*****************************************************************************/
1889 /*****************************************************************************/
1890 /*****************************************************************************/
1891 
1892 /****************************************************************************/
1893 /*l
1894  *b Description:
1895  **
1896  ** This enumeration lists supported shader languages.
1897  */
1898 typedef enum
1899 {
1902 
1904 
1905 
1906 
1907 
1908 #endif /* __diguy_constants_H */
1909