![]() |
DI-Guy SDK Documentation
13.2
|
Go to the source code of this file.
Macros | |
| #define | CPLUSPLUS_ONLY |
Functions | |
Initialization Functions | |
| int | diguy_set_cfg_file (const char *cfg_file) |
| This function sets the filename of the top-level configuration file that will be read by the DI-Guy software. More... | |
| int | diguy_set_diguy_base_dir_path (const char *directory_name) |
| This function sets the base directory in which to search for DI-Guy files. More... | |
| int | diguy_deinitialize () |
| This function shuts down the DI-Guy software, removing all characters and cleaning up memory allocated by the library. More... | |
Scenario Creation Functions | |
| diguyApp * | diguy_get_app () |
| This function returns a pointer to the DI-Guy application object. More... | |
| diguyScenario * | diguy_create_scenario () |
| Description: More... | |
| int | diguy_destroy_scenario (diguyScenario *scenario) |
| Description: More... | |
Utility Functions | |
| int | diguy_convert_euler_angle_order (float src_rx, float src_ry, float src_rz, diguyEulerAngleOrder src_order, float *dest_rx, float *dest_ry, float *dest_rz, diguyEulerAngleOrder dest_order) |
| This utility function changes the order of Euler angle triples. More... | |
| int | diguy_convert_euler_angles_to_quaternion (const float *euler_angle_ptr, float *quat_ptr) |
| This utility function converts a DI-Guy ZXY Euler angle triple into a quaternion. More... | |
| int | diguy_extract_translation_and_euler_angles_from_matrix (float mat[4][4], float *translation, float *euler_angles, diguyEulerAngleOrder euler_angle_order) |
| To be written. More... | |
| int | diguy_create_matrix_from_translation_and_euler_angles (float mat[4][4], float translation[3], float euler_angles[3], diguyEulerAngleOrder euler_angle_order) |
| To be written. More... | |
Variables | |
| LALALALALA | |
| #define CPLUSPLUS_ONLY |
| int diguy_set_cfg_file | ( | const char * | cfg_file | ) |
This function sets the filename of the top-level configuration file that will be read by the DI-Guy software.
The default is "diguy.cfg".
This function must be called before diguy_initialize_[platform]().
It should rarely be necessary to use this function.
Callable From:
| cfg_file | filename of desired configuration file |
Returns:
0 on success, -1 on failure
C++ Example:
| int diguy_set_diguy_base_dir_path | ( | const char * | directory_name | ) |
This function sets the base directory in which to search for DI-Guy files.
This function must be called before diguy_initialize_[platform]().
It should rarely be necessary to use this function. In typical use, this directory will be read from the DIGUY environment variable.
Calling this function will override the directory specified in the DIGUY environment variable.
The base directory can be retrieved by using the function diguyApp::get_diguy_base_dir_path().
Callable From:
| directory_name | override directory in which to search for DI-Guy files |
Returns:
0 on success, -1 on failure
C++ Example:
| int diguy_deinitialize | ( | ) |
This function shuts down the DI-Guy software, removing all characters and cleaning up memory allocated by the library.
No objects created by the DI-Guy software should be referenced after this call is made.
This function should only be called once per program execution. Do not try to re-initialize the DI-Guy software after calling this function.
Callable From:
Returns:
0 on success, -1 on failure
C++ Example:
| diguyApp* diguy_get_app | ( | ) |
This function returns a pointer to the DI-Guy application object.
Only one application object exists per DI-Guy run. The application object is created during DI-Guy initialize calls; e.g. diguy_ogl_initialize().
Returns:
a pointer of type diguyApp
Callable From:
C++ Example:
| diguyScenario* diguy_create_scenario | ( | ) |
Description:
This function allocates and returns an empty object of type diguyScenario. This is the top-level "container" of most DI-Guy types, and includes objects of type diguyCharacter, diguyViewCamera, diguySceneObject, and diguySignal.
Callable From:
Returns:
Pointer to object of type diguyScenario if successful; NULL if not.
C++ Example:
| int diguy_destroy_scenario | ( | diguyScenario * | scenario | ) |
Description:
This function destroys an object of type diguyScenario allocated by diguy_create_scenario().
Callable From:
Returns:
0 on success, -1 on failure
C++ Example:
| int diguy_convert_euler_angle_order | ( | float | src_rx, |
| float | src_ry, | ||
| float | src_rz, | ||
| diguyEulerAngleOrder | src_order, | ||
| float * | dest_rx, | ||
| float * | dest_ry, | ||
| float * | dest_rz, | ||
| diguyEulerAngleOrder | dest_order | ||
| ) |
This utility function changes the order of Euler angle triples.
DI-Guy uses the order ZXY for all 3D rotations.
Callable From:
Returns:
0 on success, -1 on failure
| int diguy_convert_euler_angles_to_quaternion | ( | const float * | euler_angle_ptr, |
| float * | quat_ptr | ||
| ) |
This utility function converts a DI-Guy ZXY Euler angle triple into a quaternion.
Callable From:
Returns:
0 on success, -1 on failure
| int diguy_extract_translation_and_euler_angles_from_matrix | ( | float | mat[4][4], |
| float * | translation, | ||
| float * | euler_angles, | ||
| diguyEulerAngleOrder | euler_angle_order | ||
| ) |
To be written.
Callable From:
Returns:
0 on success, -1 on failure
| int diguy_create_matrix_from_translation_and_euler_angles | ( | float | mat[4][4], |
| float | translation[3], | ||
| float | euler_angles[3], | ||
| diguyEulerAngleOrder | euler_angle_order | ||
| ) |
To be written.
Callable From:
Returns:
0 on success, -1 on failure
| LALALALALA |