
This file was automatically generated from comments in the C/C++ header file diguySensorRegion.h. Do not edit this file directly; the changes will be lost. Please mail suggestions or corrections to diguy@bdi.com
Includes: diguy_constants.h | declspec_diguy.h
Link against: libdiguy
class diguySensorRegion
|
class BDI_DECLSPEC_diguy diguySensorRegion { public: const char* get_name(); const char* get_type_name(); int contains_point(float tx, float ty, float tz); int contains_character(const char* character_name); int contains_character_by_type_and_appearance(const char *type, const char *appearance); int contains_character_link(const char* character_name, const char* link_name, float offset_tx, float offset_ty, float offset_tz); diguyCharacterArray* get_characters_in_region(); int update_characters_in_region(); int update_candidate_characters_in_region(diguyCharacterArray* candidates); enum { CALLBACK_ID_CREATE = 1, CALLBACK_ID_DESTROY, CALLBACK_ID_DETONATION }; #ifdef CPLUSPLUS_ONLY int add_callback(int callback_id, diguySensorRegionCallback* callback, void* callback_params = 0, void* callback_user_data = 0); int remove_callback(int callback_id, diguySensorRegionCallback* callback); int remove_callback_with_user_data(int callback_id, void* callback_user_data); #endif 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 contains_character_by_name(const char* path_name); };
function diguySensorRegion::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the object. This pointer will never be NULL.Callable From:
Returns:
- C++
- Script
name of the object
function diguySensorRegion::get_type_name |
Prototype:
Description:const char* get_type_name();
Returns the type name of the object. This pointer will never be NULL.Callable From:
Returns:
- C++
- Script
type name of the object
function diguySensorRegion::contains_point |
Prototype:
Description:int contains_point(float tx, float ty, float tz);
This function is checks whether the passed x,y,z position is in the sensor region.Arguments:
Returns:
tx, ty, tz point to check
1 if the passed point is in the sensor region; 0 otherwise.
function diguySensorRegion::contains_character |
Prototype:
Description:int contains_character(const char* character_name);
This function checks to see whether the passed character is within this sensor region. The actual point that is checked is the point returned by diguySensorRegion::get_position().
Note that this point is typically by the character's feet, so it is possible for the upper half of a character to pass through a sensor region without this function detecting this.
To check the upper portion of a character, use contains_character_link() instead, and specify "cervical" or "back" as the link.Callable From:
Arguments:
- C++
- Script
- Decision Bead
Returns:
character character to check
1 if the passed character is in the sensor region; 0 otherwise.
function diguySensorRegion::contains_character_by_type_and_appearance |
Prototype:
Description:int contains_character_by_type_and_appearance(const char *type, const char *appearance);
This function checks to see whether a character with the specified type and appearance is within this sensor region. The actual point that is checked is the point returned by diguyCharacter::get_position().
Note that this point is typically by the character's feet, so it is possible for the upper half of a character to pass through a sensor region without this function detecting this.Callable From:
Arguments:
- C++
- Script
- Decision Bead
Returns:
character character to check
1 if the passed character is in the sensor region; 0 otherwise.
function diguySensorRegion::contains_character_link |
Prototype:
Description:int contains_character_link(const char* character_name, const char* link_name, float offset_tx, float offset_ty, float offset_tz);
This function is similar to contains_character(), but rather than checking whether the character's ideal position is in the sensor region, this function checks whether the specified link is in the sensor region.Arguments:
Returns:
character_name name of the character link_name name of the link offset_tx, offset_ty, offset_tz offset in link
1 if the passed character link is in the sensor region; 0 otherwise.
function diguySensorRegion::get_characters_in_region |
Prototype:
Description:diguyCharacterArray* get_characters_in_region();
This function returns the array of characters that were in this sensor region at the time of the last call to either update_characters_in_region() or update_candidate_characters_in_region().Callable From:
Returns:
- C++
- Script
array of characters
function diguySensorRegion::update_characters_in_region |
Prototype:
Description:int update_characters_in_region();
This function updates the sensor region's idea of which characters are within it. Candidate characters are all characters in the current scenario. The resulting list can be obtained by calling get_characters_in_region().Callable From:
Returns:
- C++
- Script
number of characters in sensor region
function diguySensorRegion::update_candidate_characters_in_region |
Prototype:
Description:int update_candidate_characters_in_region(diguyCharacterArray* candidates);
This function is like update_characters_in_region(), but the candidate characters are specifically specified.Callable From:
Arguments:
- C++
- Script
Returns:
candidates array of candidate characters
number of characters in sensor region
enumeration |
Description:enum { CALLBACK_ID_CREATE = 1, CALLBACK_ID_DESTROY, CALLBACK_ID_DETONATION };
This is an enumeration of the different callbacks that can be registered with add_callback() and add_callback_script().Usable From:
- C++
- Script
function diguySensorRegion::add_callback |
Prototype:
Description:int add_callback(int callback_id, diguySensorRegionCallback* callback, void* callback_params = 0, void* callback_user_data = 0);
This function adds a user callback. Callbacks can be removed with remove_callback() or remove_callback_with_user_data().Arguments:
callback pointer to function with prototype diguySensorRegionCallback (typedefed above) callback_id integer id of when this callback is to be called callback_params struct containing additional parameters needed by some callbacks; actual type depends on callback_id callback_user_data pointer 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 sensor region is created.
Note that this callback can only be added by calling diguyScenario::add_default_sensor_region_callback(); adding it with diguySensorRegion::add_callback() will have no effect, as by that time the sensor region has already been created.
callback_params is not used and should be NULL.CALLBACK_ID_DESTROY
This callback will be called when a sensor region is destroyed.
callback_params is not used and should be NULL.CALLBACK_ID_DETONATION
This callback will be called when a detonation occurs within the sensor region.
callback_params is not used and should be NULL.
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.Callable From:
Returns:
- C++
0 on success, -1 on failure
function diguySensorRegion::remove_callback |
Prototype:
Description:int remove_callback(int callback_id, diguySensorRegionCallback* callback);
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 diguySensorRegionCallback (typedefed above)
function diguySensorRegion::remove_callback_with_user_data |
Prototype:
Description:int remove_callback_with_user_data(int callback_id, void* callback_user_data);
This function removes a user callback. All callbacks matching the specified callback_id and callback_user_data function will be removed.Arguments:
callback_id integer id of when this callback is to be called callback_user_data pointer 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
Experimental Functions
|
The following functions are experimental and may change or disappear with no warning.
function diguySensorRegion::add_callback_script |
Prototype:
int add_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL);
function diguySensorRegion::remove_callback_script |
Prototype:
int remove_callback_script(int callback_id, const char* callback_script, const char* callback_script_type = NULL);
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 diguySensorRegion::contains_character_by_name |
Prototype:
Description:int contains_character_by_name(const char* path_name);
This function is deprecated. Use contains_character() instead.
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.