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