diguyCharacterGesture

Generated from diguyCharacterGesture.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguyCharacterGesture.h. Do not edit this file directly; the changes will be lost.
Includes: diguyCharacterGestureType.h | diguy_constants.h | declspec_diguy.h

Contents:

Alphabetical Index

class diguyCharacterGesture

class BDI_DECLSPEC_diguy diguyCharacterGesture
{
public:
    const char* get_name();
    diguyCharacterGestureType get_gesture_type();
    int begin_now();
    float get_tin();
    int get_has_begun_flag();
    int end_gesture();
    int get_has_completed_flag();
    int abort_now(float max_rampdown_interval);
    int set_automatic_destroy_flag(int automatic_destroy_flag);
    int set_interpolation_flag(int flag);
    int get_interpolation_flag();
    int get_num_channels();
    int set_channel_weight(char channel, float channel_weight);
    float get_channel_weight(char channel);
    int set_channel_weight_target(char channel,
        float channel_weight_target,
        float blend_tin,
        float blend_tout,
        const char* blend_function_name = 0);
    int add_channel_weight_target(char channel,
        float channel_weight_target,
        float blend_tin,
        float blend_tout,
        const char* blend_function_name = 0);
    int set_rampup_duration(float duration);
    float get_rampup_duration();
    int set_rampup_blend_function_name(const char* blend_function_name);
    const char* get_rampup_blend_function_name();
    int set_rampdown_duration(float duration);
    float get_rampdown_duration();
    int set_rampdown_blend_function_name(const char* blend_function_name);
    const char* get_rampdown_blend_function_name();
    float get_default_blend_duration();
    int set_max_reps(int max_reps,
        int derive_duration_flag = 1);
    int get_max_reps();
    int set_overall_duration(float overall_duration,
        int derive_max_reps_flag = 1);
    float get_overall_duration();
    int get_num_progression_stages();
    int set_progression_stage_duration(int stage, float duration);
    float get_progression_stage_duration(int stage);
    float get_progression_stage_optimal_duration(int stage);
    int set_table_action_desired(const char* action_name);
    const char* get_table_action_desired();
    float get_time_required_to_reach_table_action_desired();
    int get_num_table_actions();
    const char* get_table_action_at_index(int index);
    float get_table_action_rep_duration(const char* action_name);
    float get_table_transition_duration(const char* action_from,
        const char* action_to);
    int set_table_action_begin(const char* action_name);
    const char* get_table_action_begin();
    int set_table_action_end(const char* action_name);
    const char* get_table_action_end();
    const char* get_table_action_now();
    const char* get_table_action_next();
    int force_table_action(const char* action_name,
        int include_transition_arc = 1,
        float max_rampdown_interval = 0.5f);
    enum {
        CALLBACK_ID_CREATE = 1,
        CALLBACK_ID_DESTROY,
        CALLBACK_ID_ATTAINED_DESIRED_ACTION
    };
#ifdef CPLUSPLUS_ONLY
    int add_callback(int callback_id,
        diguyCharacterGestureCallback* callback,
        void* callback_params = 0,
        void* callback_user_data = 0);
    int remove_callback(int callback_id,
        diguyCharacterGestureCallback* callback);
    int remove_callback_with_user_data(int callback_id,
        void* callback_user_data);
    int add_callback_script(int callback_id,
        const char* callback_script,
        const char* callback_script_type = NULL);
    int remove_callback_script(int callback_id,
        const char* callback_script,
        const char* callback_script_type = NULL);
    int get_num_stages();
    int set_stage_duration(int stage, float duration);
    float get_stage_duration(int stage);
    float get_stage_optimal_duration(int stage);
Common Functions

function diguyCharacterGesture::get_name

Prototype:

const char* get_name();
Returns:

name of the gesture

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_gesture_type

Prototype:

diguyCharacterGestureType get_gesture_type();
Returns:

type of the gesture

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::begin_now

Prototype:

int begin_now();
Description:

This function causes the gesture to begin immediately. The gesture will continue until it has completed or is aborted.

Calling this function on a gesture that has already begun will result in a warning message and have no other effect.

Progression Gestures:

The overall duration of the gesture can be set by calling set_overall_duration(). The durations of each stage will be set proportionately over the overall duration.

Alternatively, the durations of individual stages of the gesture can be set by calling set_stage_duration().

The number of repetitions of the gesture can be set by calling set_max_reps().

Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_tin

Prototype:

float get_tin();
Description:

This function returns the time at which the gesture began.

Returns:

time in seconds when scenario began

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_has_begun_flag

Prototype:

int get_has_begun_flag();
Returns:

1 if the gesture has begun; 0 if not

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::end_gesture

Prototype:

int end_gesture();
Description:

This function notifies the gesture that it should complete as soon as possible. To end a gesture immediately, call abort_now().

Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_has_completed_flag

Prototype:

int get_has_completed_flag();
Returns:

1 if the gesture has completed; 0 if not

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::abort_now

Prototype:

int abort_now(float max_rampdown_interval);
Description:

This function causes this gesture to abort. Aborting a gesture doesn't destroy it. The gesture can be begun again if desired. To end a gesture gracefully call end_gesture().

Arguments:

max_rampdown_intervalmax amount of time spent trying to smooth over any motion seams; pass 0.5 for a smooth transition, pass 0 for an immediate abort
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_automatic_destroy_flag

Prototype:

int set_automatic_destroy_flag(int automatic_destroy_flag);
Description:

This function causes the gesture object to be automatically deleted when the gesture has completed. No further calls through the diguyCharacterGesture object can or should be made, so this function should only be called once all durations, reps, etc. have been set.

automatic_destroy_flagpass 1 to enable automatic deletion
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_interpolation_flag

Prototype:

int set_interpolation_flag(int flag);
Description:

This function sets whether joint angles in the gesture will be interpolated. This takes more time, but results in smoother motion at high frame rates.

Arguments:

flagpass 1 to turn on interpolation, pass 0 to turn off interpolation
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_interpolation_flag

Prototype:

int get_interpolation_flag();
Returns:

the most recent setting of set_interpolation_flag()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_num_channels

Prototype:

int get_num_channels();
Returns:

how many channels are in the gesture

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_channel_weight

Prototype:

int set_channel_weight(char channel, float channel_weight);
Description:

This function sets the weight of the specified channel. The other channel weights in a multi-channel gesture will be affected by this call so that all channel weight add to 1.

If the gesture does not have the channel, this function has no effect.

Arguments:

channel which channel to affect; pass a single upper case character (e.g., 'A')
channel_weightvalue between 0 and 1; 1 means gesture is entirely driven by specified channel, 0 means specified channel has no effect on gesture
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_channel_weight

Prototype:

float get_channel_weight(char channel);
Returns:

the current weight of the specified channel; see set_channel_weight()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_channel_weight_target

Prototype:

int set_channel_weight_target(char channel,
    float channel_weight_target,
    float blend_tin,
    float blend_tout,
    const char* blend_function_name = 0);
Description:

This function schedules a smooth ramp of the channel weight from its current value to the specified target value.

This function is equivalent to calling set_channel_weight() many times over the course of a gesture.

Calling this function removes any pending channel weight targets added by calls to either set_channel_weight_target() or add_channel_weight_target().

Arguments:

channel which channel to affect; pass a single upper case character (e.g., 'A')
channel_weight_targettarget channel weight; a value between 0 and 1
blend_tin when, relative to the start of the gesture, the channel weight should begin moving toward channel_weight_target
blend_tout when, relative to the start of the gesture, the channel weight should arrive at channel_weight_target
blend_function_name name of the curve to use to move between current channel weight and target channel weight
The possible blend function names are:

"HalfSine"half of a sine curve going from 0 to 1; good blend function for smooth entry and exit
"Linear" linear line from 0 to 1
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::add_channel_weight_target

Prototype:

int add_channel_weight_target(char channel,
    float channel_weight_target,
    float blend_tin,
    float blend_tout,
    const char* blend_function_name = 0);
Description:

This function is similar to set_channel_weight_target(), but adds the channel weight target to a queue of pending targets. The gesture will not begin moving the current channel weight to the specified target until all pending channel weight targets from previous calls to set_channel_weight_target() and add_channel_weight_target() have been reached.

Arguments:

channel which channel to affect; pass a single upper case character (e.g., 'A')
channel_weight_targettarget channel weight; a value between 0 and 1
blend_tin when, relative to the start of the gesture, the channel weight should begin moving toward channel_weight_target
blend_tout when, relative to the start of the gesture, the channel weight should arrive at channel_weight_target
blend_function_name name of the curve to use to move between current channel weight and target channel weight
Lua Example:

        --  Create a gesture.
        local gesture1 = character:create_gesture("example_gesture");

        --  Set the starting channel weight of channel 'A' to 0.2.
        gesture1:set_channel_weight('A', 0.2);
    
        --
        --  Set a channel weight target.  This call essentially does this:
        --
        --  Smoothly change the channel A weight of the gesture from its
        --  current value (0.2) to 0, starting at 1.5 seconds into the
        --  gesture, finishing 3.5 seconds into the gesture.
        --
        gesture1:set_channel_weight_target(
            'A',                -- channel to change
            0.0,                -- target weight
            1.5,                -- when to start changing
            3.5,                -- when to stop changing
            "HalfSine");        -- curve to use for blend
        
        --
        --  Add another channel weight target.  This call essentially does this:
        --
        --  Smoothly change the channel A weight of the gesture from its
        --  last set channel weight (0) to 0.8, starting at 3.5 seconds into
        --  the gesture, finishing 5.5 seconds into the gesture.
        --
        gesture1:add_channel_weight_target(
            'A',
            0.8,
            3.5,
            5.5,
            "HalfSine");
        
        --
        --  We're done tweaking the gesture.  Set its automatic destroy flag
        --  so that it will be deleted when the gesture has completed.
        --
        gesture1:set_automatic_destroy_flag(1);
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_rampup_duration

Prototype:

int set_rampup_duration(float duration);
Description:

This function sets how long the gesture will take to "rampup" control of joints from the base motion to the gesture. A longer rampup will result in a smoother transition into the gesture.

If the rampup duration is longer than the first motion of the gesture, it will be shortened to be the same duration as the first motion. Motion motions are 0.5 seconds or shorter.

The default duration is 0.5 seconds.

Arguments:

durationrampup duration, in seconds
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_rampup_duration

Prototype:

float get_rampup_duration();
Returns:

the rampup duration as set by set_rampup_duration()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_rampup_blend_function_name

Prototype:

int set_rampup_blend_function_name(const char* blend_function_name);
Description:

This function sets which blend function will be used during rampup to transition control of joints from the base motion to the gesture.

The default blend function is "HalfSine".

Arguments:

blend_function_namenew rampup blend function
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_rampup_blend_function_name

Prototype:

const char* get_rampup_blend_function_name();
Returns:

the rampup blend function as set by set_rampup_blend_function_name()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_rampdown_duration

Prototype:

int set_rampdown_duration(float duration);
Description:

This function sets how long the gesture will take to "rampdown" control of joints from the gesture to the base motion. A longer rampdown will result in a smoother transition out of the gesture.

Arguments:

durationrampdown duration, in seconds
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_rampdown_duration

Prototype:

float get_rampdown_duration();
Returns:

the rampdown duration as set by set_rampdown_duration()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_rampdown_blend_function_name

Prototype:

int set_rampdown_blend_function_name(const char* blend_function_name);
Description:

This function sets which blend function will be used during rampdown to transition control of joints from the gesture to the base motion.

The default blend function is "HalfSine".

Arguments:

blend_function_namenew rampdown blend function
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_rampdown_blend_function_name

Prototype:

const char* get_rampdown_blend_function_name();
Returns:

the rampdown blend function as set by set_rampdown_blend_function_name()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_default_blend_duration

Prototype:

float get_default_blend_duration();
Description:

This function returns the default blend duration. This is the amount of time the gesture will take to blend motions together to produce more seamless motions.

Returns:

default blend duration, in seconds

Callable For Gesture Types:

Callable From:

Progression Gesture Functions

function diguyCharacterGesture::set_max_reps

Prototype:

int set_max_reps(int max_reps,
    int derive_duration_flag = 1);
Description:

This function sets the number of times the gesture will be repeated. The optimal overall duration can be optionally computed based on the number of repetitions specified.

Table Gestures:

Table gestures do not yet make use of the overall duration. The derive_duration_flag should be given a value of 0.

Arguments:

max_reps number of times gesture will be repeated
derive_duration_flagpass 1 to derive optimal overall duration from passed max_reps
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_max_reps

Prototype:

int get_max_reps();
Returns:

the number of times the gesture will be repeated

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_overall_duration

Prototype:

int set_overall_duration(float overall_duration,
    int derive_max_reps_flag = 1);
Description:

This function sets the overall duration the gesture will have. The optimal number of repetitions can be optionally computed based on the specified duration.

Calling this function will override any previous calls that set specific stage durations (e.g., as set by a call to set_stage_duration()).

Table Gestures:

Table gestures do not yet make use of the overall duration.

Arguments:

overall_duration duration of all stages of the gesture, in seconds
derive_max_reps_flagpass 1 to derive optimal number of reps for the given duration
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_overall_duration

Prototype:

float get_overall_duration();
Returns:

the overall duration in seconds of the gesture

Table Gestures:

Table gestures do not yet make use of the overall duration.

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_num_progression_stages

Prototype:

int get_num_progression_stages();
Returns:

the number of stages in the gesture

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_progression_stage_duration

Prototype:

int set_progression_stage_duration(int stage, float duration);
Description:

This function sets the exact duration of the specified stage of the gesture.

Arguments:

stage stage; an integer between 1 and 3
durationduration of stage, in seconds
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_progression_stage_duration

Prototype:

float get_progression_stage_duration(int stage);
Returns:

the duration in seconds of specified stage of the gesture

Arguments:

stage stage; an integer between 1 and 3
Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_progression_stage_optimal_duration

Prototype:

float get_progression_stage_optimal_duration(int stage);
Returns:

the optimal duration in seconds of specified stage of the gesture

Arguments:

stage stage; an integer between 1 and 3
Callable For Gesture Types:

Callable From:

Table Gesture Functions

function diguyCharacterGesture::set_table_action_desired

Prototype:

int set_table_action_desired(const char* action_name);
Description:

This function sets the desired action for table gestures. The gesture will begin a transition to the desired action as soon as it can.

The time required to reach the desired action can be determined by calling the get_time_required_to_reach_table_action_desired() function.

Arguments:

action_namename of desired action
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_desired

Prototype:

const char* get_table_action_desired();
Description:

This function returns the desired action for table gestures.

If this gesture is not a table gesture the string "error" will be returned.

The desired action can be set using the set_table_action_desired() function.

Returns:

name of desired action, "error" on error

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_time_required_to_reach_table_action_desired

Prototype:

float get_time_required_to_reach_table_action_desired();
Description:

This function returns how much time it will take to reach the desired action for table gestures.

Returns:

time in seconds needed to reach desired action

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_num_table_actions

Prototype:

int get_num_table_actions();
Description:

This function returns how many actions a table gesture contains. The function get_table_action_at_index() can be called to get the name of the actions.

Returns:

number of actions in table gesture

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_at_index

Prototype:

const char* get_table_action_at_index(int index);
Description:

This function returns the name of the table action at the specified index.

Returns:

name of table action; NULL if no action at given index

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_rep_duration

Prototype:

float get_table_action_rep_duration(const char* action_name);
Description:

This function returns how long a single repetition of a table action takes.

Arguments:

action_namename of action
Returns:

duration of single rep, in seconds

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_transition_duration

Prototype:

float get_table_transition_duration(const char* action_from,
    const char* action_to);
Description:

This function returns how long the transition motion(s) take between two table actions.

Arguments:

action_fromname of origin action
action_toname of destination action
Returns:

duration of transition, in seconds

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_table_action_begin

Prototype:

int set_table_action_begin(const char* action_name);
Description:

This function sets which action a table gesture should begin at when begin_now() is called. The gesture's first motion will be the transition motion from the beginning action to the desired action if the actions differ, or the looping motion of the desired action if they are the same.

The default beginning action is the action at index 0.

Arguments:

action_namename of beginning action
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_begin

Prototype:

const char* get_table_action_begin();
Returns:

the name of the beginning action of a table gesture, as set by set_table_action_begin()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::set_table_action_end

Prototype:

int set_table_action_end(const char* action_name);
Description:

This function sets which action a table gesture should end with when end_gesture() is called. The default ending action is the action at index 0.

Arguments:

action_namename of ending action
Returns:

0 on success, -1 on failure

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_end

Prototype:

const char* get_table_action_end();
Returns:

the name of the ending action of a table gesture, as set by set_table_action_end()

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_now

Prototype:

const char* get_table_action_now();
Returns:

the name of the action the table gesture is currently playing

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::get_table_action_next

Prototype:

const char* get_table_action_next();
Returns:

the name of the action the table gesture will play next

Callable For Gesture Types:

Callable From:

function diguyCharacterGesture::force_table_action

Prototype:

int force_table_action(const char* action_name,
    int include_transition_arc = 1,
    float max_rampdown_interval = 0.5f);
Description:

This function forces the current action of the table gesture to be the action identified by action_name.

Arguments:

action_name name of the action to be performed by the gesture
include_transition_arcflag for whether the transition motion from the current action to the new action is included; pass 1 for best chance of good looking transition; pass 0 for fastest response
max_rampdown_interval max amount of time spent trying to smooth over any motion seams; set to 0.5 for a smooth transition, set to 0 for a potentially rough transition
Returns:

0 on success, -1 on failure

Callable From:

Callback Functions

enumeration

	enum {
		CALLBACK_ID_CREATE = 1,
		CALLBACK_ID_DESTROY,
		CALLBACK_ID_ATTAINED_DESIRED_ACTION
	};
Description:

This is an enumeration of the different callbacks that can be registered with add_callback() and add_callback_script().

Usable From:

function diguyCharacterGesture::add_callback

Prototype:

int add_callback(int callback_id,
    diguyCharacterGestureCallback* callback,
    void* callback_params = 0,
    void* callback_user_data = 0);
Description:

This function adds a user callback.

Arguments:

callback pointer to function with prototype diguyCharacterGestureCallback (typedefed above)
callback_id integer id of when this callback is to be called
callback_paramsnot currently used; pass NULL
callback_user_datapointer for user's own use; DI-Guy will do nothing to the contents of this pointer beyond passing it back when the callback is invoked
callback_id should be one of the following values:

CALLBACK_ID_CREATE

This callback will be called when a new gesture is created.

CALLBACK_ID_DESTROY

This callback will be called when the gesture is destroyed.

CALLBACK_ID_ATTAINED_DESIRED_ACTION

This callback will be called when a table gesture has reached its desired action as set by set_table_action_desired().

Callback Return Values:

Callbacks return a value of type diguyCallbackReturn, which will be DIGUY_CALLBACK_STOP or DIGUY_CALLBACK_CONTINUE. If the callback returns DIGUY_CALLBACK_STOP, the default handler of the function will not be called; the callback is asserting that it has done everything necessary for the function call. If the callback returns DIGUY_CALLBACK_CONTINUE, the default handler for the function will be called after the callback.

Returns:

0 on success, -1 on failure

Callable From:

function diguyCharacterGesture::remove_callback

Prototype:

int remove_callback(int callback_id,
    diguyCharacterGestureCallback* callback);
Description:

This function removes a user callback. All callbacks matching the specified callback_id and callback function will be removed.

Arguments:

callback_id integer id of when this callback is to be called
callback pointer to function with prototype diguyCharacterGestureCallback (typedefed above)
Returns:

0 on success, -1 on failure

Callable From:

function diguyCharacterGesture::remove_callback_with_user_data

Prototype:

int remove_callback_with_user_data(int callback_id,
    void* callback_user_data);
Description:

This function removes a user callback. All callbacks matching the specified callback_id and callback_user_data pointer will be removed.

Arguments:

callback_id integer id of when this callback is to be called
callback_user_datapointer for user's own use
Returns:

0 on success, -1 on failure

Callable From:

function diguyCharacterGesture::add_callback_script

Prototype:

int add_callback_script(int callback_id,
    const char* callback_script,
    const char* callback_script_type = NULL);
Description:

This function adds a user callback script. Callback scripts can be removed with remove_callback_script().

See diguyCharacter::add_callback_script() for an example of use.

Arguments:

callback_id integer id of the callback
callback_script script text of callback to be added
callback_script_typethe type of script contained in callback_script
If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.

lua specific:

When the script is called, the object for which it is being called will be in the $callback_object scalar.

To pass NULL when calling from a lua script, use nil.

Returns:

0 on success, -1 on failure

Callable From:

function diguyCharacterGesture::remove_callback_script

Prototype:

int remove_callback_script(int callback_id,
    const char* callback_script,
    const char* callback_script_type = NULL);
Description:

This function removes a user callback script previously added with add_callback_script().

See diguyCharacter::remove_callback_script() for an example of use.

Arguments:

callback_id integer id of the callback
callback_script script text of callback previously added
callback_script_typethe type of script contained in callback_script
If NULL is passed for callback_script, all callback scripts whose ids match callback_id and whose types match callback_script_type will be removed.

If NULL is passed for callback_script_type, a default script type will be derived based on the default script interpreter of the scenario.

lua specific:

To pass NULL when calling from a lua script, use nil.

Returns:

0 on success, -1 on failure

Callable From:

Deprecated Functions
The following functions are deprecated.

As these functions may disappear in a future version of DI-Guy, it is recommended that you replace calls to these functions from your application.

function diguyCharacterGesture::get_num_stages

Prototype:

int get_num_stages();
Description:

This function is deprecated. Use get_num_progression_stages() instead.

function diguyCharacterGesture::set_stage_duration

Prototype:

int set_stage_duration(int stage, float duration);
Description:

This function is deprecated. Use set_progression_stage_duration() instead.

function diguyCharacterGesture::get_stage_duration

Prototype:

float get_stage_duration(int stage);
Description:

This function is deprecated. Use get_progression_stage_duration() instead.

function diguyCharacterGesture::get_stage_optimal_duration

Prototype:

float get_stage_optimal_duration(int stage);
Description:

This function is deprecated. Use get_progression_stage_optimal_duration() instead.


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.