![]() |
C++ SDK Reference
12.5
|
Go to the source code of this file.
Functions | |
Functions | |
| int | diguy_hla_set_cfg_file (const char *cfg_file) |
| This function sets the filename of the VR-Link configuration file that will be read by the DI-Guy software. More... | |
| int | diguy_hla_initialize () |
| This function allows VR-Link to install some callbacks so that .dss file load and save will include VR-Link-specific info. More... | |
| int | diguy_hla_deinitialize () |
| This function allows DI-Guy networking to clean up. More... | |
| int | diguy_hla_go_online (diguyScenario *scenario, void *exconn=NULL) |
| This function tells DI-Guy that it should start talking over VR-Link. More... | |
| int | diguy_hla_update () |
| This function tells DI-Guy that it should read PDUs from the network and process them. More... | |
| int | diguy_hla_get_use_user_defined_coords () |
| This function returns whether DI-Guy is using user-defined latitude/longitude coordinates for the origin of the database, or the coordinates that come from graphics files for scenario scene objects. More... | |
| int | diguy_hla_go_offline () |
| This function tells DI-Guy that it should stop networking with VR-Link. More... | |
| int | diguy_hla_get_online () |
| This function queries whether DI-Guy is talking over VR-Link. More... | |
| int | diguy_hla_get_exercise () |
| Returns: the exercise id being used by DI-Guy Networking. More... | |
| int | diguy_hla_get_host () |
| Returns: the host id being used by DI-Guy Networking. More... | |
| int | diguy_hla_get_site () |
| Returns: the site id being used by DI-Guy Networking. More... | |
| int | diguy_hla_get_port () |
| the port number being used for DI-Guy Networking More... | |
| int | diguy_hla_get_lat_lon (double *lat, double *lon) |
| Gets the latitude and longitude currently being used by DI-Guy networking for the placement of the database origin. More... | |
| int | diguy_hla_get_utm (int *zone, int *southzone, double *easting, double *northing) |
| Gets, in UTM coordinates, the location currently being used by DI-Guy Networking for the placement of the database origin. More... | |
| int | diguy_hla_set_utm (int zone, int southzone, double easting, double northing) |
| Sets, in UTM coordinates, the location currently being used by DI-Guy Networking for the placement of the database origin. More... | |
| int | diguy_hla_set_utm_zone (int zone, int southzone) |
| Sets the UTM zone of the location currently being used by DI-Guy Networking for the placement of the database origin. More... | |
| double | diguy_parse_dms_to_radians (const char *dmsstring) |
| Parses a string of the form. More... | |
| void | diguy_format_lat_or_lon (char *outbuf, double value, bool is_lat, bool is_decimal, bool value_is_degrees) |
| Returns a string of the form. More... | |
| int | diguy_hla_get_ipaddr (char **ipaddr) |
| Gets the IP address currently being used by DI-Guy networking. More... | |
| int | diguy_hla_get_publish_local_chars () |
| Returns whether DI-Guy Networking will publish local characters when online. More... | |
| int | diguy_hla_get_display_remote_chars () |
| Returns whether DI-Guy Networking will display remote characters when online. More... | |
| int | diguy_hla_set_exercise (int exercise) |
| Sets the exercise id to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_host (int host) |
| Sets the host id to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_site (int site) |
| Sets the site id to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_port (int port) |
| Sets the network port number to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_lat_lon (double lat, double lon) |
| Sets the latitude and longitude to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_ipaddr (const char *ipaddr) |
| Sets the IP address to be used by DI-Guy Networking. More... | |
| int | diguy_hla_set_display_remote_chars (int display) |
| Sets whether DI-Guy Networking will display remote characters. More... | |
| int | diguy_hla_set_publish_local_chars (int publish) |
| Sets whether DI-Guy Networking will publish local characters to the network. More... | |
| int | diguy_hla_get_position_offset (float *z, float *yaw, float *roll, float *pitch) |
| This function gets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected. More... | |
| int | diguy_hla_set_position_offset (float z, float yaw, float roll, float pitch) |
| This function sets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected. More... | |
| int | diguy_hla_get_sync_mode_enabled () |
| Gets whether sync mode is enabled when online. More... | |
| int | diguy_hla_get_sync_mode_master () |
| Gets whether this machine will serve as sync master when online and in sync mode. More... | |
| int | diguy_hla_get_sync_mode_slave_cam () |
| Gets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master. More... | |
| int | diguy_hla_set_use_database_coords (int use_database_coords) |
| Sets whether networking should use database coordinates or not. More... | |
| int | diguy_hla_set_use_user_defined_coords (int x) |
| Sets whether networking should use user-defined coordinates or not. More... | |
| int | diguy_hla_set_sync_mode_enabled (int enabled) |
| Sets whether sync mode is enabled when online. More... | |
| int | diguy_hla_set_sync_mode_master (int master) |
| Sets whether this machine will serve as sync master when online and in sync mode. More... | |
| int | diguy_hla_set_sync_mode_slave_cam (int sl_cam) |
| Sets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master. More... | |
| int | diguy_hla_set_sync_mode_camera_offset (float offset_r, float offset_y, float offset_p) |
| This function sets the camera orientation offset to be used in sync_mode (when VR-Link is online). More... | |
| int | diguy_hla_get_sync_mode_camera_offset (float *offset_r, float *offset_y, float *offset_p) |
| This function gets the camera orientation offset to be used in sync_mode (when VR-Link is online). More... | |
| int | diguy_hla_set_sync_mode_camera_slaved (int slaved) |
| This function sets whether the camera will be slaved when VR-Link is online, in sync mode, and not sync master. More... | |
| int | diguy_hla_get_sync_mode_camera_slaved () |
| This function gets whether the camera is currently slaved. More... | |
| void * | diguy_hla_get_next_participant_name (char *buf, void *handle) |
| This function allows iteration through the list of names remote VR-Link hosts that DI-Guy knows about. More... | |
| int | diguy_hla_set_camera_details_out_of_date () |
| Lets VR-Link know that the user has moved the camera, so that if it is in sync mode, and is the sync master, it can let other hosts know the new camera position so they can move their cameras. More... | |
| int | diguy_hla_get_model_from_septet (const char **chartype, const char **appearance, const int septet[7]) |
| Fetches what character type and what appearance should be used for a given DIS entity type septet. More... | |
| int | diguy_hla_get_septet_from_model (int septet[7], const char *chartype, const char *appearance) |
| Fetches what DIS entity type septet should be used for a given character type and appearance. More... | |
| int | diguy_hla_get_earth_coord (char *outbuf, const float x, const float y, const float z) |
| Converts a 3d database-origin-relative location into a string describing it in earth coordinates. More... | |
| void | diguy_hla_toggle_earth_coord_format () |
| Changes the format of the output of diguy_hla_get_earth_coord. More... | |
| diguyCharacter * | diguy_hla_get_character_from_id (char const *id) |
| returns the diguyCharacter associated with the entity id specified. More... | |
| void | diguy_hla_enter_vpnet_mode () |
| Turns the 'never create' character bit on. More... | |
| char * | diguy_hla_get_name_from_entity (void *reflected_entity) |
| This function returns the name corresponding to the passed entity. More... | |
| void | diguy_hla_establish_new_offsets (int deprecated=0) |
| void | diguy_hla_set_send_custom_pdus (int val) |
| int | diguy_hla_get_send_custom_pdus () |
| int diguy_hla_set_cfg_file | ( | const char * | cfg_file | ) |
This function sets the filename of the VR-Link configuration file that will be read by the DI-Guy software.
The default is "network.cfg". This function must be called before diguy_hla_initialize().
| cfg_file | filename of desired configuration file |
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_initialize | ( | ) |
This function allows VR-Link to install some callbacks so that .dss file load and save will include VR-Link-specific info.
It should be called BEFORE the scenario object is constructed.
Returns:
0 on success, -1 on failure
Example:
Callable From:
| int diguy_hla_deinitialize | ( | ) |
This function allows DI-Guy networking to clean up.
It should be called once, on application shutdown, after the scenario object has been destroyed.
Returns:
0 on success, -1 on failure
Example:
Callable From:
| int diguy_hla_go_online | ( | diguyScenario * | scenario, |
| void * | exconn = NULL |
||
| ) |
This function tells DI-Guy that it should start talking over VR-Link.
It should be called when DI-Guy should join an exercise.
| scenario | pointer to the diguyScenario which will be connected to the network |
| exconn | optional pointer to an existing VR-Link exercise connection to use |
Returns:
0 on success, -1 on failure
Example:
Callable From:
| int diguy_hla_update | ( | ) |
This function tells DI-Guy that it should read PDUs from the network and process them.
Call this function periodically.
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_get_use_user_defined_coords | ( | ) |
This function returns whether DI-Guy is using user-defined latitude/longitude coordinates for the origin of the database, or the coordinates that come from graphics files for scenario scene objects.
Returns:
0 if graphics file coordinates are used; 1 if user-defined coordinates are used
Callable From:
| int diguy_hla_go_offline | ( | ) |
This function tells DI-Guy that it should stop networking with VR-Link.
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_get_online | ( | ) |
This function queries whether DI-Guy is talking over VR-Link.
Returns:
1 if yes, 0 if no
Callable From:
| int diguy_hla_get_exercise | ( | ) |
Returns: the exercise id being used by DI-Guy Networking.
Callable From:
| int diguy_hla_get_host | ( | ) |
Returns: the host id being used by DI-Guy Networking.
Callable From:
| int diguy_hla_get_site | ( | ) |
Returns: the site id being used by DI-Guy Networking.
Callable From:
| int diguy_hla_get_port | ( | ) |
the port number being used for DI-Guy Networking
Callable From:
| int diguy_hla_get_lat_lon | ( | double * | lat, |
| double * | lon | ||
| ) |
Gets the latitude and longitude currently being used by DI-Guy networking for the placement of the database origin.
| lat | latitude of origin, returned; see below |
| lon | longitude of origin, returned; see below |
lat and lon are char**'s, into which char*'s will be placed. These char*'s point to static data owned by DI-Guy. Do not store these pointers, and do not modify what they point to. Copy the strings needed out of the static buffers. (Assignment of a char* to a Microsoft CString will work very nicely, for example.)
lat and lon are expressed as strings of the form:
[-]d [N|W|S|E] or [-]d m [N|W|S|E] or [-]d m s [N|W|S|E]
N and E are taken as positive. S and W will negate the value otherwise computed. d m and s are positive, floating point values, taken as degrees, minutes, and seconds, respectively. A leading minus sign will negate the entire value otherwise computed (so, e.g., a '-' and a 'S' will result in a double-negation).
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_get_utm | ( | int * | zone, |
| int * | southzone, | ||
| double * | easting, | ||
| double * | northing | ||
| ) |
Gets, in UTM coordinates, the location currently being used by DI-Guy Networking for the placement of the database origin.
| zone | the UTM zone, returned |
| southzone | return value; 1 if the origin is in the southern hemisphere, else 0 |
| easting | return value; normalized (positive only) easting of the database origin within the zone |
| northing | return value; normalized (positive only) northing of the database origin within the zone, returned |
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_set_utm | ( | int | zone, |
| int | southzone, | ||
| double | easting, | ||
| double | northing | ||
| ) |
Sets, in UTM coordinates, the location currently being used by DI-Guy Networking for the placement of the database origin.
| zone | the UTM zone |
| southzone | 1 if the origin is in the southern hemisphere, else 0 |
| easting | the normalized (positive only) easting of the database origin within the zone |
| northing | the normalized (positive only) northing of the database origin within the zone |
Returns:
0 on success, -1 on failure
Callable From:
| int diguy_hla_set_utm_zone | ( | int | zone, |
| int | southzone | ||
| ) |
Sets the UTM zone of the location currently being used by DI-Guy Networking for the placement of the database origin.
The easting and northing are assumed not to change.
| zone | the utm zone |
| southzone | 1 if the origin is in the southern hemisphere, else 0 |
Returns:
0 if successful
Callable From:
| double diguy_parse_dms_to_radians | ( | const char * | dmsstring | ) |
Parses a string of the form.
[-]d [N|W|S|E] or [-]d m [N|W|S|E] or [-]d m s [N|W|S|E]
N and E are taken as positive. S and W will negate the value otherwise computed. d m and s are positive, floating point values, taken as degrees, minutes, and seconds, respectively. A leading minus sign will negate the entire value otherwise computed (so, e.g., a '-' and a 'S' will result in a double-negation).
| dmsstring | a string of the format described above |
Returns:
a double precision floating point value in radians
Callable From:
| void diguy_format_lat_or_lon | ( | char * | outbuf, |
| double | value, | ||
| bool | is_lat, | ||
| bool | is_decimal, | ||
| bool | value_is_degrees | ||
| ) |
Returns a string of the form.
d [N|W|S|E] or d m s [N|W|S|E]
N and E are used for positive angles. S and W are used for negative angles. In the d m s format, d and m are integers (degrees and minutes) and s (seconds) is a floating point value. In the d format, d (degrees) is a floating point value.
| outbuf | a buffer into which to copy the resulting string |
| value | the lat or lon value to be converted into a string |
| is_lat | boolean indicating latitude (North/South) rather than longitude (East/West) |
| is_decimal | boolean indicating that decimal degrees are desired, rather than degrees, minutes, and seconds |
| value_is_degrees | boolean indicating whether the input value is in degrees (as opposed to radians) |
Callable From:
| int diguy_hla_get_ipaddr | ( | char ** | ipaddr | ) |
Gets the IP address currently being used by DI-Guy networking.
This address is the address to which messages are sent. Normally, it is some kind of broadcast or multicast address.
| ipaddr | IP address, returned; see below |
ipaddr is a char**, into which a char* will be placed. This char* points to static data owned by DI-Guy. Do not store this pointer, and do not modify what it points to. Copy the strings you need out of the static buffer. (Assignment of a char* to a Microsoft CString will work very nicely, for example.)
ipaddr is a string containing 4 integers separated by periods.
Returns:
0 if successful
Callable From:
| int diguy_hla_get_publish_local_chars | ( | ) |
Returns whether DI-Guy Networking will publish local characters when online.
C++, Script
none
Returns:
1 if enabled, 0 if not
| int diguy_hla_get_display_remote_chars | ( | ) |
Returns whether DI-Guy Networking will display remote characters when online.
C++, Script
none
Returns:
1 if enabled, 0 if not
| int diguy_hla_set_exercise | ( | int | exercise | ) |
Sets the exercise id to be used by DI-Guy Networking.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| exercise | the exercise id to use |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_host | ( | int | host | ) |
Sets the host id to be used by DI-Guy Networking.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| host | the host id to use; the host id identifies the local machine |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_site | ( | int | site | ) |
Sets the site id to be used by DI-Guy Networking.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| site | the site id to use; the site id identifies where the local machine is |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_port | ( | int | port | ) |
Sets the network port number to be used by DI-Guy Networking.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| port | the port number to use |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_lat_lon | ( | double | lat, |
| double | lon | ||
| ) |
Sets the latitude and longitude to be used by DI-Guy Networking.
The latitude and longitude are taken as the location, on Earth, of the origin of the database.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| lat | the latitude in radians, positive north |
| lon | the longitude in radians, positive east |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_ipaddr | ( | const char * | ipaddr | ) |
Sets the IP address to be used by DI-Guy Networking.
This address is the address to which messages are sent. Normally, it is a broadcast or multicast address.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| ipaddr | the IP address |
ipaddr is a string containing 4 integers separated by periods, or the null string, which means "let DI-Guy choose the address". An address of "0" or "0.0.0.0" means broadcast.
Returns:
0 on success, -1 on failure
| int diguy_hla_set_display_remote_chars | ( | int | display | ) |
Sets whether DI-Guy Networking will display remote characters.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| display | pass 1 if DI-Guy Networking should display remote characters, 0 if not |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_publish_local_chars | ( | int | publish | ) |
Sets whether DI-Guy Networking will publish local characters to the network.
This function WILL succeed even if DI-Guy is on-line (is participating in an exercise).
C++, Script
| publish | pass 1 if DI-Guy Networking should publish local characters to the network, 0 if not |
Returns:
0 on success, -1 on failure
| int diguy_hla_get_position_offset | ( | float * | z, |
| float * | yaw, | ||
| float * | roll, | ||
| float * | pitch | ||
| ) |
This function gets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected.
The offset is useful to compensate for inter-application database location and orientation error.
| z | z offset in meters |
| yaw | orientation offset in degrees |
| roll | orientation offset in degrees |
| pitch | orientation offset in degrees |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_position_offset | ( | float | z, |
| float | yaw, | ||
| float | roll, | ||
| float | pitch | ||
| ) |
This function sets the position offset which is currently added to each character when it is published, and subtracted from each character when it is reflected.
This is useful to compensate for inter-application location error.
THIS FUNCTION DOES NOTHING if called while VR-Link is online.
| z | z offset in meters |
| yaw | orientation offset in degrees |
| roll | orientation offset in degrees |
| pitch | orientation offset in degrees |
Returns:
0 on success, -1 on failure
| int diguy_hla_get_sync_mode_enabled | ( | ) |
Gets whether sync mode is enabled when online.
C++, Script
none
Returns:
1 if sync mode is enabled when online, 0 if not
| int diguy_hla_get_sync_mode_master | ( | ) |
Gets whether this machine will serve as sync master when online and in sync mode.
C++, Script
none
Returns:
1 if this machine will serve as sync master when online and in sync mode, 0 if not
| int diguy_hla_get_sync_mode_slave_cam | ( | ) |
Gets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master.
C++, Script
none
Returns:
1 if this machine's camera will be slaved to a remote master when online and in sync mode and not sync master, 0 if not
| int diguy_hla_set_use_database_coords | ( | int | use_database_coords | ) |
Sets whether networking should use database coordinates or not.
If database coordinates are used, the database origin is placed at the center of the earth. This makes coordinate conversion to and from UTM unnecessary. Using database coordinates renders ineffective any UTM-related settings which would position the database.
C++, Script
| use_database_coords | 1 if database coordinates should be used, else 0 |
Returns:
0 if successful, -1 on failure
| int diguy_hla_set_use_user_defined_coords | ( | int | x | ) |
Sets whether networking should use user-defined coordinates or not.
If user-defined coordinates are not used, the database origin is placed at the earth location specified in the graphics files for the database.
C++, Script
| x | pass 1 if user-defined coordinates should be used, else 0 |
Returns:
1 if this machine's camera will be slaved to a remote master when online and in sync mode and not sync master; 0 if not
| int diguy_hla_set_sync_mode_enabled | ( | int | enabled | ) |
Sets whether sync mode is enabled when online.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
| enabled | pass 1 if sync mode should be enabled when online, 0 if not |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_sync_mode_master | ( | int | master | ) |
Sets whether this machine will serve as sync master when online and in sync mode.
C++, Script
| master | pass 1 if this machine will serve as sync master when online and in sync mode, 0 if not |
Returns:
0 on success, -1 on failure
| int diguy_hla_set_sync_mode_slave_cam | ( | int | sl_cam | ) |
Sets whether this machine's camera will be slaved to a remote master when online and in sync mode and not sync master.
The function will fail if DI-Guy is on-line (is participating in an exercise).
C++, Script
sl_cam - pass 1 if this machine's camera will be slaved to a remote master when online and in sync mode and not sync master, 0 if not
Returns:
0 on success, -1 on failure
| int diguy_hla_set_sync_mode_camera_offset | ( | float | offset_r, |
| float | offset_y, | ||
| float | offset_p | ||
| ) |
This function sets the camera orientation offset to be used in sync_mode (when VR-Link is online).
| offset_r | orientation offset |
| offset_y | orientation offset |
| offset_p | orientation offset |
yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.
A typical two screen arrangement would use yaws of 50 and -50 for the left screen, and right screen, respectively. For three screens, the yaws would be -100, 0, and 100.
Using percentages this way makes the screens contiguous even if the camera's field of view changes.
THIS FUNCTION DOES NOTHING (and returns -1) if called while VR-Link is online
Returns:
0 on success, -1 on failure (VR-Link is online).
| int diguy_hla_get_sync_mode_camera_offset | ( | float * | offset_r, |
| float * | offset_y, | ||
| float * | offset_p | ||
| ) |
This function gets the camera orientation offset to be used in sync_mode (when VR-Link is online).
| offset_r | orientation offset |
| offset_y | orientation offset |
| offset_p | orientation offset |
yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.
In the orientation offset the yaw and pitch represent PERCENTAGES of the camera's horizontal and vertical field of view, respectively. The ROLL (which is in degrees) is applied first, then the yaw, then the pitch.
A typical two screen arrangement would use yaws of 50 and -50 for the left screen, and right screen, respectively. For three screens, the yaws would be 100, 0, and -100 going from left to right.
Using percentages this way makes the screens contiguous even if the camera's field of view changes.
Returns:
0 on success, -1 on failure
| int diguy_hla_set_sync_mode_camera_slaved | ( | int | slaved | ) |
This function sets whether the camera will be slaved when VR-Link is online, in sync mode, and not sync master.
It can be set even when VR-Link is online.
| slaved | whether the camera will be slaved when VR-Link is online, in sync mode, and not sync master. |
Returns:
0 on success, -1 on failure
| int diguy_hla_get_sync_mode_camera_slaved | ( | ) |
This function gets whether the camera is currently slaved.
It does NOT simply return what was passed to diguy_hla_set_sync_mode_camera_slaved().
Returns:
Whether the camera is currently slaved. This will be 1 only if VR-link is online, is in sync mode, and is not the sync master, and if sync_mode_camera_slaved has been set to 1.
| void* diguy_hla_get_next_participant_name | ( | char * | buf, |
| void * | handle | ||
| ) |
This function allows iteration through the list of names remote VR-Link hosts that DI-Guy knows about.
| buf | destination buffer for host name (64 bytes is plenty) |
| handle | return value from last call to the function; pass NULL to get the first host name; pass previous return value to get the next host name |
Returns:
void* to be passed as handle argument on the next call. NULL when end of list is reached.
| int diguy_hla_set_camera_details_out_of_date | ( | ) |
Lets VR-Link know that the user has moved the camera, so that if it is in sync mode, and is the sync master, it can let other hosts know the new camera position so they can move their cameras.
Returns:
0 on success, -1 on failure
| int diguy_hla_get_model_from_septet | ( | const char ** | chartype, |
| const char ** | appearance, | ||
| const int | septet[7] | ||
| ) |
Fetches what character type and what appearance should be used for a given DIS entity type septet.
| chartype | address of char*, for returning a string which names |
| the | DI Guy character type |
| appearance | address of char*, for returning a string which names |
| the | DI Guy character appearance |
| septet | array of seven integers specifying the kind, domain, country, category, subCategory, specific, and extra of the entity in question |
Returns:
0 on success, -1 on failure
| int diguy_hla_get_septet_from_model | ( | int | septet[7], |
| const char * | chartype, | ||
| const char * | appearance | ||
| ) |
Fetches what DIS entity type septet should be used for a given character type and appearance.
| chartype | a string which names the DI-Guy character type |
| appearance | a string which names the DI-Guy character appearance |
| septet | array of seven integers, returned, indicating the kind, domain, country, category, subCategory, specific, and extra of the entity in question |
Returns:
0 on success, -1 on failure
| int diguy_hla_get_earth_coord | ( | char * | outbuf, |
| const float | x, | ||
| const float | y, | ||
| const float | z | ||
| ) |
Converts a 3d database-origin-relative location into a string describing it in earth coordinates.
This string could be in a number of different formats including decimal lat/lon, dms lat/lon, and UTM.
| outbuf | buffer into which to put the output string |
| x,y,z | 3 floats specifying location |
Returns:
0 on success, -1 on failure. Fails if DI-Guy Scenario is not currently on the network, meaning that a database-to-earth coordinate conversion cannot be performed.
| void diguy_hla_toggle_earth_coord_format | ( | ) |
Changes the format of the output of diguy_hla_get_earth_coord.
Toggles between UTM, dms lat/lon, decimal lat/lon, and "punting", meaning that the caller of diguy_hla_get_earth_coord should fend for itself. This generally means that the caller will use database-origin-relative coordinates.
none
Returns:
void
| diguyCharacter* diguy_hla_get_character_from_id | ( | char const * | id | ) |
returns the diguyCharacter associated with the entity id specified.
| id | entity id |
Under DIS, two formats are permitted: the HLA object name, or the DIS entity identifier ("site:application:entity", where each is an integer).
Under DIS, only the DIS Entity Identifier is permitted.
| void diguy_hla_enter_vpnet_mode | ( | ) |
Turns the 'never create' character bit on.
| char* diguy_hla_get_name_from_entity | ( | void * | reflected_entity | ) |
This function returns the name corresponding to the passed entity.
The user must not delete the returned string.
| reflected_entity | entity to be named |
Returns:
entity name
| void diguy_hla_establish_new_offsets | ( | int | deprecated = 0 | ) |
| void diguy_hla_set_send_custom_pdus | ( | int | val | ) |
| int diguy_hla_get_send_custom_pdus | ( | ) |