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