DI-Guy API, Main Header File

Generated from diguy_api.h

DI-Guy API Version 12.5.1

This file was automatically generated from diguy_api.h. Do not edit this file directly; the changes will be lost.
Includes: diguy_constants.h | declspec_diguy.h

Contents:

Alphabetical Index

The API is subject to change in future releases.

Link against: libdiguy

Initialization Functions

function diguy_set_cfg_file

Prototype:

int diguy_set_cfg_file(const char* cfg_file);
Description:

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:

Arguments:

cfg_filefilename of desired configuration file
Returns:

0 on success, -1 on failure

C++ Example:

#include <diguy_graphics_ogl.h>

    diguy_set_cfg_file("custom.cfg");
    diguy_ogl_initialize(NULL);

function diguy_set_diguy_base_dir_path

Prototype:

int diguy_set_diguy_base_dir_path(const char* directory_name);
Description:

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:

Arguments:

directory_nameoverride directory in which to search for DI-Guy files
Returns:

0 on success, -1 on failure

C++ Example:

#include <diguy_graphics_ogl.h>

    diguy_set_diguy_base_dir_path("c:/DI-Guy_alternate_directory");
    diguy_ogl_initialize(NULL);

function diguy_deinitialize

Prototype:

int diguy_deinitialize();
Description:

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:

    diguy_deinitialize();
Scenario Creation Functions

function diguy_get_app

Prototype:

diguyApp* diguy_get_app();
Description:

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:

diguyApp* app = diguy_get_app();

function diguy_create_scenario

Prototype:

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:

    diguyScenario* sc = diguy_create_scenario();
    if (sc)
    {
        sc->load("my_scenario.dss");
    }

function diguy_destroy_scenario

Prototype:

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:

    diguyScenario* sc = diguy_create_scenario();
    // ...
    diguy_destroy_scenario(sc);
Utility Functions

function diguy_convert_euler_angle_order

Prototype:

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);
Description:

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

function diguy_convert_euler_angles_to_quaternion

Prototype:

int diguy_convert_euler_angles_to_quaternion(const float* euler_angle_ptr,
    float* quat_ptr);
Description:

This utility function converts a DI-Guy ZXY Euler angle triple into a quaternion.

Callable From:

Returns:

0 on success, -1 on failure

function diguy_extract_translation_and_euler_angles_from_matrix

Prototype:

int diguy_extract_translation_and_euler_angles_from_matrix(float mat[4][4],
    float* translation,
    float* euler_angles,
    diguyEulerAngleOrder euler_angle_order);
Description:

To be written.

Callable From:

Returns:

0 on success, -1 on failure

function diguy_create_matrix_from_translation_and_euler_angles

Prototype:

int diguy_create_matrix_from_translation_and_euler_angles(float mat[4][4],
    float translation[3],
    float euler_angles[3],
    diguyEulerAngleOrder euler_angle_order);
Description:

To be written.

Callable From:

Returns:

0 on success, -1 on failure


Alphabetical Index




Copyright (C) 1992-2012 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/78 Fourth Avenue/Waltham MA 02451.