
|
|
This file was automatically generated from diguyChainSimulation.h. Do not edit this file directly; the changes will be lost.Includes: declspec_diguy.h
Contents:
class diguyChainSimulation
|
class BDI_DECLSPEC_diguy diguyChainSimulation { public: diguyChainSettings* get_settings(); int update_settings(const char* settings); int do_stabilization_time_runoff(float time_runoff); void set_is_frozen(int is_frozen); int get_is_frozen(); int set_chain_mass_connection_character(int chain_mass_index, const char* character_name, const char* link_name = NULL, float link_offset_x = 0.0f, float link_offset_y = 0.0f, float link_offset_z = 0.0f, float connection_smoothing_period = 0.1f); int set_chain_mass_position(int chain_mass_index, float mass_x, float mass_y, float mass_z, int fix_mass_position); int set_chain_mass_positions_along_path_shape(diguyPathShape* path_shape, int stretch_to_fit = 1); int set_chain_mass_position_is_fixed(int chain_mass_index, int is_fixed); int get_chain_mass_position_is_fixed(int mass_index); float get_length();
function diguyChainSimulation::get_settings |
Prototype:
Description:diguyChainSettings* get_settings();
This function returns the chain settings this chain simulation is using.Returns:
object of type diguyChainSettings; will never be NULLCallable From:
- C++
- Script
function diguyChainSimulation::update_settings |
Prototype:
Description:int update_settings(const char* settings);
This function sets the settings this chain simulation will use.Arguments:
Returns:
settings name of new settings to use
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::do_stabilization_time_runoff |
Prototype:
Description:int do_stabilization_time_runoff(float time_runoff);
This function runs the simulation forward the specified number of seconds, to let the chain settle into a stable configuration.
Note that the chain will appear to achieve the new configuration instantly.
Specifying a large amount of time can result in a frame rate hitch.Arguments:
Returns:
time_runoff how much time to run off, in seconds
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::set_is_frozen |
Prototype:
Description:void set_is_frozen(int is_frozen);
This function can 'freeze' or 'unfreeze' a chain.
If a chain is frozen, all chain masses will remain in their current positions and will not move until the chain is unfrozen.
A frozen chain requires no simulation time.Arguments:
Callable From:
is_frozen pass 1 to freeze the chain; 0 to unfreeze
- C++
- Script
function diguyChainSimulation::get_is_frozen |
Prototype:
Returns:int get_is_frozen();
1 if chain is frozen, 0 if notCallable From:
- C++
- Script
function diguyChainSimulation::set_chain_mass_connection_character |
Prototype:
Description:int set_chain_mass_connection_character(int chain_mass_index, const char* character_name, const char* link_name = NULL, float link_offset_x = 0.0f, float link_offset_y = 0.0f, float link_offset_z = 0.0f, float connection_smoothing_period = 0.1f);
This function connects a chain mass to a character, or disconnects a chain mass if the passed character_name is NULL.
As the character moves the chain mass will move with it, dragging adjacent masses along. This allows a firefighter to pick up one end of a hose and drag the hose to a new location, for example.
In each time-step of the scenario a new position for the specified chain mass will be computed based on the position of the character.
When the chain sim is created, and when the scenario is reset, one chain mass will be automatically connected to the chain's character. The index of the mass that will be connected is set by a call to diguyChainSettings::set_index_of_chain_mass_connected_to_character().
Chain masses can be connected to a specific link of the connection character by passing the link's name. If NULL is passed, the connection will be made to the character's "position" link. Note that a non-NULL link name must be used for the link offset arguments to have an effect.
The chain mass can gradually be shifted from its current position to the connection position using the connection_smoothing_period argument. Passing in 0.5, for example, will cause the link to shift to its new connection point within approximately 0.5 seconds, avoiding an abrupt and potentially ugly impulse to the simulation.Arguments:
Returns:
chain_mass_index index of chain mass character_name name of character to attach to; must not be NULL link_name name of link to attach to; can be NULL; if so, will attach to character's base position link_offset_x link attachment offset in X link_offset_y link attachment offset in Y link_offset_z link attachment offset in Z connection_smoothing_period how much time to take, in seconds, to gradually shift the chain mass to its new connection point
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::set_chain_mass_position |
Prototype:
Description:int set_chain_mass_position(int chain_mass_index, float mass_x, float mass_y, float mass_z, int fix_mass_position);
This function sets the position of one chain mass, and optionally fixes it there.
The passed position is always relative to the chain character's parent, if there is one.
If the fix_mass_position argument is 1, the chain mass will remain fixed in the new position, as if set_chain_mass_position_is_fixed(1) were called.Arguments:
Returns:
chain_mass_index index of chain mass; pass -1 to affect all chain masses mass_x position x mass_y position y mass_z position z fix_mass_position pass 1 to fix chain mass in place; 0 to leave it free to move
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::set_chain_mass_positions_along_path_shape |
Prototype:
Description:int set_chain_mass_positions_along_path_shape(diguyPathShape* path_shape, int stretch_to_fit = 1);
This function sets the positions of all chain masses to lie along the passed path shape.
If the stretch_to_fit argument is 1, chain masses will be spaced along the entire length of the path shape. If the path shape is longer than the nominal length of the chain, the chain will be stretched out. If the path shape is shorter, the chain will be compressed.Arguments:
Returns:
path_shape path shape for new chain mass positions stretch_to_fit pass 1 to stretch chain to take up entire length of path_shape; pass 0 to leave chain at its nominal length
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::set_chain_mass_position_is_fixed |
Prototype:
Description:int set_chain_mass_position_is_fixed(int chain_mass_index, int is_fixed);
This function can fix or unfix a chain mass in place. If it is fixed the chain mass will remain in its current position until it is unfixed.
Fixed chain masses do not require simulation time, so the more masses in a chain that are fixed, the lower the computational load of the chain simulation.Arguments:
Returns:
chain_mass_index index of chain mass; pass -1 to affect all chain masses is_fixed pass 1 to fix chain mass position; 0 to unfix it
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyChainSimulation::get_chain_mass_position_is_fixed |
Prototype:
Returns:int get_chain_mass_position_is_fixed(int mass_index);
1 if chain mass is fixed, 0 if notCallable From:
- C++
- Script
function diguyChainSimulation::get_length |
Prototype:
Returns:float get_length();
length of the chainCallable From:
- C++
- Script
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.