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