diguyIGuyController

Generated from diguyIGuyController.h

DI-Guy API Version 12.5.1

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

Contents:

Alphabetical Index

class diguyIGuyController

class BDI_DECLSPEC_diguy diguyIGuyController
{
public:
    void set_iguy_character(const char* name,
        diguyMotionPosture initial_posture = DIGUY_MOTION_POSTURE_ANY,
        diguyMotionVariant initial_variant = DIGUY_MOTION_VARIANT_ANY);
    diguyCharacter* get_iguy_character();
    diguyCharacter* get_interaction_subject();
    void set_camera_change_enabled(int enabled);
    int get_camera_change_enabled();
    void set_camera_use_1st_person_flag(int flag);
    int get_camera_use_1st_person_flag();
    void set_camera_attachment_link(const char* attachment_link);
    const char* get_camera_attachment_link();
    void set_camera_3rd_person_look_from_offset(float x, float y, float z);
    void get_camera_3rd_person_look_from_offset(float* x, float* y, float* z);
    void set_camera_3rd_person_look_at_offset(float x, float y, float z);
    void get_camera_3rd_person_look_at_offset(float* x, float* y, float* z);
    void set_mouse_input_enabled(int enabled);
    int get_mouse_input_enabled();
    void set_input_capture_enabled(int enabled);
    int get_input_capture_enabled();
    void set_keyboard_input_enabled(int enabled);
    int get_keyboard_input_enabled();
    void set_joystick_input_enabled(int enabled);
    int get_joystick_input_enabled();
    void set_posture_change_enabled(int enabled);
    int get_posture_change_enabled();
    void set_posture(diguyMotionPosture posture);
    diguyMotionPosture get_posture();
    void set_variant_change_enabled(int enabled);
    int get_variant_change_enabled();
    void set_variant(diguyMotionVariant variant);
    diguyMotionVariant get_variant();
    void set_gaze_change_enabled(int enabled);
    int get_gaze_change_enabled();
    void set_orientation_change_enabled(int enabled);
    int get_orientation_change_enabled();
    void set_position_change_enabled(int enabled);
    int get_position_change_enabled();
    void set_use_force_action_flag(int use_force_action_flag);
    int get_use_force_action_flag();
    void set_skip_transitions_flag(int skip_transitions_flag);
    int get_skip_transitions_flag();
    void set_always_run_flag(int always_run_flag);
    int get_always_run_flag();
    float get_face_rz();
    float get_face_ry();
    void set_face_rz_desired(float face_rz_desired);
    float get_face_rz_desired();
    void set_face_ry_desired(float face_ry_desired);
    float get_face_ry_desired();
    void face_character(const char* character_name,
        const char* link,
        float offset_rz = 0.0f,
        float offset_ry = 0.0f);
    void set_mouse_look_changes_orientation(int val);
    int get_mouse_look_changes_orientation();
Character Functions

function diguyIGuyController::set_iguy_character

Prototype:

void set_iguy_character(const char* name,
    diguyMotionPosture initial_posture = DIGUY_MOTION_POSTURE_ANY,
    diguyMotionVariant initial_variant = DIGUY_MOTION_VARIANT_ANY);
Description:

This function sets the interactive character (I-Guy).

The I-Guy character's actions, position, and orientation can be 'driven' by input from the mouse, keyboard, or a joystick.

There can be at most one I-Guy at a time.

Arguments:

name name of character to become I-Guy
initial_posturethis argument is not currently used, but will be implemented in a future version of DI-Guy
initial_variantthe initial motion variant the I-Guy character should assume
Passing DIGUY_MOTION_VARIANT_ANY as the initial variant will cause DI-Guy to select a default initial variant. Passing DIGUY_MOTION_VARIANT_NORMAL will cause the character to start in a non-aiming action. Passing DIGUY_MOTION_VARIANT_AIM will cause the character to start in an aiming action, if available. Other variants will be supported in a future version.

Callable From:

function diguyIGuyController::get_iguy_character

Prototype:

diguyCharacter* get_iguy_character();
Returns:

pointer of type diguyCharacter* to the current I-Guy character

Callable From:

Interaction Functions

function diguyIGuyController::get_interaction_subject

Prototype:

diguyCharacter* get_interaction_subject();
Description:

This function returns the character clicked on when in I-Guy Input Mode. The pointer is valid during CALLBACK_ID_IGUY_INTERACT_WITH_SUBJECT callbacks.

Returns:

pointer to type diguyCharacter; NULL if there is no interaction subject

Callable From:

Camera Functions

function diguyIGuyController::set_camera_change_enabled

Prototype:

void set_camera_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller should update the primary view's camera to keep the I-Guy in view.

Arguments:

enabledpass 1 to enable camera changes, 0 to disable
Callable From:

function diguyIGuyController::get_camera_change_enabled

Prototype:

int get_camera_change_enabled();
Returns:

1 if I-Guy affects camera, 0 if not

Callable From:

function diguyIGuyController::set_camera_use_1st_person_flag

Prototype:

void set_camera_use_1st_person_flag(int flag);
Description:

This function sets whether the I-Guy controlled camera should be 1st person (from-the-eyes view), or 3rd person (over the shoulder).

Arguments:

flagpass 1 for 1st person, 0 for 3rd
Callable From:

function diguyIGuyController::get_camera_use_1st_person_flag

Prototype:

int get_camera_use_1st_person_flag();
Returns:

1 if I-Guy controlled camera is 1st person, 0 if 3rd

Callable From:

function diguyIGuyController::set_camera_attachment_link

Prototype:

void set_camera_attachment_link(const char* attachment_link);
Description:

This function sets which link the I-Guy controlled camera will be attached to. For human characters, the best link is typically "cervical" (the neck), or NULL (to use the base position of the character). The default is "cervical".

This setting affects both 1st person and 3rd person cameras.

Arguments:

attachment_linkname of the link to attach to
Pass NULL to have the camera be attached to the I-Guy character's base position.

Callable From:

function diguyIGuyController::get_camera_attachment_link

Prototype:

const char* get_camera_attachment_link();
Returns:

the name of the current camera attachment link, or the empty string ("") if there is none

Callable From:

function diguyIGuyController::set_camera_3rd_person_look_from_offset

Prototype:

void set_camera_3rd_person_look_from_offset(float x, float y, float z);
Description:

This function sets the offset that is used from the attachment link's position for the 3rd person camera's position.

Typically this has a slightly negative x value, to move the camera behind the I-Guy character, and a positive z value, to move the camera up so it can see over the character's head.

The default is x=-2.0, y=0.0f, z=0.35.

This setting affects only 3rd person cameras.

Arguments:

x, y, zoffset of camera position from attachment link
Callable From:

function diguyIGuyController::get_camera_3rd_person_look_from_offset

Prototype:

void get_camera_3rd_person_look_from_offset(float* x, float* y, float* z);
Description:

This function retrieves the offset that is used from the attachment link's position for the 3rd person camera's position. The offset values should be put into the variables pointed to.

Arguments:

x, y, zpointers to variables in which offset should be returned
Callable From:

function diguyIGuyController::set_camera_3rd_person_look_at_offset

Prototype:

void set_camera_3rd_person_look_at_offset(float x, float y, float z);
Description:

This function is similar to set_camera_3rd_person_look_from_offset(), but affects the look-at point instead.

The default is x=0.0, y=0.0, z=0.3.

Arguments:

x, y, zoffset of camera look-at point from attachment link
Callable From:

function diguyIGuyController::get_camera_3rd_person_look_at_offset

Prototype:

void get_camera_3rd_person_look_at_offset(float* x, float* y, float* z);
Description:

This function is similar to get_camera_3rd_person_look_from_offset(), but affects the look-at point instead.

Arguments:

x, y, zpointers to variables in which offset should be returned
Callable From:

Mouse Functions

function diguyIGuyController::set_mouse_input_enabled

Prototype:

void set_mouse_input_enabled(int enabled);
Description:

This function sets whether mouse input will affect the I-Guy character.

Arguments:

enabledpass 1 to enable mouse input, 0 to disable
Callable From:

function diguyIGuyController::get_mouse_input_enabled

Prototype:

int get_mouse_input_enabled();
Returns:

1 if mouse input is enabled, 0 if not

Callable From:

function diguyIGuyController::set_input_capture_enabled

Prototype:

void set_input_capture_enabled(int enabled);
Description:

This function sets whether mouse input should be "captured".

A captured mouse's cursor doesn't move, but stays in the middle of the view. This mode is common in first-person shooter (FPS) style games.

A non-captured mouse's cursor is free to move anywhere on the screen.

The setting only has an effect in DI-Guy Scenario.

Arguments:

enabledpass 1 to enable input capture, 0 to disable
Callable From:

function diguyIGuyController::get_input_capture_enabled

Prototype:

int get_input_capture_enabled();
Returns:

1 if input is captured, 0 if not

Callable From:

Keyboard Functions

function diguyIGuyController::set_keyboard_input_enabled

Prototype:

void set_keyboard_input_enabled(int enabled);
Description:

This function sets whether keyboard input will affect the I-Guy character.

Arguments:

enabledpass 1 to enable keyboard input, 0 to disable
Callable From:

function diguyIGuyController::get_keyboard_input_enabled

Prototype:

int get_keyboard_input_enabled();
Returns:

1 if keyboard input is enabled, 0 if not

Callable From:

Joystick Functions

function diguyIGuyController::set_joystick_input_enabled

Prototype:

void set_joystick_input_enabled(int enabled);
Description:

This function sets whether joystick input will affect the I-Guy character.

Arguments:

enabledpass 1 to enable joystick input, 0 to disable
Callable From:

function diguyIGuyController::get_joystick_input_enabled

Prototype:

int get_joystick_input_enabled();
Returns:

1 if joystick input is enabled, 0 if not

Callable From:

Posture and Variant Functions

function diguyIGuyController::set_posture_change_enabled

Prototype:

void set_posture_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller can affect the posture of the character.

The default is 1, posture change enabled.

Arguments:

enabledpass 1 to enable posture changes, 0 to disable
Callable From:

function diguyIGuyController::get_posture_change_enabled

Prototype:

int get_posture_change_enabled();
Returns:

1 if posture changes enabled, 0 if not

Callable From:

function diguyIGuyController::set_posture

Prototype:

void set_posture(diguyMotionPosture posture);
Description:

This function sets the desired posture of the I-Guy character.

Note that the character may not be able to maintain this posture. For example, if the desired posture is prone but the character type has no moving prone actions, a crouched action may be used for moving instead.

This function will have no effect if posture changes are disabled, as set by set_posture_change_enabled().

Arguments:

posturedesired posture
Callable From:

function diguyIGuyController::get_posture

Prototype:

diguyMotionPosture get_posture();
Returns:

the desired posture of the I-Guy character

Callable From:

function diguyIGuyController::set_variant_change_enabled

Prototype:

void set_variant_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller can affect the variant of the character.

The default is 1, variant change enabled.

Arguments:

enabledpass 1 to enable variant changes, 0 to disable
Callable From:

function diguyIGuyController::get_variant_change_enabled

Prototype:

int get_variant_change_enabled();
Returns:

1 if variant changes enabled, 0 if not

Callable From:

function diguyIGuyController::set_variant

Prototype:

void set_variant(diguyMotionVariant variant);
Description:

This function sets the desired variant of the I-Guy character.

This function will have no effect if variant changes are disabled, as set by set_variant_change_enabled().

Most often the variant of an I-Guy character should be one of:

Arguments:

variantdesired variant
Callable From:

function diguyIGuyController::get_variant

Prototype:

diguyMotionVariant get_variant();
Returns:

the desired variant of the I-Guy character

Callable From:

Misc Enable and Disable Functions

function diguyIGuyController::set_gaze_change_enabled

Prototype:

void set_gaze_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller can affect the gaze state of the character.

The default is 1, gaze change enabled.

Arguments:

enabledpass 1 to enable gaze changes, 0 to disable
Callable From:

function diguyIGuyController::get_gaze_change_enabled

Prototype:

int get_gaze_change_enabled();
Returns:

1 if gaze changes enabled, 0 if not

Callable From:

function diguyIGuyController::set_orientation_change_enabled

Prototype:

void set_orientation_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller can affect the orientation of the character.

The default is 1, orientation change enabled.

Arguments:

enabledpass 1 to enable orientation changes, 0 to disable
Callable From:

function diguyIGuyController::get_orientation_change_enabled

Prototype:

int get_orientation_change_enabled();
Returns:

1 if gaze orientation enabled, 0 if not

Callable From:

function diguyIGuyController::set_position_change_enabled

Prototype:

void set_position_change_enabled(int enabled);
Description:

This function sets whether the I-Guy controller can affect the position of the character.

The default is 1, position change enabled.

Arguments:

enabledpass 1 to enable position changes, 0 to disable
Callable From:

function diguyIGuyController::get_position_change_enabled

Prototype:

int get_position_change_enabled();
Returns:

1 if position changes enabled, 0 if not

Callable From:

Performance Functions

function diguyIGuyController::set_use_force_action_flag

Prototype:

void set_use_force_action_flag(int use_force_action_flag);
Description:

This function sets whether the I-Guy controller will change the controlled character's action abruptly or allow action changes to take place smoothly.

Forced action changes provide better responsiveness, but don't look as nice.

See the functions diguyCharacter::force_action() and diguyCharacter::set_desired_action().

The set_skip_transitions_flag() also has an effect on responsiveness and how nice the action transitions look.

The default is 1, force actions.

Arguments:

use_force_action_flagpass 1 to force quick action changes, 0 to smooth action changes
Callable From:

function diguyIGuyController::get_use_force_action_flag

Prototype:

int get_use_force_action_flag();
Returns:

whether actions are forced (returns 1) or not (returns 0)

Callable From:

function diguyIGuyController::set_skip_transitions_flag

Prototype:

void set_skip_transitions_flag(int skip_transitions_flag);
Description:

This function sets whether the I-Guy controller will, when new actions are forced, the transition motions from the current to the new action are skipped.

Skipping transitions provides better responsiveness, but doesn't look as nice.

This setting only has an effect if the force action flag is set to 1 (see set_use_force_action_flag()).

The default is 1, skip transitions.

Arguments:

skip_transitions_flagpass 1 to skip transition motions, 0 to play them
Callable From:

function diguyIGuyController::get_skip_transitions_flag

Prototype:

int get_skip_transitions_flag();
Returns:

whether transitions between actions are skipped (returns 1) or not (returns 0)

Callable From:

Misc Functions

function diguyIGuyController::set_always_run_flag

Prototype:

void set_always_run_flag(int always_run_flag);
Description:

This function sets whether the I-Guy character will always try to run, or move at its top speed.

The default is 0, don't always run.

Arguments:

always_run_flagpass 1 to always run, 0 to be able to walk and/or jog when moving slower
Callable From:

function diguyIGuyController::get_always_run_flag

Prototype:

int get_always_run_flag();
Returns:

whether the I-Guy character will always try to run (returns 1), or not (returns 0)

Callable From:

Facing Functions

function diguyIGuyController::get_face_rz

Prototype:

float get_face_rz();
Description:

This function returns the current azimiuth (left/right) facing angle of the I-Guy character. This value will change as the character is moved around by the I-Guy controller.

Returns:

current rz facing angle, in degrees

Callable From:

function diguyIGuyController::get_face_ry

Prototype:

float get_face_ry();
Description:

This function returns the current elevation (down/up) facing angle of the I-Guy character. This value will change as the character is moved around by the I-Guy controller.

Returns:

current ry facing angle, in degrees

Callable From:

function diguyIGuyController::set_face_rz_desired

Prototype:

void set_face_rz_desired(float face_rz_desired);
Description:

This function sets the desired azimiuth (left/right) facing angle of the I-Guy character.

Most often this value is changed via mouse, keyboard, or joystick input, not by this function.

Callable From:

function diguyIGuyController::get_face_rz_desired

Prototype:

float get_face_rz_desired();
Returns:

desired rz facing angle, in degrees

Callable From:

function diguyIGuyController::set_face_ry_desired

Prototype:

void set_face_ry_desired(float face_ry_desired);
Description:

This function sets the desired elevation (down/up) facing angle of the I-Guy character.

Most often this value is changed via mouse, keyboard, or joystick input, not by this function.

Callable From:

function diguyIGuyController::get_face_ry_desired

Prototype:

float get_face_ry_desired();
Returns:

desired ry facing angle, in degrees

Callable From:

function diguyIGuyController::face_character

Prototype:

void face_character(const char* character_name,
    const char* link,
    float offset_rz = 0.0f,
    float offset_ry = 0.0f);
Description:

This function sets the desired rz and ry facing angles of the I-Guy controlled character toward the specified character.

Callable From:

Deprecated Functions
The following functions are deprecated.

As these functions may disappear in a future version of DI-Guy, it is recommended that you remove calls to these functions from your application.

function diguyIGuyController::set_mouse_look_changes_orientation

Prototype:

void set_mouse_look_changes_orientation(int val);
Deprecated; use set_orientation_change_enabled() instead.

function diguyIGuyController::get_mouse_look_changes_orientation

Prototype:

int get_mouse_look_changes_orientation();
Deprecated; use get_orientation_change_enabled() instead.


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.