DI-Guy SDK Documentation  13.1
diguyAgentParams.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 
8 /*********************************************************************
9  **
10  *t diguyAgentParams
11  **
12  */
13 
14 #ifndef __diguyAgentParams_H
15 #define __diguyAgentParams_H
16 
17 
18 #ifdef SWIG
19 %module diguyAgentParams
20 #else
21 #define CPLUSPLUS_ONLY
22 #endif
23 
24 #ifdef CPLUSPLUS_ONLY
25 #include <diguyMotionPosture.h>
26 #include <diguyMotionSpeedType.h>
27 #include <diguyMotionVariant.h>
28 
29 class bdiScenarioAgentParams;
30 class bdiScenarioAgent;
31 class diguyPathShape;
32 #endif
33 
34 
35 #include <declspec_diguy.h>
36 
43 /****************************************************************************/
44 class BDI_DECLSPEC_diguy diguyAgentParams
45 {
46 
47 /*****************************************************************************/
70 public:
71 
72  /*l
73  *b Description:
74  **
75  ** Sets the desired posture of agent actions.
76  */
77  void set_posture(diguyMotionPosture posture);
78 
79  /*l
80  *b Description:
81  **
82  ** Returns the desired posture of agent actions.
83  */
84  diguyMotionPosture get_posture();
85 
86  /*l
87  *b Description:
88  **
89  ** Sets the desired variant of agent actions.
90  */
91  void set_variant(diguyMotionVariant variant);
92 
93  /*l
94  *b Description:
95  **
96  ** Returns the desired variant of agent actions.
97  */
98  diguyMotionVariant get_variant();
99 
100 
101 /*****************************************************************************/
107  /*l
108  *b Description:
109  **
110  ** Sets the desired behavior of the agent.
111  **
112  ** For information on agent behaviors see the documentation for the
113  ** enumeration diguyAgentBehavior, or the DI-Guy AI User Manual.
114  */
115  void set_behavior(diguyAgentBehavior behavior);
116 
117  /*l
118  *b Description:
119  **
120  ** Returns the desired behavior of the agent.
121  */
122  diguyAgentBehavior get_behavior();
123 
124  /*l
125  *b Description:
126  **
127  ** Sets the behavior path shape of the agent.
128  **
129  ** Pass the name of an existing path shape in the scenario,
130  ** or pass "" to un-set the behavior path shape.
131  */
132  void set_behavior_path_shape(const char* behavior_path_shape_name);
133 
134  /*l
135  *b Description:
136  **
137  ** Returns the name of the behavior path shape of the agent.
138  ** If there is no behavior path shape, the string "" will be
139  ** returned.
140  */
141  const char* get_behavior_path_shape();
142 
143  /*l
144  *b Description:
145  **
146  ** Sets the behavior region of the agent.
147  **
148  ** Pass the name of an existing region in the scenario,
149  ** "(crowd region)" to specify the region associated with the
150  ** agent's crowd if it has one, or "" to un-set the behavior
151  ** region.
152  */
153  void set_behavior_region(const char* behavior_region_name);
154 
155  /*l
156  *b Description:
157  **
158  ** Returns the name of the behavior region of the agent.
159  ** If there is no behavior region, the string "" will be
160  ** returned.
161  */
162  const char* get_behavior_region();
163 
164  /*l
165  *b Description:
166  **
167  ** Sets the behavior subregion of the agent.
168  */
169  void set_behavior_subregion(diguySubregionIndex area);
170 
171  /*l
172  *b Description:
173  **
174  ** Returns the behavior subregion of the agent.
175  */
176  diguySubregionIndex get_behavior_subregion();
177 
178  /*l
179  *b Description:
180  **
181  ** Sets whether the walls of the region the agent is in
182  ** are solid. If they are, the agent will treat the walls
183  ** as if they are solid walls in the environment. If not,
184  ** the agent is free to walk through them.
185  **
186  ** Pass 1 to make border walls solid, 0 to make them
187  ** freely passable.
188  */
189  void set_behavior_region_border_is_solid(int is_solid);
190 
191  /*l
192  *b Description:
193  **
194  ** Returns whether the walls of the region the agent is in
195  ** are solid.
196  */
197  int get_behavior_region_border_is_solid();
198 
199  /*l
200  *b Description:
201  **
202  ** Sets the focus character of this agent. What this means
203  ** depends on which behavior the agent is doing. For example,
204  ** when in the wander behavior, when the agent is still it
205  ** will turn to face the focus character.
206  **
207  ** Pass the name of an existing scenario character to set
208  ** a new focus character. Pass "" to un-set the focus
209  ** character.
210  */
211  void set_focus_character(const char* focus_character_name);
212 
213  /*l
214  *b Description:
215  **
216  ** Returns the name of the focus character of this agent,
217  ** "" if there is none.
218  */
219  const char* get_focus_character();
220 
221  /*l
222  *b Description:
223  **
224  ** Sets the focus group of this agent. The focus group is
225  ** similar to the focus character, except that characters the
226  ** agent will focus on are selected from the focus group
227  ** instead of being a single character.
228  **
229  ** Pass the name of an existing scenario group to set
230  ** a new focus group. Pass "" to un-set the focus
231  ** group.
232  */
233  void set_focus_group(const char* focus_group_name);
234 
235  /*l
236  *b Description:
237  **
238  ** Returns the name of the focus group of this agent,
239  ** "" if there is none.
240  */
241  const char* get_focus_group();
242 
243  /*l
244  *b Description:
245  **
246  ** Sets the whether the agent will gaze at its focus character, or
247  ** whether setting the focus leaves gaze settings alone.
248  */
249  void set_focus_affects_gaze(int focus_affects_gaze);
250 
251  /*l
252  *b Description:
253  **
254  ** Returns whether agent changes gaze settings to gaze at focus
255  ** character or group.
256  */
257  int get_focus_affects_gaze();
258 
259  /*l
260  *b Description:
261  **
262  ** Sets the how far away characters in the focus group can be
263  ** and still be considered as a focus character.
264  */
265  void set_max_focus_distance(float distance);
266 
267  /*l
268  *b Description:
269  **
270  ** Returns the maximum focus distance for focus groups.
271  */
272  float get_max_focus_distance();
273 
274  /*l
275  *b Description:
276  **
277  ** Sets the minimum amount of time this agent will stay in one
278  ** place before moving on to a new location. This applies to
279  ** the wander and mingle behaviors.
280  */
281  void set_move_on_t_min(float t_min);
282 
283  /*l
284  *b Description:
285  **
286  ** Returns the minimum amount of time before an agent will move on
287  ** to a new location in certain behaviors.
288  */
289  float get_move_on_t_min();
290 
291  /*l
292  *b Description:
293  **
294  ** Similar to set_move_on_t_min(), but sets the maximum amount of
295  ** time.
296  */
297  void set_move_on_t_max(float t_max);
298 
299  /*l
300  *b Description:
301  **
302  ** Similar to get_move_on_t_min(), but returns the maximum amount of
303  ** time.
304  */
305  float get_move_on_t_max();
306 
307 
308 /*****************************************************************************/
314  /*l
315  *b Description:
316  **
317  ** Sets the distance at which an attacking agent will stop and
318  ** fire at its target.
319  */
320  void set_attack_distance(float distance);
321 
322  /*l
323  *b Description:
324  **
325  ** Returns the distance at which an attacking agent will stop and
326  ** fire at its target.
327  */
328  float get_attack_distance();
329 
330  /*l
331  *b Description:
332  **
333  ** Sets the interval in seconds at which an attacking agent will
334  ** fire its weapon when its target is in range.
335  */
336  void set_attack_fire_interval(float time_interval);
337 
338  /*l
339  *b Description:
340  **
341  ** Returns the interval in seconds at which an attacking agent will
342  ** fire its weapon when its target is in range.
343  */
344  float get_attack_fire_interval();
345 
346  /*l
347  *b Description:
348  **
349  ** Sets whether agents in attack behavior will stay where they are and
350  ** fire at targets of oppurtunity, or pursue targets.
351  **
352  ** If an agent is not told to stand its ground it can pursue its
353  ** current target. The functions set_attack_zone_enabled() and
354  ** set_attack_zone() might limit the extent that the agent can pursue.
355  **
356  ** Set to 1 for agents to stand their ground, 0 to allow them to
357  ** pursue targets. Defaults to 0.
358  */
359  void set_attack_stands_ground(int value);
360 
361  /*l
362  *b Description:
363  **
364  ** Returns the most recent setting made by set_attack_stands_ground().
365  */
366  int get_attack_stands_ground();
367 
368  /*l
369  *b Description:
370  **
371  ** If an agent is not designated to stand its ground (see
372  ** set_attack_stands_ground()), and an attack zone is enabled (see
373  ** set_attack_zone_enabled()), this function sets where and how far an
374  ** agent can pursue its target.
375  */
376  void set_attack_zone(float x, float y, float z, float radius);
377 
378  /*l
379  *b Description:
380  **
381  ** Returns position and radius of agent's attack zone.
382  */
383  int get_attack_zone(float* x, float* y, float* z, float* radius);
384 
385  /*l
386  *b Description:
387  **
388  ** If an attacking agent is not designated to stand its ground (see
389  ** set_attack_stands_ground()) and is therefore free to pursue its
390  ** target, the attack zone can limit how far it will go in pursuit.
391  **
392  ** Pass 1 to enable the attack zone, 0 to disable.
393  */
394  void set_attack_zone_enabled(int use_attack_zone);
395 
396  /*l
397  *b Description:
398  **
399  ** Returns 0 if zone is disabled and agents can pursue indefinitely.
400  */
401  int get_attack_zone_enabled();
402 
403 
404 /*****************************************************************************/
410  /*l
411  *b Description:
412  **
413  ** Sets the maximum distance an agent will wander from its previous
414  ** waiting point.
415  */
416  void set_wander_max_wander_dist(float distance);
417 
418  /*l
419  *b Description:
420  **
421  ** Sets whether the wander behavior can change the desired
422  ** orientation.
423  */
424  void set_wander_sets_desired_orientation(int sets_desired_orientation);
425 
426 
427 /*****************************************************************************/
433  /*l
434  *b Description:
435  **
436  ** Sets whether the speed match functionality is enabled.
437  */
438  void set_pursue_speed_match_enabled(int enabled);
439 
440  /*l
441  *b Description:
442  **
443  ** Returns whether speed match functionality is enabled. If it is,
444  ** agents are able to speed up their fastest animation to match
445  ** their pursuit target.
446  */
447  int get_pursue_speed_match_enabled();
448 
449  /*l
450  *b Description:
451  **
452  ** Sets how often the speed match speed is reevaluated. The default
453  ** is every two seconds.
454  */
455  void set_pursue_speed_match_update_dt(float dt);
456 
457  /*l
458  *b Description:
459  **
460  ** Returns the frequency that the speed match speed is updated.
461  */
462  float get_pursue_speed_match_update_dt();
463 
464  /*l
465  *b Description:
466  **
467  ** Sets the maximum multiplier that can be applied to the fastest
468  ** motion when pursuing in order to match speeds with the pursued
469  ** target.
470  **
471  ** Example: If an agent's fastest action moves at 3 m/s, the pursue
472  ** speed match functionality will allow the character to move up
473  ** to 6 m/s.
474  **
475  ** The default is 2x. This allows a character with a fast
476  ** movement motion to keep up with another individual that is moving
477  ** faster then them, but not a fast moving vehicle.
478  */
479  void set_pursue_speed_match_max_factor(float factor);
480 
481  /*l
482  *b Description:
483  **
484  ** Returns the maximum speed multiplier the speed match code will
485  ** use.
486  */
487  float get_pursue_speed_match_max_factor();
488 
489  /*l
490  *b Description:
491  **
492  ** Building block for setting up AI formations. Sets an offset that
493  ** is used by the AI to modify the pursue location. This offset is
494  ** considered to be in local space of the target and then is
495  ** periodically bread-crumbed as the pursue target moves. This avoids
496  ** small movements wildly confusing the pursuer. Often this is used
497  ** with the diguyFormation class to data drive this info.
498  **
499  ** The z argument is currently ignored.
500  */
501  void set_pursue_offset(float x, float y, float z);
502 
503  /*l
504  *b Description:
505  **
506  ** Accessor for current values of set_pursue_offset.
507  */
508  int get_pursue_offset(float* x, float* y, float* z);
509 
510 
511 /*****************************************************************************/
517  /*l
518  *b Description:
519  **
520  ** Sets whether time advancement on the path being followed should
521  ** occur when the agent is in a different behavior.
522  */
523  void set_path_follow_pause_t_when_off_path(int pause_t);
524 
525  /*l
526  *b Description:
527  **
528  ** Returns the path follow pause t flag.
529  */
530  int get_path_follow_pause_t_when_off_path();
531 
532  /*l
533  *b Description:
534  **
535  ** Sets how close the agent must be before a paused path follow will
536  ** resume.
537  */
538  void set_path_follow_unpause_t_at_radius(float radius);
539 
540  /*l
541  *b Description:
542  **
543  ** Returns the resume distance of a paused path follow.
544  */
545  float get_path_follow_unpause_t_at_radius();
546 
547  /*l
548  *b Description:
549  **
550  ** Sets how far ahead on the path being followed the agent will look
551  ** ahead for its desired orientation. A value of 1.0 usually
552  ** provides good results.
553  */
554  void set_path_follow_position_lookahead_distance(float distance);
555 
556  /*l
557  *b Description:
558  **
559  ** Returns the lookahead distance of a path follow.
560  */
561  float get_path_follow_position_lookahead_distance();
562 
563 
564 /*****************************************************************************/
570  /*l
571  *b Description:
572  **
573  ** Sets the untrap method used when an agent becomes wedged in a
574  ** corner.
575  **
576  ** For information on untrap methods see the documentation
577  ** for the enumeration diguyAgentUntrapMethod, or the
578  ** DI-Guy AI User Manual.
579  */
580  void set_wedged_untrap_method(diguyAgentUntrapMethod untrap_method);
581 
582  /*l
583  *b Description:
584  **
585  ** Returns the wedged untrap method.
586  */
587  diguyAgentUntrapMethod get_wedged_untrap_method();
588 
589  /*l
590  *b Description:
591  **
592  ** Sets the how long, in seconds, the agent will walk into a
593  ** corner before it decides it is wedged and applies the
594  ** wedged untrap method.
595  */
596  void set_wedged_trap_time_threshold(float threshold);
597 
598  /*l
599  *b Description:
600  **
601  ** Returns the how long the agent will walk into a corner before
602  ** it decides it is wedged.
603  */
604  float get_wedged_trap_time_threshold();
605 
606  /*l
607  *b Description:
608  **
609  ** Sets the untrap method used when an agent has not made progress
610  ** toward its desired position.
611  **
612  ** For information on untrap methods see the documentation
613  ** for the enumeration diguyAgentUntrapMethod, or the
614  ** DI-Guy AI User Manual.
615  */
616  void set_first_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
617 
618  /*l
619  *b Description:
620  **
621  ** Returns the first no progress untrap method.
622  */
623  diguyAgentUntrapMethod get_first_no_progress_untrap_method();
624 
625  /*l
626  *b Description:
627  **
628  ** Sets the how long, in seconds, the agent is willing to make
629  ** no progress toward its desired position before it applies
630  ** the first no progress untrap method.
631  */
632  void set_first_no_progress_trap_time_threshold(float threshold);
633 
634  /*l
635  *b Description:
636  **
637  ** Returns the how long the agent can make no progress toward
638  ** its desired position before it decides to apply an untrap
639  ** method.
640  */
641  float get_first_no_progress_trap_time_threshold();
642 
643  /*l
644  *b Description:
645  **
646  ** Similar to set_first_no_progress_untrap_method(), but the
647  ** time threshold is longer before the second no progress
648  ** untrap method is applied.
649  */
650  void set_second_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
651 
652  /*l
653  *b Description:
654  **
655  ** Similar to get_first_no_progress_untrap_method(), but
656  ** applied to the second no progress untrap method.
657  */
658  diguyAgentUntrapMethod get_second_no_progress_untrap_method();
659 
660  /*l
661  *b Description:
662  **
663  ** Sets the how long, in seconds, the agent is willing to make
664  ** no progress toward its desired position before it applies
665  ** the second no progress untrap method.
666  */
667  void set_second_no_progress_trap_time_threshold(float threshold);
668 
669  /*l
670  *b Description:
671  **
672  ** Returns the how long the agent can make no progress toward
673  ** its desired position before it decides to apply the
674  ** second no progress untrap method.
675  */
676  float get_second_no_progress_trap_time_threshold();
677 
678  /*l
679  *b Description:
680  **
681  ** Sets how many times the agent is willing to try applying
682  ** the random turn untrap method before it gives up and
683  ** moves on to the next untrap method.
684  */
685  void set_untrap_method_random_turn_max_tries(int max_tries);
686 
687  /*l
688  *b Description:
689  **
690  ** Returns how many times the agent is willing to try applying
691  ** the random turn untrap method.
692  */
693  int get_untrap_method_random_turn_max_tries();
694 
695  /*l
696  *b Description:
697  **
698  ** Sets how many seconds the agent will be intangible when
699  ** it is applying the ghost untrap method.
700  */
701  void set_untrap_method_ghost_duration(float duration);
702 
703  /*l
704  *b Description:
705  **
706  ** Returns how many seconds the agent will be intangible when
707  ** it is applying the ghost untrap method.
708  */
709  float get_untrap_method_ghost_duration();
710 
711 
712 /*****************************************************************************/
718  /*l
719  *b Description:
720  **
721  ** Sets whether the agent will make use of actions that have the
722  ** specified speed type.
723  **
724  ** For information on speed types see the documentation
725  ** for the enumeration diguyMotionSpeedType. or the
726  ** DI-Guy AI User Manual.
727  */
728  int set_speed_type_enabled(diguyMotionSpeedType motion_speed_type,
729  int enabled);
730 
731  /*l
732  *b Description:
733  **
734  ** Returns whether the agent will make use of actions that have the
735  ** specified speed type.
736  **
737  ** If the speed type is enabled, the character must be outside the
738  ** the associated radius for the action to apply. If the character
739  ** enters that radius, then the next radius down is considered. If
740  ** all enabled speed types have been exhausted, then the character
741  ** should stop
742  **
743  */
744  int get_speed_type_enabled(diguyMotionSpeedType motion_speed_type);
745 
746  /*l
747  *b Description:
748  **
749  ** Sets at what radius, in meters, the agent will begin to play
750  ** actions with the specified speed type, if that type is enabled.
751  **
752  ** See set_speed_type_radius_hysteresis() for how a hysteresis value
753  ** can affect the final radius.
754  */
755  int set_speed_type_radius(diguyMotionSpeedType motion_speed_type,
756  float radius);
757 
758  /*l
759  *b Description:
760  **
761  ** Returns the radius of the specified speed type.
762  */
763  float get_speed_type_radius(diguyMotionSpeedType motion_speed_type);
764 
765  /*l
766  *b Description:
767  **
768  ** Sets the hysteresis of when the speed type changes based on how far
769  ** the agent is from its desired position. A hysteresis value can
770  ** help prevent constant switching back and forth of actions if an
771  ** agent is moving right along the radius separating two speed type
772  ** zones.
773  **
774  ** Example: a hysteresis of 2.0 means that if an agent switches from
775  ** speed type fast to speed type medium at 2 meters, it won't switch
776  ** back to fast unless it goes back out to 4 meters.
777  **/
778  void set_speed_type_radius_hysteresis(float hysteresis_distance);
779 
780  /*l
781  *b Description:
782  **
783  ** Returns the radius hysteresis as described in
784  ** set_speed_type_radius_hysteresis().
785  **/
786  float get_speed_type_radius_hysteresis();
787 
788  /*l
789  *b Description:
790  **
791  ** Sets the exact action the agent will use if it is to use
792  ** the specified speed type. This is useful if a specific
793  ** stand action is desired, for example, for the still speed
794  ** type.
795  **
796  ** To use the default action, pass "".
797  */
798  int set_speed_type_exact_action(diguyMotionSpeedType motion_speed_type,
799  const char* action);
800 
801  /*l
802  *b Description:
803  **
804  ** Returns the exact action the agent will use if it is to use
805  ** the specified speed type.
806  **
807  ** If the default action is to be used, returns "".
808  */
809  const char* get_speed_type_exact_action(diguyMotionSpeedType motion_speed_type);
810 
811  /*l
812  *b Description:
813  **
814  ** Sets the radius variation that will be applied to speed type radii
815  ** as set by set_speed_type_radius(). Each agent will have a
816  ** different amount of variation added to its radii.
817  **
818  ** Value is in meters.
819  */
820  void set_radius_variation(float distance);
821 
822  /*l
823  *b Description:
824  **
825  ** Returns the radius variation for this agent as set by
826  ** set_radius_variation().
827  */
828  float get_radius_variation();
829 
830 
831  /*l
832  *b Description:
833  **
834  ** Sets if the character should use turning motions when changing desired orientation.
835  ** As of diguy-12 defaults to true.
836  */
837  int set_turning_motions_enabled(int enabled);
838 
839  /*l
840  *b Description:
841  **
842  ** Returns if the character is using turning motions when changing desired orientation.
843  ** As of diguy-12 defaults to true.
844  */
845  int get_turning_motions_enabled();
846 
847 /*****************************************************************************/
853  /*l
854  *b Description:
855  **
856  ** Sets the radius, in meters, of the specified repulsion zone.
857  */
858  void set_repulsion_radius(diguyAgentRepulsionZone repulsion_zone,
859  float radius);
860 
861  /*l
862  *b Description:
863  **
864  ** Returns the radius, in meters, of the specified repulsion zone.
865  */
866  float get_repulsion_radius(diguyAgentRepulsionZone repulsion_zone);
867 
868  /*l
869  *b Description:
870  **
871  ** Sets the repulsion factor of the specified repulsion zone.
872  ** Higher repulsion factors will result in agents in the
873  ** specified zone being pushed away harder.
874  */
875  void set_repulsion_factor(diguyAgentRepulsionZone repulsion_zone,
876  float factor);
877 
878  /*l
879  *b Description:
880  **
881  ** Returns the repulsion factor of the specified repulsion zone.
882  */
883  float get_repulsion_factor(diguyAgentRepulsionZone repulsion_zone);
884 
885  /*l
886  *b Description:
887  **
888  ** Sets whether the specified repulsion zone is enabled.
889  ** Zones that are not enabled will have no effect on agents
890  ** in them.
891  */
892  void set_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone,
893  int enabled);
894 
895  /*l
896  *b Description:
897  **
898  ** Returns whether the specified repulsion zone is enabled.
899  */
900  int get_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone);
901 
902  /*l
903  *b Description:
904  **
905  ** Sets the fastest the agent can turn, in degrees per second,
906  ** in response to being repulsed by another agent.
907  */
908  void set_max_orientation_change_rate(float max_orientation_change_rate);
909 
910  /*l
911  *b Description:
912  **
913  ** Returns the fastest the agent can turn, in degrees per second,
914  ** in response to being repulsed by another agent.
915  */
916  float get_max_orientation_change_rate();
917 
918  /*l
919  *b Description:
920  **
921  ** Sets the offset, in meters, that the low, medium, and high
922  ** repulsion zones should have from the agent's position.
923  ** The solid zone is not affected. Sometimes it is desirable
924  ** for the repulsion zones to be moved slightly forward, to
925  ** make it so that other agents approaching this agent from the
926  ** side will prefer to move behind this agent rather than in front.
927  */
928  void set_influence_center_shift(float x, float y, float z);
929 
930 
931 /*****************************************************************************/
937  /*l
938  *b Description:
939  **
940  ** Sets the base influence box, in meters, of a vehicle agent.
941  ** The default influence box is the vehicle's axis-aligned bounding
942  ** box.
943  */
944  void set_vehicle_base_influence_box(float min_x, float min_y, float min_z,
945  float max_x, float max_y, float max_z);
946 
947  /*l
948  *b Description:
949  **
950  ** Returns the vehicle's base influence box.
951  */
952  void get_vehicle_base_influence_box(float* min_x, float* min_y, float* min_z,
953  float* max_x, float* max_y, float* max_z);
954 
955  /*l
956  *b Description:
957  **
958  ** Sets whether or not the influence box is active (true by default).
959  */
960  void set_influence_box_enabled(int enabled = 1);
961 
962  /*l
963  *b Description:
964  **
965  ** Returns whether or not the influence box is active
966  */
967  int get_influence_box_enabled();
968 
969  // defaults to 4.0
970  void set_influence_box_forward_multiplier(float value);
971  float get_influence_box_forward_multiplier();
972 
973  // defaults to .30
974  void set_influence_box_sideways_multiplier(float value);
975  float get_influence_box_sideways_multiplier();
976 
977  // defaults to .10
978  void set_influence_box_angular_multiplier(float value);
979  float get_influence_box_angular_multiplier();
980 
981 /*****************************************************************************/
987  /*l
988  *b Description:
989  **
990  ** Sets whether the specified feeler is enabled. Feelers that
991  ** are not enabled will have no effect on the agent.
992  */
993  void set_feeler_enabled(int feeler_index,
994  int feeler_enabled);
995 
996  /*l
997  *b Description:
998  **
999  ** Returns whether the specified feeler is enabled.
1000  */
1001  int get_feeler_enabled(int feeler_index);
1002 
1003  /*l
1004  *b Description:
1005  **
1006  ** Sets, in degrees, how far counter-clockwise from forward
1007  ** the feeler is. Zero degrees is straight forward, 90 is to the
1008  ** left, etc. By default the eight feelers are located at 45
1009  ** degree intervals around the agent.
1010  */
1011  void set_feeler_rz_offset(int feeler_index,
1012  float feeler_rz_offset);
1013 
1014  /*l
1015  *b Description:
1016  **
1017  ** Returns, in degrees, how far counter-clockwise from forward
1018  ** the feeler is.
1019  */
1020  float get_feeler_rz_offset(int feeler_index);
1021 
1022  /*l
1023  *b Description:
1024  **
1025  ** Sets, in meters, how high the feeler is from the ground.
1026  ** In general feelers should be at about waist level for human
1027  ** characters.
1028  */
1029  void set_feeler_height(int feeler_index,
1030  float feeler_height);
1031 
1032  /*l
1033  *b Description:
1034  **
1035  ** Returns, in meters, how high the feeler is from the ground.
1036  */
1037  float get_feeler_height(int feeler_index);
1038 
1039  /*l
1040  *b Description:
1041  **
1042  ** Sets, in meters, how far away from the agent the feeler will
1043  ** return collision results. Agents will be pushed away from
1044  ** the object collided with until they are not colliding
1045  ** anymore.
1046  */
1047  void set_feeler_collision_distance(int feeler_index,
1048  float collision_distance);
1049 
1050  /*l
1051  *b Description:
1052  **
1053  ** Returns, in meters, how far away from the agent the feeler will
1054  ** return collision results.
1055  */
1056  float get_feeler_collision_distance(int feeler_index);
1057 
1058  /*l
1059  *b Description:
1060  **
1061  ** Sets, in meters, how far away from the agent the feeler will
1062  ** return turn results. Agents will turn left or right to try
1063  ** to move along the face of a felt obstacle, instead of walking
1064  ** straight into it.
1065  */
1066  void set_feeler_turn_distance(int feeler_index,
1067  float turn_distance);
1068 
1069  /*l
1070  *b Description:
1071  **
1072  ** Returns, in meters, how far away from the agent the feeler will
1073  ** return turn results.
1074  */
1075  float get_feeler_turn_distance(int feeler_index);
1076 
1077  /*l
1078  *b Description:
1079  **
1080  ** Sets which direction the feeler will turn the agent when
1081  ** it touches something within the turn distance.
1082  */
1083  void set_feeler_turn_direction(int feeler_index,
1084  diguyCharacterFeelerTurnDirection turn_direction);
1085 
1086  /*l
1087  *b Description:
1088  **
1089  ** Returns which direction the feeler will turn the agent when
1090  ** it touches something within the turn distance.
1091  */
1092  diguyCharacterFeelerTurnDirection get_feeler_turn_direction(int feeler_index);
1093 
1094 
1095 /*****************************************************************************/
1101  /*l
1102  *b Description:
1103  **
1104  ** Sets the preferred traveling region mask.
1105  **
1106  ** When an agent plans a path, the preferred areas will be considered
1107  ** the easiest to cross and the path should gravitate to them.
1108  **
1109  ** The mask argument should be an or'ed together list of
1110  ** diguySubregionMasks. In C++ or Perl masks can be combined with
1111  ** the '|' operator, in Lua the bit library can be used:
1112  ** bit.bor(MASK_A, MASK_B, ...)
1113  **/
1114  void set_path_planner_preferred_region_mask(int mask);
1115 
1116  /*l
1117  *b Description:
1118  **
1119  *b Returns:
1120  **
1121  ** the preferred region mask; see
1122  ** set_path_planner_preferred_region_mask() and
1123  ** set_path_planner_neutral_cost_bias()
1124  */
1125  int get_path_planner_preferred_region_mask();
1126 
1127  /*l
1128  *b Description:
1129  **
1130  ** Sets how much less expensive it is to cross spaces that are
1131  ** in the desired subregion. (Repulsive and neutral regions have
1132  ** their own cost bias; see set_path_planner_repulsed_cost_bias().)
1133  **
1134  ** This value should be < 1. The default value is 0.25.
1135  **/
1136  void set_path_planner_preferred_cost_bias(float value);
1137 
1138  /*l
1139  *b Returns:
1140  **
1141  ** the cost bias of preferred regions during A* searches;
1142  ** see set_path_planner_preferred_cost_bias()
1143  */
1144  float get_path_planner_preferred_cost_bias();
1145 
1146  /*l
1147  *b Description:
1148  **
1149  ** Sets how much more expensive it is to cross spaces that are
1150  ** not in a desired subregion. (Repulsive regions have their own
1151  ** cost bias; see set_path_planner_repulsed_cost_bias().)
1152  **
1153  ** Defaults to 1.1, A value < 1 will cause the planner to run faster
1154  ** but explore fewer points, posibly missing preferred regions.
1155  ** Values greater then 1 will explore more points but will take more
1156  ** time to run.
1157  **
1158  ** Pass DIGUY_DEFAULT_FLOAT for the value to specify that neutral
1159  ** regions should be avoided completely. This can, however, cause
1160  ** path planning to fail more often.
1161  **/
1162  void set_path_planner_neutral_cost_bias(float value);
1163 
1164  /*l
1165  *b Returns:
1166  **
1167  ** the cost bias of neutral regions during A* searches;
1168  ** see set_path_planner_neutral_cost_bias()
1169  **/
1170  float get_path_planner_neutral_cost_bias();
1171 
1172  /*l
1173  *b Description:
1174  **
1175  ** Sets the repulsive traveling region mask.
1176  **
1177  ** When an agent plans a path the repulsive areas will be considered
1178  ** the hardest to cross and the planner will try to avoid them.
1179  **
1180  ** The mask argument should be an or'ed together list of
1181  ** diguySubregionMasks. In C++ or Perl masks can be combined with
1182  ** the '|' operator, in Lua the bit library can be used:
1183  ** bit.bor(MASK_A, MASK_B, ...)
1184  **/
1185  void set_path_planner_repulsed_region_mask(int mask);
1186 
1187  /*l
1188  *b Returns:
1189  **
1190  ** the repulsed region mask; see
1191  ** set_path_planner_repulsed_region_mask()
1192  */
1193  int get_path_planner_repulsed_region_mask();
1194 
1195  /*l
1196  *b Description:
1197  **
1198  ** Sets how much more expensive it will be to cross spaces that are
1199  ** marked as repulsive.
1200  **
1201  ** This value should generally be much larger then 1. The default
1202  ** value is 100.
1203  **
1204  ** Pass DIGUY_DEFAULT_FLOAT for the value to specify that repulsive
1205  ** regions should be avoided completely. This can, however, cause
1206  ** path planning to fail more often.
1207  **/
1208  void set_path_planner_repulsed_cost_bias(float value);
1209 
1210  /*l
1211  *b Returns:
1212  **
1213  ** the cost bias of repulsive regions during A* searches;
1214  ** see set_path_planner_repulsed_cost_bias()
1215  **/
1216  float get_path_planner_repulsed_cost_bias();
1217 
1218  /*l
1219  *b Description:
1220  **
1221  ** Sets the name of the region to try to use if the path planner
1222  ** fails to work on the current behavior region. This is often the
1223  ** name of a global navmesh.
1224  **/
1225  void set_path_planner_fallback_region(const char* fallback_region_name);
1226 
1227  /*l
1228  *b Returns:
1229  **
1230  ** The name of the fallback region that the path planner will
1231  ** fall back to if a search on the behavior region fails.
1232  **/
1233  const char* get_path_planner_fallback_region();
1234 
1235  /*l
1236  *b Description:
1237  **
1238  ** Sets whether the wander behavior will try to use the path planner
1239  ** when the agent can't see it's target location with a viability
1240  ** check.
1241  **/
1242  void set_wander_uses_path_planner(int wander_uses_path_planner);
1243 
1244  /*l
1245  *b Returns:
1246  **
1247  ** whether the wander behavior uses the path planner; see
1248  ** set_wander_uses_path_planner()
1249  **/
1250  int get_wander_uses_path_planner();
1251 
1252  /*l
1253  *b Description:
1254  **
1255  ** Sets whether the pursue behavior will try to use the path planner
1256  ** when the agent can't see it's target with a viability check.
1257  **
1258  ** The agent will do a new visibility check at each waypoint in
1259  ** the navigation path.
1260  **/
1261  void set_pursue_uses_path_planner(int pursue_uses_path_planner);
1262 
1263  /*l
1264  *b Returns:
1265  **
1266  ** whether the pursue behavior uses the path planner; see
1267  ** set_wander_uses_path_planner()
1268  **/
1269  int get_pursue_uses_path_planner();
1270 
1271  /*l
1272  *b Description:
1273  **
1274  ** Sets the maximum distance the wander behavior will travel without
1275  ** using the path planner, when the agent can see it's target location
1276  ** with a Line-Of-Sight viability check.
1277  **
1278  ** This value defaults to 1000 meters.
1279  **
1280  ** Adjusting it lower is meant for users that have an environment
1281  ** that is well tagged with preferred and repulsed regions.
1282  **
1283  ** For example, just because an agent can see the store across an
1284  ** eight lane highway doesn't mean it should run straight there.
1285  **/
1286  void set_max_LOS_travel_distance(float distance);
1287 
1288  /*l
1289  *b Returns:
1290  **
1291  ** the Line-Of-Sight travel distance threshold; see
1292  ** set_max_LOS_travel_distance().
1293  **/
1294  float get_max_LOS_travel_distance();
1295 
1296  /*l
1297  *b Description:
1298  **
1299  ** Sets the distance from the final point on a navpath that the guide
1300  ** algorithm will attempt to achieve before declaring that its
1301  ** destination has been reached.
1302  **
1303  ** The default distance is 0.31 meters.
1304  **
1305  ** In general this value should only be changed if agent ends up
1306  ** "orbiting" the final desired position.
1307  */
1308  void set_desired_navpath_distance_threshold(float threshold);
1309 
1310  /*l
1311  *b Returns:
1312  **
1313  ** distance from final point in navpath at which the desired
1314  ** position is considered acquired; see
1315  ** set_desired_navpath_distance_threshold()
1316  */
1317  float get_desired_navpath_distance_threshold();
1318 
1319 
1320 
1321 
1322 /*****************************************************************************/
1327  /*l
1328  ** see diguyNavMeshPathPlannerCostMask for acceptable values.
1329  */
1330  void set_path_planner_cost_rule(int mask);
1331  int get_path_planner_cost_rule();
1332 
1333  float get_near_destination_distance();
1334  void set_near_destination_distance(float dist);
1335 
1336  int get_navpath_current_waypoint_index();
1337  int get_navpath_num_waypoints();
1338 
1339  diguyPathShape * get_navpath_path();
1340  diguyNavPathDirection get_navpath_travel_direction();
1341 
1344  float get_navpath_offset_y();
1345  void set_navpath_offset_y(float y);
1346 
1351 #ifdef CPLUSPLUS_ONLY
1352 
1353  bdiScenarioAgentParams* get_scripted_object() {return m_scripted_object;}
1354 
1355 private:
1356 
1357  /*l
1358  ** A private constructor.
1359  */
1360  diguyAgentParams(bdiScenarioAgentParams* scripted_object);
1361 
1362  /*l
1363  ** A private destructor.
1364  */
1365  virtual ~diguyAgentParams();
1366 
1367  /*l
1368  ** A pointer to internal data.
1369  */
1370  bdiScenarioAgentParams* m_scripted_object;
1371  bdiScenarioAgent* m_agent_object;
1372 
1373  friend class bdiScenarioAgentParams;
1374  friend class bdiScenarioAgent;
1375 
1376 #endif
1377 
1378 };
1379 
1380 
1381 #endif /* __diguyAgentParams_H */
1382 
The class that represents what parameters a agent is currently using to carry out their base behavior...
Definition: diguyAgentParams.h:40
diguySubregionIndex
DI-Guy subregions.
Definition: diguy_constants.h:1463
Definition: diguyPathShape.h:30
diguyAgentRepulsionZone
DI-Guy agent repulsion zones for characters with dynamic avoidance method DIGUY_DYNAMIC_AVOIDANCE_MET...
Definition: diguy_constants.h:1197
diguyAgentUntrapMethod
DI-Guy agent untrap methods.
Definition: diguy_constants.h:1327
diguyNavPathDirection
Directions a character can be traveling on a navigation path (nav path).
Definition: diguy_constants.h:1109
diguyMotionVariant
Definition: diguyMotionVariant.h:26
diguyCharacterFeelerTurnDirection
This enumeration lists the turn directions a feeler can use when its status is DIGUY_CHARACTER_FEELER...
Definition: diguy_constants.h:1091
int diguyMotionSpeedType
DI-Guy character speed types.
Definition: diguyMotionSpeedType.h:66
diguyMotionPosture
Definition: diguyMotionPosture.h:26
diguyAgentBehavior
DI-Guy agent behaviors.
Definition: diguy_constants.h:1268