diguyAgentParams

Generated from diguyAgentParams.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguyAgentParams.h. Do not edit this file directly; the changes will be lost.
Includes: diguyMotionPosture.h | diguyMotionSpeedType.h | diguyMotionVariant.h | declspec_diguy.h

Contents:

Alphabetical Index

class diguyAgentParams

class BDI_DECLSPEC_diguy diguyAgentParams
{
public:
    void set_posture(diguyMotionPosture posture);
    diguyMotionPosture get_posture();
    void set_variant(diguyMotionVariant variant);
    diguyMotionVariant get_variant();
    void set_behavior(diguyAgentBehavior behavior);
    diguyAgentBehavior get_behavior();
    void set_behavior_path_shape(const char* behavior_path_shape_name);
    const char* get_behavior_path_shape();
    void set_behavior_region(const char* behavior_region_name);
    const char* get_behavior_region();
    void set_behavior_subregion(diguySubregionIndex area);
    diguySubregionIndex get_behavior_subregion();
    void set_behavior_region_border_is_solid(int is_solid);
    int get_behavior_region_border_is_solid();
    void set_focus_character(const char* focus_character_name);
    const char* get_focus_character();
    void set_focus_group(const char* focus_group_name);
    const char* get_focus_group();
    void set_focus_affects_gaze(int focus_affects_gaze);
    int get_focus_affects_gaze();
    void set_max_focus_distance(float distance);
    float get_max_focus_distance();
    void set_move_on_t_min(float t_min);
    float get_move_on_t_min();
    void set_move_on_t_max(float t_max);
    float get_move_on_t_max();
    void set_attack_distance(float distance);
    float get_attack_distance();
    void set_attack_fire_interval(float time_interval);
    float get_attack_fire_interval();
    void set_attack_stands_ground(int value);
    int get_attack_stands_ground();
    void set_attack_zone(float x, float y, float z, float radius);
    int get_attack_zone(float* x, float* y, float* z, float* radius);
    void set_attack_zone_enabled(int use_attack_zone);
    int get_attack_zone_enabled();
    void set_wander_max_wander_dist(float distance);
    void set_wander_sets_desired_orientation(int sets_desired_orientation);
    void set_pursue_speed_match_enabled(int enabled);
    int get_pursue_speed_match_enabled();
    void set_pursue_speed_match_update_dt(float dt);
    float get_pursue_speed_match_update_dt();
    void set_pursue_speed_match_max_factor(float factor);
    float get_pursue_speed_match_max_factor();
    void set_pursue_offset(float x, float y, float z);
    int get_pursue_offset(float* x, float* y, float* z);
    void set_path_follow_pause_t_when_off_path(int pause_t);
    int get_path_follow_pause_t_when_off_path();
    void set_path_follow_unpause_t_at_radius(float radius);
    float get_path_follow_unpause_t_at_radius();
    void set_path_follow_position_lookahead_distance(float distance);
    float get_path_follow_position_lookahead_distance();
    void set_wedged_untrap_method(diguyAgentUntrapMethod untrap_method);
    diguyAgentUntrapMethod get_wedged_untrap_method();
    void set_wedged_trap_time_threshold(float threshold);
    float get_wedged_trap_time_threshold();
    void set_first_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
    diguyAgentUntrapMethod get_first_no_progress_untrap_method();
    void set_first_no_progress_trap_time_threshold(float threshold);
    float get_first_no_progress_trap_time_threshold();
    void set_second_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
    diguyAgentUntrapMethod get_second_no_progress_untrap_method();
    void set_second_no_progress_trap_time_threshold(float threshold);
    float get_second_no_progress_trap_time_threshold();
    void set_untrap_method_random_turn_max_tries(int max_tries);
    int get_untrap_method_random_turn_max_tries();
    void set_untrap_method_ghost_duration(float duration);
    float get_untrap_method_ghost_duration();
    int set_speed_type_enabled(diguyMotionSpeedType motion_speed_type,
        int enabled);
    int get_speed_type_enabled(diguyMotionSpeedType motion_speed_type);
    int set_speed_type_radius(diguyMotionSpeedType motion_speed_type,
        float radius);
    float get_speed_type_radius(diguyMotionSpeedType motion_speed_type);
    void  set_speed_type_radius_hysteresis(float hysteresis_distance);
    float get_speed_type_radius_hysteresis();
    int set_speed_type_exact_action(diguyMotionSpeedType motion_speed_type,
        const char* action);
    const char* get_speed_type_exact_action(diguyMotionSpeedType motion_speed_type);
    void set_radius_variation(float distance);
    float get_radius_variation();
    int set_turning_motions_enabled(int enabled);
    int get_turning_motions_enabled();
    void set_repulsion_radius(diguyAgentRepulsionZone repulsion_zone,
        float radius);
    float get_repulsion_radius(diguyAgentRepulsionZone repulsion_zone);
    void set_repulsion_factor(diguyAgentRepulsionZone repulsion_zone,
        float factor);
    float get_repulsion_factor(diguyAgentRepulsionZone repulsion_zone);
    void set_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone,
        int enabled);
    int get_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone);
    void set_max_orientation_change_rate(float max_orientation_change_rate);
    float get_max_orientation_change_rate();
    void set_influence_center_shift(float x, float y, float z);
    void set_vehicle_base_influence_box(float min_x, float min_y, float min_z,
        float max_x, float max_y, float max_z);
    void get_vehicle_base_influence_box(float* min_x, float* min_y, float* min_z,
        float* max_x, float* max_y, float* max_z);
    void set_influence_box_enabled(int enabled = 1);
    int get_influence_box_enabled();
    void set_feeler_enabled(int feeler_index,
        int feeler_enabled);
    int get_feeler_enabled(int feeler_index);
    void set_feeler_rz_offset(int feeler_index,
        float feeler_rz_offset);
    float get_feeler_rz_offset(int feeler_index);
    void set_feeler_height(int feeler_index,
        float feeler_height);
    float get_feeler_height(int feeler_index);
    void set_feeler_collision_distance(int feeler_index,
        float collision_distance);
    float get_feeler_collision_distance(int feeler_index);
    void set_feeler_turn_distance(int feeler_index,
        float turn_distance);
    float get_feeler_turn_distance(int feeler_index);
    void set_feeler_turn_direction(int feeler_index,
        diguyCharacterFeelerTurnDirection turn_direction);
    diguyCharacterFeelerTurnDirection get_feeler_turn_direction(int feeler_index);
    void set_path_planner_preferred_region_mask(int mask);
    int get_path_planner_preferred_region_mask();
    void set_path_planner_preferred_cost_bias(float value);
    float get_path_planner_preferred_cost_bias();
    void set_path_planner_neutral_cost_bias(float value);
    float get_path_planner_neutral_cost_bias();
    void set_path_planner_repulsed_region_mask(int mask);
    int get_path_planner_repulsed_region_mask();
    void set_path_planner_repulsed_cost_bias(float value);
    float get_path_planner_repulsed_cost_bias();
    void set_path_planner_fallback_region(const char* fallback_region_name);
    const char* get_path_planner_fallback_region();
    void set_wander_uses_path_planner(int wander_uses_path_planner);
    int get_wander_uses_path_planner();
    void set_pursue_uses_path_planner(int pursue_uses_path_planner);
    int get_pursue_uses_path_planner();
    void set_max_LOS_travel_distance(float distance);
    float get_max_LOS_travel_distance();
    void set_desired_navpath_distance_threshold(float threshold);
    float get_desired_navpath_distance_threshold();
    void set_path_planner_cost_rule(int mask);
    int get_path_planner_cost_rule();
Notes
The following functions return a pointer to an object of this type:

For agents, changes to the initial parameters will have no effect until the scenario is reset, at which point the current parameters will be set to the initial parameters.

Changes to the crowd profile default agent params will have no effect on existing agent initial or current agent params, unless the function diguyCharacter::agent_set_current_params_from_profile() is called.

Unless otherwise noted, all functions of this class are callable from C++ and Scripts.

function diguyAgentParams::set_posture

Prototype:

void set_posture(diguyMotionPosture posture);
Description:

Sets the desired posture of agent actions.

function diguyAgentParams::get_posture

Prototype:

diguyMotionPosture get_posture();
Description:

Returns the desired posture of agent actions.

function diguyAgentParams::set_variant

Prototype:

void set_variant(diguyMotionVariant variant);
Description:

Sets the desired variant of agent actions.

function diguyAgentParams::get_variant

Prototype:

diguyMotionVariant get_variant();
Description:

Returns the desired variant of agent actions.

Behavior Functions

function diguyAgentParams::set_behavior

Prototype:

void set_behavior(diguyAgentBehavior behavior);
Description:

Sets the desired behavior of the agent.

For information on agent behaviors see the documentation for the enumeration diguyAgentBehavior, or the DI-Guy AI User Manual.

function diguyAgentParams::get_behavior

Prototype:

diguyAgentBehavior get_behavior();
Description:

Returns the desired behavior of the agent.

function diguyAgentParams::set_behavior_path_shape

Prototype:

void set_behavior_path_shape(const char* behavior_path_shape_name);
Description:

Sets the behavior path shape of the agent.

Pass the name of an existing path shape in the scenario, or pass "" to un-set the behavior path shape.

function diguyAgentParams::get_behavior_path_shape

Prototype:

const char* get_behavior_path_shape();
Description:

Returns the name of the behavior path shape of the agent. If there is no behavior path shape, the string "" will be returned.

function diguyAgentParams::set_behavior_region

Prototype:

void set_behavior_region(const char* behavior_region_name);
Description:

Sets the behavior region of the agent.

Pass the name of an existing region in the scenario, "(crowd region)" to specify the region associated with the agent's crowd if it has one, or "" to un-set the behavior region.

function diguyAgentParams::get_behavior_region

Prototype:

const char* get_behavior_region();
Description:

Returns the name of the behavior region of the agent. If there is no behavior region, the string "" will be returned.

function diguyAgentParams::set_behavior_subregion

Prototype:

void set_behavior_subregion(diguySubregionIndex area);
Description:

Sets the behavior subregion of the agent.

function diguyAgentParams::get_behavior_subregion

Prototype:

diguySubregionIndex get_behavior_subregion();
Description:

Returns the behavior subregion of the agent.

function diguyAgentParams::set_behavior_region_border_is_solid

Prototype:

void set_behavior_region_border_is_solid(int is_solid);
Description:

Sets whether the walls of the region the agent is in are solid. If they are, the agent will treat the walls as if they are solid walls in the environment. If not, the agent is free to walk through them.

Pass 1 to make border walls solid, 0 to make them freely passable.

function diguyAgentParams::get_behavior_region_border_is_solid

Prototype:

int get_behavior_region_border_is_solid();
Description:

Returns whether the walls of the region the agent is in are solid.

function diguyAgentParams::set_focus_character

Prototype:

void set_focus_character(const char* focus_character_name);
Description:

Sets the focus character of this agent. What this means depends on which behavior the agent is doing. For example, when in the wander behavior, when the agent is still it will turn to face the focus character.

Pass the name of an existing scenario character to set a new focus character. Pass "" to un-set the focus character.

function diguyAgentParams::get_focus_character

Prototype:

const char* get_focus_character();
Description:

Returns the name of the focus character of this agent, "" if there is none.

function diguyAgentParams::set_focus_group

Prototype:

void set_focus_group(const char* focus_group_name);
Description:

Sets the focus group of this agent. The focus group is similar to the focus character, except that characters the agent will focus on are selected from the focus group instead of being a single character.

Pass the name of an existing scenario group to set a new focus group. Pass "" to un-set the focus group.

function diguyAgentParams::get_focus_group

Prototype:

const char* get_focus_group();
Description:

Returns the name of the focus group of this agent, "" if there is none.

function diguyAgentParams::set_focus_affects_gaze

Prototype:

void set_focus_affects_gaze(int focus_affects_gaze);
Description:

Sets the whether the agent will gaze at its focus character, or whether setting the focus leaves gaze settings alone.

function diguyAgentParams::get_focus_affects_gaze

Prototype:

int get_focus_affects_gaze();
Description:

Returns whether agent changes gaze settings to gaze at focus character or group.

function diguyAgentParams::set_max_focus_distance

Prototype:

void set_max_focus_distance(float distance);
Description:

Sets the how far away characters in the focus group can be and still be considered as a focus character.

function diguyAgentParams::get_max_focus_distance

Prototype:

float get_max_focus_distance();
Description:

Returns the maximum focus distance for focus groups.

function diguyAgentParams::set_move_on_t_min

Prototype:

void set_move_on_t_min(float t_min);
Description:

Sets the minimum amount of time this agent will stay in one place before moving on to a new location. This applies to the wander and mingle behaviors.

function diguyAgentParams::get_move_on_t_min

Prototype:

float get_move_on_t_min();
Description:

Returns the minimum amount of time before an agent will move on to a new location in certain behaviors.

function diguyAgentParams::set_move_on_t_max

Prototype:

void set_move_on_t_max(float t_max);
Description:

Similar to set_move_on_t_min(), but sets the maximum amount of time.

function diguyAgentParams::get_move_on_t_max

Prototype:

float get_move_on_t_max();
Description:

Similar to get_move_on_t_min(), but returns the maximum amount of time.

Attack Behavior Functions

function diguyAgentParams::set_attack_distance

Prototype:

void set_attack_distance(float distance);
Description:

Sets the distance at which an attacking agent will stop and fire at its target.

function diguyAgentParams::get_attack_distance

Prototype:

float get_attack_distance();
Description:

Returns the distance at which an attacking agent will stop and fire at its target.

function diguyAgentParams::set_attack_fire_interval

Prototype:

void set_attack_fire_interval(float time_interval);
Description:

Sets the interval in seconds at which an attacking agent will fire its weapon when its target is in range.

function diguyAgentParams::get_attack_fire_interval

Prototype:

float get_attack_fire_interval();
Description:

Returns the interval in seconds at which an attacking agent will fire its weapon when its target is in range.

function diguyAgentParams::set_attack_stands_ground

Prototype:

void set_attack_stands_ground(int value);
Description:

Sets whether agents in attack behavior will stay where they are and fire at targets of oppurtunity, or pursue targets.

If an agent is not told to stand its ground it can pursue its current target. The functions set_attack_zone_enabled() and set_attack_zone() might limit the extent that the agent can pursue.

Set to 1 for agents to stand their ground, 0 to allow them to pursue targets. Defaults to 0.

function diguyAgentParams::get_attack_stands_ground

Prototype:

int get_attack_stands_ground();
Description:

Returns the most recent setting made by set_attack_stands_ground().

function diguyAgentParams::set_attack_zone

Prototype:

void set_attack_zone(float x, float y, float z, float radius);
Description:

If an agent is not designated to stand its ground (see set_attack_stands_ground()), and an attack zone is enabled (see set_attack_zone_enabled()), this function sets where and how far an agent can pursue its target.

function diguyAgentParams::get_attack_zone

Prototype:

int get_attack_zone(float* x, float* y, float* z, float* radius);
Description:

Returns position and radius of agent's attack zone.

function diguyAgentParams::set_attack_zone_enabled

Prototype:

void set_attack_zone_enabled(int use_attack_zone);
Description:

If an attacking agent is not designated to stand its ground (see set_attack_stands_ground()) and is therefore free to pursue its target, the attack zone can limit how far it will go in pursuit.

Pass 1 to enable the attack zone, 0 to disable.

function diguyAgentParams::get_attack_zone_enabled

Prototype:

int get_attack_zone_enabled();
Description:

Returns 0 if zone is disabled and agents can pursue indefinitely.

Wander Behavior Functions

function diguyAgentParams::set_wander_max_wander_dist

Prototype:

void set_wander_max_wander_dist(float distance);
Description:

Sets the maximum distance an agent will wander from its previous waiting point.

function diguyAgentParams::set_wander_sets_desired_orientation

Prototype:

void set_wander_sets_desired_orientation(int sets_desired_orientation);
Description:

Sets whether the wander behavior can change the desired orientation.

Pursue Speed Match Functions

function diguyAgentParams::set_pursue_speed_match_enabled

Prototype:

void set_pursue_speed_match_enabled(int enabled);
Description:

Sets whether the speed match functionality is enabled.

function diguyAgentParams::get_pursue_speed_match_enabled

Prototype:

int get_pursue_speed_match_enabled();
Description:

Returns whether speed match functionality is enabled. If it is, agents are able to speed up their fastest animation to match their pursuit target.

function diguyAgentParams::set_pursue_speed_match_update_dt

Prototype:

void set_pursue_speed_match_update_dt(float dt);
Description:

Sets how often the speed match speed is reevaluated. The default is every two seconds.

function diguyAgentParams::get_pursue_speed_match_update_dt

Prototype:

float get_pursue_speed_match_update_dt();
Description:

Returns the frequency that the speed match speed is updated.

function diguyAgentParams::set_pursue_speed_match_max_factor

Prototype:

void set_pursue_speed_match_max_factor(float factor);
Description:

Sets the maximum multiplier that can be applied to the fastest motion when pursuing in order to match speeds with the pursued target.

Example: If an agent's fastest action moves at 3 m/s, the pursue speed match functionality will allow the character to move up to 6 m/s.

The default is 2x. This allows a character with a fast movement motion to keep up with another individual that is moving faster then them, but not a fast moving vehicle.

function diguyAgentParams::get_pursue_speed_match_max_factor

Prototype:

float get_pursue_speed_match_max_factor();
Description:

Returns the maximum speed multiplier the speed match code will use.

function diguyAgentParams::set_pursue_offset

Prototype:

void set_pursue_offset(float x, float y, float z);
Description:

Building block for setting up AI formations. Sets an offset that is used by the AI to modify the pursue location. This offset is considered to be in local space of the target and then is periodically bread-crumbed as the pursue target moves. This avoids small movements wildly confusing the pursuer. Often this is used with the diguyFormation class to data drive this info.

The z argument is currently ignored.

function diguyAgentParams::get_pursue_offset

Prototype:

int get_pursue_offset(float* x, float* y, float* z);
Description:

Accessor for current values of set_pursue_offset.

Path Follow Behavior Functions

function diguyAgentParams::set_path_follow_pause_t_when_off_path

Prototype:

void set_path_follow_pause_t_when_off_path(int pause_t);
Description:

Sets whether time advancement on the path being followed should occur when the agent is in a different behavior.

function diguyAgentParams::get_path_follow_pause_t_when_off_path

Prototype:

int get_path_follow_pause_t_when_off_path();
Description:

Returns the path follow pause t flag.

function diguyAgentParams::set_path_follow_unpause_t_at_radius

Prototype:

void set_path_follow_unpause_t_at_radius(float radius);
Description:

Sets how close the agent must be before a paused path follow will resume.

function diguyAgentParams::get_path_follow_unpause_t_at_radius

Prototype:

float get_path_follow_unpause_t_at_radius();
Description:

Returns the resume distance of a paused path follow.

function diguyAgentParams::set_path_follow_position_lookahead_distance

Prototype:

void set_path_follow_position_lookahead_distance(float distance);
Description:

Sets how far ahead on the path being followed the agent will look ahead for its desired orientation. A value of 1.0 usually provides good results.

function diguyAgentParams::get_path_follow_position_lookahead_distance

Prototype:

float get_path_follow_position_lookahead_distance();
Description:

Returns the lookahead distance of a path follow.

Trap Functions

function diguyAgentParams::set_wedged_untrap_method

Prototype:

void set_wedged_untrap_method(diguyAgentUntrapMethod untrap_method);
Description:

Sets the untrap method used when an agent becomes wedged in a corner.

For information on untrap methods see the documentation for the enumeration diguyAgentUntrapMethod, or the DI-Guy AI User Manual.

function diguyAgentParams::get_wedged_untrap_method

Prototype:

diguyAgentUntrapMethod get_wedged_untrap_method();
Description:

Returns the wedged untrap method.

function diguyAgentParams::set_wedged_trap_time_threshold

Prototype:

void set_wedged_trap_time_threshold(float threshold);
Description:

Sets the how long, in seconds, the agent will walk into a corner before it decides it is wedged and applies the wedged untrap method.

function diguyAgentParams::get_wedged_trap_time_threshold

Prototype:

float get_wedged_trap_time_threshold();
Description:

Returns the how long the agent will walk into a corner before it decides it is wedged.

function diguyAgentParams::set_first_no_progress_untrap_method

Prototype:

void set_first_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
Description:

Sets the untrap method used when an agent has not made progress toward its desired position.

For information on untrap methods see the documentation for the enumeration diguyAgentUntrapMethod, or the DI-Guy AI User Manual.

function diguyAgentParams::get_first_no_progress_untrap_method

Prototype:

diguyAgentUntrapMethod get_first_no_progress_untrap_method();
Description:

Returns the first no progress untrap method.

function diguyAgentParams::set_first_no_progress_trap_time_threshold

Prototype:

void set_first_no_progress_trap_time_threshold(float threshold);
Description:

Sets the how long, in seconds, the agent is willing to make no progress toward its desired position before it applies the first no progress untrap method.

function diguyAgentParams::get_first_no_progress_trap_time_threshold

Prototype:

float get_first_no_progress_trap_time_threshold();
Description:

Returns the how long the agent can make no progress toward its desired position before it decides to apply an untrap method.

function diguyAgentParams::set_second_no_progress_untrap_method

Prototype:

void set_second_no_progress_untrap_method(diguyAgentUntrapMethod untrap_method);
Description:

Similar to set_first_no_progress_untrap_method(), but the time threshold is longer before the second no progress untrap method is applied.

function diguyAgentParams::get_second_no_progress_untrap_method

Prototype:

diguyAgentUntrapMethod get_second_no_progress_untrap_method();
Description:

Similar to get_first_no_progress_untrap_method(), but applied to the second no progress untrap method.

function diguyAgentParams::set_second_no_progress_trap_time_threshold

Prototype:

void set_second_no_progress_trap_time_threshold(float threshold);
Description:

Sets the how long, in seconds, the agent is willing to make no progress toward its desired position before it applies the second no progress untrap method.

function diguyAgentParams::get_second_no_progress_trap_time_threshold

Prototype:

float get_second_no_progress_trap_time_threshold();
Description:

Returns the how long the agent can make no progress toward its desired position before it decides to apply the second no progress untrap method.

function diguyAgentParams::set_untrap_method_random_turn_max_tries

Prototype:

void set_untrap_method_random_turn_max_tries(int max_tries);
Description:

Sets how many times the agent is willing to try applying the random turn untrap method before it gives up and moves on to the next untrap method.

function diguyAgentParams::get_untrap_method_random_turn_max_tries

Prototype:

int get_untrap_method_random_turn_max_tries();
Description:

Returns how many times the agent is willing to try applying the random turn untrap method.

function diguyAgentParams::set_untrap_method_ghost_duration

Prototype:

void set_untrap_method_ghost_duration(float duration);
Description:

Sets how many seconds the agent will be intangible when it is applying the ghost untrap method.

function diguyAgentParams::get_untrap_method_ghost_duration

Prototype:

float get_untrap_method_ghost_duration();
Description:

Returns how many seconds the agent will be intangible when it is applying the ghost untrap method.

Speed Type Parameters

function diguyAgentParams::set_speed_type_enabled

Prototype:

int set_speed_type_enabled(diguyMotionSpeedType motion_speed_type,
    int enabled);
Description:

Sets whether the agent will make use of actions that have the specified speed type.

For information on speed types see the documentation for the enumeration diguyMotionSpeedType. or the DI-Guy AI User Manual.

function diguyAgentParams::get_speed_type_enabled

Prototype:

int get_speed_type_enabled(diguyMotionSpeedType motion_speed_type);
Description:

Returns whether the agent will make use of actions that have the specified speed type.

If the speed type is enabled, the character must be outside the the associated radius for the action to apply. If the character enters that radius, then the next radius down is considered. If all enabled speed types have been exhausted, then the character should stop

function diguyAgentParams::set_speed_type_radius

Prototype:

int set_speed_type_radius(diguyMotionSpeedType motion_speed_type,
    float radius);
Description:

Sets at what radius, in meters, the agent will begin to play actions with the specified speed type, if that type is enabled.

See set_speed_type_radius_hysteresis() for how a hysteresis value can affect the final radius.

function diguyAgentParams::get_speed_type_radius

Prototype:

float get_speed_type_radius(diguyMotionSpeedType motion_speed_type);
Description:

Returns the radius of the specified speed type.

function diguyAgentParams::set_speed_type_radius_hysteresis

Prototype:

void  set_speed_type_radius_hysteresis(float hysteresis_distance);
Description:

Sets the hysteresis of when the speed type changes based on how far the agent is from its desired position. A hysteresis value can help prevent constant switching back and forth of actions if an agent is moving right along the radius separating two speed type zones.

Example: a hysteresis of 2.0 means that if an agent switches from speed type fast to speed type medium at 2 meters, it won't switch back to fast unless it goes back out to 4 meters.

function diguyAgentParams::get_speed_type_radius_hysteresis

Prototype:

float get_speed_type_radius_hysteresis();
Description:

Returns the radius hysteresis as described in set_speed_type_radius_hysteresis().

function diguyAgentParams::set_speed_type_exact_action

Prototype:

int set_speed_type_exact_action(diguyMotionSpeedType motion_speed_type,
    const char* action);
Description:

Sets the exact action the agent will use if it is to use the specified speed type. This is useful if a specific stand action is desired, for example, for the still speed type.

To use the default action, pass "".

function diguyAgentParams::get_speed_type_exact_action

Prototype:

const char* get_speed_type_exact_action(diguyMotionSpeedType motion_speed_type);
Description:

Returns the exact action the agent will use if it is to use the specified speed type.

If the default action is to be used, returns "".

function diguyAgentParams::set_radius_variation

Prototype:

void set_radius_variation(float distance);
Description:

Sets the radius variation that will be applied to speed type radii as set by set_speed_type_radius(). Each agent will have a different amount of variation added to its radii.

Value is in meters.

function diguyAgentParams::get_radius_variation

Prototype:

float get_radius_variation();
Description:

Returns the radius variation for this agent as set by set_radius_variation().

function diguyAgentParams::set_turning_motions_enabled

Prototype:

int set_turning_motions_enabled(int enabled);
Description:

Sets if the character should use turning motions when changing desired orientation. As of diguy-12 defaults to true.

function diguyAgentParams::get_turning_motions_enabled

Prototype:

int get_turning_motions_enabled();
Description:

Returns if the character is using turning motions when changing desired orientation. As of diguy-12 defaults to true.

Dynamic Avoidance Parameters

function diguyAgentParams::set_repulsion_radius

Prototype:

void set_repulsion_radius(diguyAgentRepulsionZone repulsion_zone,
    float radius);
Description:

Sets the radius, in meters, of the specified repulsion zone.

function diguyAgentParams::get_repulsion_radius

Prototype:

float get_repulsion_radius(diguyAgentRepulsionZone repulsion_zone);
Description:

Returns the radius, in meters, of the specified repulsion zone.

function diguyAgentParams::set_repulsion_factor

Prototype:

void set_repulsion_factor(diguyAgentRepulsionZone repulsion_zone,
    float factor);
Description:

Sets the repulsion factor of the specified repulsion zone. Higher repulsion factors will result in agents in the specified zone being pushed away harder.

function diguyAgentParams::get_repulsion_factor

Prototype:

float get_repulsion_factor(diguyAgentRepulsionZone repulsion_zone);
Description:

Returns the repulsion factor of the specified repulsion zone.

function diguyAgentParams::set_repulsion_zone_enabled

Prototype:

void set_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone,
    int enabled);
Description:

Sets whether the specified repulsion zone is enabled. Zones that are not enabled will have no effect on agents in them.

function diguyAgentParams::get_repulsion_zone_enabled

Prototype:

int get_repulsion_zone_enabled(diguyAgentRepulsionZone repulsion_zone);
Description:

Returns whether the specified repulsion zone is enabled.

function diguyAgentParams::set_max_orientation_change_rate

Prototype:

void set_max_orientation_change_rate(float max_orientation_change_rate);
Description:

Sets the fastest the agent can turn, in degrees per second, in response to being repulsed by another agent.

function diguyAgentParams::get_max_orientation_change_rate

Prototype:

float get_max_orientation_change_rate();
Description:

Returns the fastest the agent can turn, in degrees per second, in response to being repulsed by another agent.

function diguyAgentParams::set_influence_center_shift

Prototype:

void set_influence_center_shift(float x, float y, float z);
Description:

Sets the offset, in meters, that the low, medium, and high repulsion zones should have from the agent's position. The solid zone is not affected. Sometimes it is desirable for the repulsion zones to be moved slightly forward, to make it so that other agents approaching this agent from the side will prefer to move behind this agent rather than in front.

Vehicle-Specific Avoidance Parameters

function diguyAgentParams::set_vehicle_base_influence_box

Prototype:

void set_vehicle_base_influence_box(float min_x, float min_y, float min_z,
    float max_x, float max_y, float max_z);
Description:

Sets the base inflence box, in meters, of a vehicle agent. The default influence box is the vehicle's axis-aligned bounding box.

function diguyAgentParams::get_vehicle_base_influence_box

Prototype:

void get_vehicle_base_influence_box(float* min_x, float* min_y, float* min_z,
    float* max_x, float* max_y, float* max_z);
Description:

Returns the vehicle's base influence box.

function diguyAgentParams::set_influence_box_enabled

Prototype:

void set_influence_box_enabled(int enabled = 1);
Description:

Sets whether or not the influence box is active (true by default).

function diguyAgentParams::get_influence_box_enabled

Prototype:

int get_influence_box_enabled();
Description:

Returns whether or not the influence box is active

Feeler Functions

function diguyAgentParams::set_feeler_enabled

Prototype:

void set_feeler_enabled(int feeler_index,
    int feeler_enabled);
Description:

Sets whether the specified feeler is enabled. Feelers that are not enabled will have no effect on the agent.

function diguyAgentParams::get_feeler_enabled

Prototype:

int get_feeler_enabled(int feeler_index);
Description:

Returns whether the specified feeler is enabled.

function diguyAgentParams::set_feeler_rz_offset

Prototype:

void set_feeler_rz_offset(int feeler_index,
    float feeler_rz_offset);
Description:

Sets, in degrees, how far counter-clockwise from forward the feeler is. Zero degrees is straight forward, 90 is to the left, etc. By default the eight feelers are located at 45 degree intervals around the agent.

function diguyAgentParams::get_feeler_rz_offset

Prototype:

float get_feeler_rz_offset(int feeler_index);
Description:

Returns, in degrees, how far counter-clockwise from forward the feeler is.

function diguyAgentParams::set_feeler_height

Prototype:

void set_feeler_height(int feeler_index,
    float feeler_height);
Description:

Sets, in meters, how high the feeler is from the ground. In general feelers should be at about waist level for human characters.

function diguyAgentParams::get_feeler_height

Prototype:

float get_feeler_height(int feeler_index);
Description:

Returns, in meters, how high the feeler is from the ground.

function diguyAgentParams::set_feeler_collision_distance

Prototype:

void set_feeler_collision_distance(int feeler_index,
    float collision_distance);
Description:

Sets, in meters, how far away from the agent the feeler will return collision results. Agents will be pushed away from the object collided with until they are not colliding anymore.

function diguyAgentParams::get_feeler_collision_distance

Prototype:

float get_feeler_collision_distance(int feeler_index);
Description:

Returns, in meters, how far away from the agent the feeler will return collision results.

function diguyAgentParams::set_feeler_turn_distance

Prototype:

void set_feeler_turn_distance(int feeler_index,
    float turn_distance);
Description:

Sets, in meters, how far away from the agent the feeler will return turn results. Agents will turn left or right to try to move along the face of a felt obstacle, instead of walking straight into it.

function diguyAgentParams::get_feeler_turn_distance

Prototype:

float get_feeler_turn_distance(int feeler_index);
Description:

Returns, in meters, how far away from the agent the feeler will return turn results.

function diguyAgentParams::set_feeler_turn_direction

Prototype:

void set_feeler_turn_direction(int feeler_index,
    diguyCharacterFeelerTurnDirection turn_direction);
Description:

Sets which direction the feeler will turn the agent when it touches something within the turn distance.

function diguyAgentParams::get_feeler_turn_direction

Prototype:

diguyCharacterFeelerTurnDirection get_feeler_turn_direction(int feeler_index);
Description:

Returns which direction the feeler will turn the agent when it touches something within the turn distance.

Path Planner Parameter Functions

function diguyAgentParams::set_path_planner_preferred_region_mask

Prototype:

void set_path_planner_preferred_region_mask(int mask);
Description:

Sets the preferred traveling region mask.

When an agent plans a path, the preferred areas will be considered the easiest to cross and the path should gravitate to them.

The mask argument should be an or'ed together list of diguySubregionMasks. In C++ or Perl masks can be combined with the '|' operator, in Lua the bit library can be used: bit.bor(MASK_A, MASK_B, ...)

function diguyAgentParams::get_path_planner_preferred_region_mask

Prototype:

int get_path_planner_preferred_region_mask();
Description:

Returns:

the preferred region mask; see set_path_planner_preferred_region_mask() and set_path_planner_neutral_cost_bias()

function diguyAgentParams::set_path_planner_preferred_cost_bias

Prototype:

void set_path_planner_preferred_cost_bias(float value);
Description:

Sets how much less expensive it is to cross spaces that are in the desired subregion. (Repulsive and neutral regions have their own cost bias; see set_path_planner_repulsed_cost_bias().)

This value should be < 1. The default value is 0.25.

function diguyAgentParams::get_path_planner_preferred_cost_bias

Prototype:

float get_path_planner_preferred_cost_bias();
Returns:

the cost bias of preferred regions during A* searches; see set_path_planner_preferred_cost_bias()

function diguyAgentParams::set_path_planner_neutral_cost_bias

Prototype:

void set_path_planner_neutral_cost_bias(float value);
Description:

Sets how much more expensive it is to cross spaces that are not in a desired subregion. (Repulsive regions have their own cost bias; see set_path_planner_repulsed_cost_bias().)

Defaults to 1.1, A value < 1 will cause the planner to run faster but explore fewer points, posibly missing preferred regions. Values greater then 1 will explore more points but will take more time to run.

Pass DIGUY_DEFAULT_FLOAT for the value to specify that neutral regions should be avoided completely. This can, however, cause path planning to fail more often.

function diguyAgentParams::get_path_planner_neutral_cost_bias

Prototype:

float get_path_planner_neutral_cost_bias();
Returns:

the cost bias of neutral regions during A* searches; see set_path_planner_neutral_cost_bias()

function diguyAgentParams::set_path_planner_repulsed_region_mask

Prototype:

void set_path_planner_repulsed_region_mask(int mask);
Description:

Sets the repulsive traveling region mask.

When an agent plans a path the repulsive areas will be considered the hardest to cross and the planner will try to avoid them.

The mask argument should be an or'ed together list of diguySubregionMasks. In C++ or Perl masks can be combined with the '|' operator, in Lua the bit library can be used: bit.bor(MASK_A, MASK_B, ...)

function diguyAgentParams::get_path_planner_repulsed_region_mask

Prototype:

int get_path_planner_repulsed_region_mask();
Returns:

the repulsed region mask; see set_path_planner_repulsed_region_mask()

function diguyAgentParams::set_path_planner_repulsed_cost_bias

Prototype:

void set_path_planner_repulsed_cost_bias(float value);
Description:

Sets how much more expensive it will be to cross spaces that are marked as repulsive.

This value should generally be much larger then 1. The default value is 100.

Pass DIGUY_DEFAULT_FLOAT for the value to specify that repulsive regions should be avoided completely. This can, however, cause path planning to fail more often.

function diguyAgentParams::get_path_planner_repulsed_cost_bias

Prototype:

float get_path_planner_repulsed_cost_bias();
Returns:

the cost bias of repulsive regions during A* searches; see set_path_planner_repulsed_cost_bias()

function diguyAgentParams::set_path_planner_fallback_region

Prototype:

void set_path_planner_fallback_region(const char* fallback_region_name);
Description:

Sets the name of the region to try to use if the path planner fails to work on the current behavior region. This is often the name of a global navmesh.

function diguyAgentParams::get_path_planner_fallback_region

Prototype:

const char* get_path_planner_fallback_region();
Returns:

The name of the fallback region that the path planner will fall back to if a search on the behavior region fails.

function diguyAgentParams::set_wander_uses_path_planner

Prototype:

void set_wander_uses_path_planner(int wander_uses_path_planner);
Description:

Sets whether the wander behavior will try to use the path planner when the agent can't see it's target location with a viability check.

function diguyAgentParams::get_wander_uses_path_planner

Prototype:

int get_wander_uses_path_planner();
Returns:

whether the wander behavior uses the path planner; see set_wander_uses_path_planner()

function diguyAgentParams::set_pursue_uses_path_planner

Prototype:

void set_pursue_uses_path_planner(int pursue_uses_path_planner);
Description:

Sets whether the pursue behavior will try to use the path planner when the agent can't see it's target with a viability check.

The agent will do a new visibility check at each waypoint in the navigation path.

function diguyAgentParams::get_pursue_uses_path_planner

Prototype:

int get_pursue_uses_path_planner();
Returns:

whether the pursue behavior uses the path planner; see set_wander_uses_path_planner()

function diguyAgentParams::set_max_LOS_travel_distance

Prototype:

void set_max_LOS_travel_distance(float distance);
Description:

Sets the maximum distance the wander behavior will travel without using the path planner, when the agent can see it's target location with a Line-Of-Sight viability check.

This value defaults to 1000 meters.

Adjusting it lower is meant for users that have an environment that is well tagged with preferred and repulsed regions.

For example, just because an agent can see the store across an eight lane highway doesn't mean it should run straight there.

function diguyAgentParams::get_max_LOS_travel_distance

Prototype:

float get_max_LOS_travel_distance();
Returns:

the Line-Of-Sight travel distance threshold; see set_max_LOS_travel_distance().

function diguyAgentParams::set_desired_navpath_distance_threshold

Prototype:

void set_desired_navpath_distance_threshold(float threshold);
Description:

Sets the distance from the final point on a navpath that the guide algorithm will attempt to achieve before declaring that its destination has been reached.

The default distance is 0.31 meters.

In general this value should only be changed if agent ends up "orbiting" the final desired position.

function diguyAgentParams::get_desired_navpath_distance_threshold

Prototype:

float get_desired_navpath_distance_threshold();
Returns:

distance from final point in navpath at which the desired position is considered acquired; see set_desired_navpath_distance_threshold()

Experimental Functions

function diguyAgentParams::set_path_planner_cost_rule

Prototype:

void set_path_planner_cost_rule(int mask);
see diguyNavMeshPathPlannerCostMask for acceptable values.

function diguyAgentParams::get_path_planner_cost_rule

Prototype:

int get_path_planner_cost_rule();

Alphabetical Index




Copyright (C) 1992-2012 Boston Dynamics

ALL RIGHTS RESERVED.

These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.

RESTRICTED RIGHTS LEGEND

Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.

Contractor/Manufacturer is:

Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.