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