diguyLoadManager

Generated from diguyLoadManager.h

DI-Guy API Version 12.5.1

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

Contents:

Alphabetical Index

Link against: libdiguy

class diguyLoadManager

class BDI_DECLSPEC_diguy diguyLoadManager
{
public:
    void set_enabled(int enabled);
    int get_enabled();
    int set_minimum_full_update_period(float period);
    float get_minimum_full_update_period();
    int set_zone_far_extent(int zone, float far_extent);
    float get_zone_far_extent(int zone);
    void set_scale_zone_extents_from_view_settings(int do_scale);
    int  get_scale_zone_extents_from_view_settings();
    int set_zone_position_update_rate(int zone, int position_update_rate);
    int get_zone_position_update_rate(int zone);
    int set_zone_altitude_update_rate(int zone, int update_rate);
    int get_zone_altitude_update_rate(int zone);
    int set_zone_pose_update_rate(int zone, int pose_update_rate);
    int get_zone_pose_update_rate(int zone);
    int set_zone_motion_lod(int zone, int motion_lod);
    int get_zone_motion_lod(int zone);
    int set_zone_minimum_cpl(int zone, int minimum_cpl);
    int get_zone_minimum_cpl(int zone);
    int set_zone_all_blends_disabled(int zone, int disabled_flag);
    int get_zone_all_blends_disabled(int zone);
    int set_zone_shape_switches_disabled(int zone, int disabled_flag);
    int get_zone_shape_switches_disabled(int zone);
    int set_zone_shape_callbacks_disabled(int zone, int disabled_flag);
    int get_zone_shape_callbacks_disabled(int zone);
    int set_zone_graphics_api_shape_update_disabled(int zone, int disabled_flag);
    int get_zone_graphics_api_shape_update_disabled(int zone);
The DI-Guy Load Manager is responsible for adjusting each character's motion level of detail, as well as various update rates, depending on where the character's are in relation to cameras.

function diguyLoadManager::set_enabled

Prototype:

void set_enabled(int enabled);
Description:

This is the top-level on/off switch for this load manager. By default, load managers are disabled.

Callable From:

function diguyLoadManager::get_enabled

Prototype:

int get_enabled();
Description:

Returns whether this load manager is enabled, as set by the set_enabled() call.

Returns:

1 if this load manager is enabled, 0 if not

Callable From:

function diguyLoadManager::set_minimum_full_update_period

Prototype:

int set_minimum_full_update_period(float period);
Description:

Sets the minimum full update period to be used for all characters. This potentially overrides the update rates otherwise set for the character.

For example, if a character's position update rate were so low that it would not be updated within this minimum update period, it would be forced to update.

The default minimum update period is 0.5 seconds.

Arguments:

periodthe minimum update period, in seconds
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_minimum_full_update_period

Prototype:

float get_minimum_full_update_period();
Returns:

load manager's minimum full update period as set by set_minimum_full_update_period()

Callable From:

function diguyLoadManager::set_zone_far_extent

Prototype:

int set_zone_far_extent(int zone, float far_extent);
Description:

This function sets the far extents of load manager zone bounding planes, in terms of their distance from the camera. Zone 0 is between the camera near clipping plane and bounding plane 0. Zone 1 is between bounding plane 0 and bounding plane 1. Zone 2 is between bounding plane 1 and the camera far clipping plane.

The defaults for the zone bounds should work reasonably well in most cases, but some tweaking may be required in some cases.

Defaults:

  • zone 0: 10 meters
  • zone 1: 20 meters
  • zone 2: (camera far plane; cannot be set by this function)
Arguments:

zone zone to modify
far_extentnew far extent of zone
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_far_extent

Prototype:

float get_zone_far_extent(int zone);
Returns:

far extent of zone as set by set_zone_far_extent(), -1.0 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_scale_zone_extents_from_view_settings

Prototype:

void set_scale_zone_extents_from_view_settings(int do_scale);
Description:

This function sets whether view and camera settings such as field-of-view (FOV) and window size should be taken into account when determining the zone of a character.

The base zone extents are distance-based, but this approach can be problematic if the current camera's FOV is very narrow; a narrow FOV essentially acts like a telephoto lens. In this case a character that is far away, and would therefore be rendered at low resolution, can actually be quite large in the 3D view.

Setting this flag to 1 will cause the FOV to be taken into account when calculating effective zone extents.

In general zone extents assume that the vertical FOV of the view is around 40. Smaller FOVs will scale the thresholds larger so that zone changes happen further out. Likewise larger FOVs will scale the extents smaller; in this case even nearby characters will appear small and therefore need less resolution.

Arguments:

do_scale - pass 1 to enable scaling, 0 to disable

Callable From:

function diguyLoadManager::get_scale_zone_extents_from_view_settings

Prototype:

int  get_scale_zone_extents_from_view_settings();
Returns:

most recent setting of set_scale_zone_extents_from_view_settings()

Callable From:

function diguyLoadManager::set_zone_position_update_rate

Prototype:

int set_zone_position_update_rate(int zone, int position_update_rate);
Description:

This function set the position update rate for the given zone.

The position update rate is the percentage of frames in which the overall position of the character will be updated. Passing 100 will cause character positions to be updated every frame; passing 50 will cause character positions to be updated every other frame.

Defaults:

  • zone 0: 100
  • zone 1: 100
  • zone 2: 100
Arguments:

zone zone to modify
position_update_ratenew position update rate
Returns:

0 on success, -1 on failure

Callable From:

C++ Example:

set_zone_position_update_rate(0, 100);
set_zone_position_update_rate(1, 80);
set_zone_position_update_rate(2, 50);
In this example characters in zone 0 will have their positions updated every frame (100%). Characters in zone 1 will have their positions updated every four out of five frames (80%). Characters in zone 2 will have their positions updated every other frame (50%).

function diguyLoadManager::get_zone_position_update_rate

Prototype:

int get_zone_position_update_rate(int zone);
Returns:

position update rate of zone as set by set_zone_position_update_rate(); -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_altitude_update_rate

Prototype:

int set_zone_altitude_update_rate(int zone, int update_rate);
Description:

This function set the altitude update rate for the given zone.

The position update rate is the percentage of frames in which the altitude, or Z position, of the character will be updated.

Passing 100 will cause character altitudes to be updated every frame; passing 50 will cause character altitudes to be updated every other frame.

Defaults:

  • zone 0: 100
  • zone 1: 100
  • zone 2: 100
Arguments:

zone zone to modify
update_ratenew update rate
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_altitude_update_rate

Prototype:

int get_zone_altitude_update_rate(int zone);
Returns:

altitude update rate of zone as set by set_zone_altitude_update_rate(); -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_pose_update_rate

Prototype:

int set_zone_pose_update_rate(int zone, int pose_update_rate);
Description:

This function set the pose update rate for the given zone.

The pose update rate is the percentage of frames in which the pose of the character will be updated. The pose includes all joint angles of the character, but does not include the overall position.

Defaults:

  • zone 0: 100
  • zone 1: 50
  • zone 2: 33
Arguments:

zone zone to modify
pose_update_ratenew pose update rate
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_pose_update_rate

Prototype:

int get_zone_pose_update_rate(int zone);
Returns:

pose update rate of zone as set by set_zone_pose_update_rate(); -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_motion_lod

Prototype:

int set_zone_motion_lod(int zone, int motion_lod);
Description:

This function set the motion LOD for the given zone.

See diguyCharacter::set_motion_lod() for a discussion of motion LODs.

Defaults:

  • zone 0: 1
  • zone 1: 2
  • zone 2: 3
Arguments:

zone zone to modify
motion_lodnew motion LOD
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_motion_lod

Prototype:

int get_zone_motion_lod(int zone);
Returns:

motion LOD of zone as set by set_zone_motion_lod(); -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_minimum_cpl

Prototype:

int set_zone_minimum_cpl(int zone, int minimum_cpl);
Description:

See diguyCharacter::set_minimum_cpl() for a description of what affect this parameter will have on load managed characters.

Arguments:

zone zone to modify
minimum_cplnew minimum CPL
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_minimum_cpl

Prototype:

int get_zone_minimum_cpl(int zone);
Returns:

minimum CPL of zone as set by get_zone_minimum_cpl(); -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_all_blends_disabled

Prototype:

int set_zone_all_blends_disabled(int zone, int disabled_flag);
Description:

See diguyCharacter::set_all_blends_disabled() for a description of what affect this parameter will have on load managed characters.

Arguments:

zone zone to modify
disabled_flagpass 1 to disable, 0 to enable
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_all_blends_disabled

Prototype:

int get_zone_all_blends_disabled(int zone);
Returns:

whether all blends are disabled in the specified zone; -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_shape_switches_disabled

Prototype:

int set_zone_shape_switches_disabled(int zone, int disabled_flag);
Description:

See diguyCharacter::set_shape_switches_disabled() for a description of what affect this parameter will have on load managed characters.

Arguments:

zone zone to modify
disabled_flagpass 1 to disable, 0 to enable
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_shape_switches_disabled

Prototype:

int get_zone_shape_switches_disabled(int zone);
Returns:

whether all shape switches are disabled in the specified zone; -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_shape_callbacks_disabled

Prototype:

int set_zone_shape_callbacks_disabled(int zone, int disabled_flag);
Description:

See diguyCharacter::set_shape_callbacks_disabled() for a description of what affect this parameter will have on load managed characters.

Arguments:

zone zone to modify
disabled_flagpass 1 to disable, 0 to enable
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_shape_callbacks_disabled

Prototype:

int get_zone_shape_callbacks_disabled(int zone);
Returns:

whether all shape callbacks are disabled in the specified zone; -1 on failure

Arguments:

zonezone to query
Callable From:

function diguyLoadManager::set_zone_graphics_api_shape_update_disabled

Prototype:

int set_zone_graphics_api_shape_update_disabled(int zone, int disabled_flag);
Description:

See diguyCharacter::set_graphics_api_shape_update_disabled() for a description of what affect this parameter will have on load managed characters.

Arguments:

zone zone to modify
disabled_flagpass 1 to disable, 0 to enable
Returns:

0 on success, -1 on failure

Callable From:

function diguyLoadManager::get_zone_graphics_api_shape_update_disabled

Prototype:

int get_zone_graphics_api_shape_update_disabled(int zone);
Returns:

whether all graphics API shape updates are disabled in the specified zone; -1 on failure

Arguments:

zonezone to query
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.


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.