
This file was automatically generated from comments in the C/C++ header file diguyCharacterGesture.h. Do not edit this file directly; the changes will be lost. Please mail suggestions or corrections to diguy@bdi.com
Includes: declspec_diguy.h
class diguyCharacterGesture
|
class BDI_DECLSPEC_diguy diguyCharacterGesture { public: const char* get_name(); int begin_now(); int get_has_begun_flag(); 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 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_stages(); int get_num_channels(); int set_stage_duration(int stage, float duration); float get_stage_duration(int stage); float get_stage_optimal_duration(int stage); 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); #ifdef CPLUSPLUS_ONLY bdiGestureArcInstance* get_scripted_object() {return m_scripted_object;} };
function diguyCharacterGesture::get_name |
Prototype:
Callable From:const char* get_name();
Returns:
- C++
- Script
name of the gesture
function diguyCharacterGesture::begin_now |
Prototype:
Description:int begin_now();
This function causes the gesture to begin immediately. The gesture will continue until it has completed.
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 failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_has_begun_flag |
Prototype:
Callable From:int get_has_begun_flag();
Returns:
- C++
- Script
1 if the gesture has begun; 0 if not
function diguyCharacterGesture::get_has_completed_flag |
Prototype:
Callable From:int get_has_completed_flag();
Returns:
- C++
- Script
1 if the gesture has completed; 0 if not
function diguyCharacterGesture::abort_now |
Prototype:
Description:int abort_now(float max_rampdown_interval);
This function causes this gesture to abort. Aborting a gesture doesn't destroy it. The gesture can be begun again if desired.Arguments:
Returns:
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 an immediate abort
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::set_automatic_destroy_flag |
Prototype:
Description:int set_automatic_destroy_flag(int automatic_destroy_flag);
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.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::set_interpolation_flag |
Prototype:
Description:int set_interpolation_flag(int flag);
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:
Returns:
flag pass 1 to turn on interpolation, pass 0 to turn off interpolation
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_interpolation_flag |
Prototype:
Returns:int get_interpolation_flag();
the most recent setting of set_interpolation_flag()Callable From:
- C++
- Script
function diguyCharacterGesture::set_max_reps |
Prototype:
Description:int set_max_reps(int max_reps, int derive_duration_flag = 1);
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.Arguments:
Returns:
max_reps number of times gesture will be repeated derive_duration_flag pass 1 to derive optimal overall duration from passed max_reps
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_max_reps |
Prototype:
Returns:int get_max_reps();
the number of times the gesture will be repeatedCallable From:
- C++
- Script
function diguyCharacterGesture::set_overall_duration |
Prototype:
Description:int set_overall_duration(float overall_duration, int derive_max_reps_flag = 1);
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()).Arguments:
Returns:
overall_duration duration of all stages of the gesture, in seconds derive_duration_flag pass 1 to derive optimal number of reps for the given duration
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_overall_duration |
Prototype:
Returns:float get_overall_duration();
the overall duration in seconds of the gestureCallable From:
- C++
- Script
function diguyCharacterGesture::get_num_stages |
Prototype:
Returns:int get_num_stages();
the number of stages in the gestureCallable From:
- C++
- Script
function diguyCharacterGesture::get_num_channels |
Prototype:
Returns:int get_num_channels();
how many channels are in the gestureCallable From:
- C++
- Script
function diguyCharacterGesture::set_stage_duration |
Prototype:
Description:int set_stage_duration(int stage, float duration);
This function sets the exact duration of the specified stage of the gesture.Arguments:
Returns:
duration duration of stage, in seconds
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_stage_duration |
Prototype:
Returns:float get_stage_duration(int stage);
the duration in seconds of specified stage of the gestureCallable From:
- C++
- Script
function diguyCharacterGesture::get_stage_optimal_duration |
Prototype:
Returns:float get_stage_optimal_duration(int stage);
the optimal duration in seconds of specified stage of the gesture
function diguyCharacterGesture::set_channel_weight |
Prototype:
Description:int set_channel_weight(char channel, float channel_weight);
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:
Returns:
channel which channel to affect; pass a single upper case character (e.g., 'A') channel_weight value between 0 and 1; 1 means gesture is entirely driven by specified channel, 0 means specified channel has no effect on gesture
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_channel_weight |
Prototype:
Returns:float get_channel_weight(char channel);
the current weight of the specified channel; see set_channel_weight()Callable From:
- C++
- Script
function diguyCharacterGesture::set_channel_weight_target |
Prototype:
Description:int set_channel_weight_target(char channel, float channel_weight_target, float blend_tin, float blend_tout, const char* blend_function_name = 0);
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_target target 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:
Returns:
"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
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::add_channel_weight_target |
Prototype:
Description:int add_channel_weight_target(char channel, float channel_weight_target, float blend_tin, float blend_tout, const char* blend_function_name = 0);
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:
Perl Example:
channel which channel to affect; pass a single upper case character (e.g., 'A') channel_weight_target target 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
Returns:
# # Create a gesture. # $gesture1 = $ch1->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);
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyCharacterGesture::get_scripted_object |
Prototype:
bdiGestureArcInstance* get_scripted_object();
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/515 Massachusetts Avenue/Cambridge MA 02139.