![]() |
DI-Guy SDK Documentation
13.6
|
#include <diguyLoadManager.h>
Public Member Functions | |
| void | set_enabled (int enabled) |
| This is the top-level on/off switch for this load manager. More... | |
| int | get_enabled () |
| Returns whether this load manager is enabled, as set by the set_enabled() call. More... | |
| int | set_minimum_full_update_period (float period) |
| Sets the minimum full update period to be used for all characters. More... | |
| float | get_minimum_full_update_period () |
| Returns: load manager's minimum full update period as set by set_minimum_full_update_period() More... | |
| int | set_zone_far_extent (int zone, float far_extent) |
| This function sets the far extents of load manager zone bounding planes, in terms of their distance from the camera. More... | |
| float | get_zone_far_extent (int zone) |
| Returns: far extent of zone as set by set_zone_far_extent(), -1.0 on failure. More... | |
| void | set_scale_zone_extents_from_view_settings (int do_scale) |
| 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. More... | |
| int | get_scale_zone_extents_from_view_settings () |
| Returns: most recent setting of set_scale_zone_extents_from_view_settings() More... | |
| int | set_zone_position_update_rate (int zone, int position_update_rate) |
| This function set the position update rate for the given zone. More... | |
| 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. More... | |
| int | set_zone_altitude_update_rate (int zone, int update_rate) |
| This function set the altitude update rate for the given zone. More... | |
| 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. More... | |
| int | set_zone_pose_update_rate (int zone, int pose_update_rate) |
| This function set the pose update rate for the given zone. More... | |
| 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. More... | |
| int | set_zone_motion_lod (int zone, int motion_lod) |
| This function set the motion LOD for the given zone. More... | |
| int | get_zone_motion_lod (int zone) |
| Returns: motion LOD of zone as set by set_zone_motion_lod(); -1 on failure. More... | |
| int | set_zone_minimum_cpl (int zone, int minimum_cpl) |
| See diguyCharacter::set_minimum_cpl() for a description of what affect this parameter will have on load managed characters. More... | |
| int | get_zone_minimum_cpl (int zone) |
| Returns: minimum CPL of zone as set by get_zone_minimum_cpl(); -1 on failure. More... | |
| int | set_zone_all_blends_disabled (int zone, int disabled_flag) |
| See diguyCharacter::set_all_blends_disabled() for a description of what affect this parameter will have on load managed characters. More... | |
| int | get_zone_all_blends_disabled (int zone) |
| Returns: whether all blends are disabled in the specified zone; -1 on failure. More... | |
| int | set_zone_shape_callbacks_disabled (int zone, int disabled_flag) |
| See diguyCharacter::set_shape_callbacks_disabled() for a description of what affect this parameter will have on load managed characters. More... | |
| int | get_zone_shape_callbacks_disabled (int zone) |
| Returns: whether all shape callbacks are disabled in the specified zone; -1 on failure. More... | |
| int | set_zone_graphics_api_shape_update_disabled (int zone, int disabled_flag) |
| See diguyCharacter::set_graphics_api_shape_update_disabled() for a description of what affect this parameter will have on load managed characters. More... | |
| 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. More... | |
| int | set_draw_visuals (int value) |
| set if debug graphics should be visible (internal OpenGL renderer only) More... | |
| int | get_draw_visuals () |
| Returns: are debug graphics visible (internal OpenGL renderer only) More... | |
Private Functions | |
The functions and variables past this point are for internal use only. No external access to them is expected or necessary. | |
| bdiScenarioCharacterLoadManager * | m_load_manager |
| A pointer to internal data. More... | |
| class | bdiScenarioCharacterLoadManager |
| bdiScenarioCharacterLoadManager * | get_scripted_object () |
| diguyLoadManager (bdiScenarioCharacterLoadManager *lm) | |
| A private constructor. More... | |
| virtual | ~diguyLoadManager () |
| A private destructor. More... | |
|
private |
A private constructor.
Use the DI-Guy function diguy_create_load_manager() to obtain a diguyLoadManager object pointer.
|
privatevirtual |
A private destructor.
| void diguyLoadManager::set_enabled | ( | int | enabled | ) |
This is the top-level on/off switch for this load manager.
By default, load managers are disabled.
| int diguyLoadManager::get_enabled | ( | ) |
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
| int diguyLoadManager::set_minimum_full_update_period | ( | float | period | ) |
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.
| period | the minimum update period, in seconds |
Returns:
0 on success, -1 on failure
| float diguyLoadManager::get_minimum_full_update_period | ( | ) |
Returns: load manager's minimum full update period as set by set_minimum_full_update_period()
| int diguyLoadManager::set_zone_far_extent | ( | int | zone, |
| float | far_extent | ||
| ) |
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 | zone to modify |
| far_extent | new far extent of zone |
Returns:
0 on success, -1 on failure
| float diguyLoadManager::get_zone_far_extent | ( | int | zone | ) |
Returns: far extent of zone as set by set_zone_far_extent(), -1.0 on failure.
| zone | zone to query |
| void diguyLoadManager::set_scale_zone_extents_from_view_settings | ( | int | do_scale | ) |
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.
do_scale - pass 1 to enable scaling, 0 to disable
| int diguyLoadManager::get_scale_zone_extents_from_view_settings | ( | ) |
Returns: most recent setting of set_scale_zone_extents_from_view_settings()
| int diguyLoadManager::set_zone_position_update_rate | ( | int | zone, |
| int | position_update_rate | ||
| ) |
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 | zone to modify |
| position_update_rate | new position update rate |
Returns:
0 on success, -1 on failure
C++ Example:
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%).
| int diguyLoadManager::get_zone_position_update_rate | ( | int | zone | ) |
Returns: position update rate of zone as set by set_zone_position_update_rate(); -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_altitude_update_rate | ( | int | zone, |
| int | update_rate | ||
| ) |
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 | zone to modify |
| update_rate | new update rate |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_altitude_update_rate | ( | int | zone | ) |
Returns: altitude update rate of zone as set by set_zone_altitude_update_rate(); -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_pose_update_rate | ( | int | zone, |
| int | pose_update_rate | ||
| ) |
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 | zone to modify |
| pose_update_rate | new pose update rate |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_pose_update_rate | ( | int | zone | ) |
Returns: pose update rate of zone as set by set_zone_pose_update_rate(); -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_motion_lod | ( | int | zone, |
| int | motion_lod | ||
| ) |
This function set the motion LOD for the given zone.
See diguyCharacter::set_motion_lod() for a discussion of motion LODs.
Defaults:
| zone | zone to modify |
| motion_lod | new motion LOD |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_motion_lod | ( | int | zone | ) |
Returns: motion LOD of zone as set by set_zone_motion_lod(); -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_minimum_cpl | ( | int | zone, |
| int | minimum_cpl | ||
| ) |
See diguyCharacter::set_minimum_cpl() for a description of what affect this parameter will have on load managed characters.
| zone | zone to modify |
| minimum_cpl | new minimum CPL |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_minimum_cpl | ( | int | zone | ) |
Returns: minimum CPL of zone as set by get_zone_minimum_cpl(); -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_all_blends_disabled | ( | int | zone, |
| int | disabled_flag | ||
| ) |
See diguyCharacter::set_all_blends_disabled() for a description of what affect this parameter will have on load managed characters.
| zone | zone to modify |
| disabled_flag | pass 1 to disable, 0 to enable |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_all_blends_disabled | ( | int | zone | ) |
Returns: whether all blends are disabled in the specified zone; -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_shape_callbacks_disabled | ( | int | zone, |
| int | disabled_flag | ||
| ) |
See diguyCharacter::set_shape_callbacks_disabled() for a description of what affect this parameter will have on load managed characters.
| zone | zone to modify |
| disabled_flag | pass 1 to disable, 0 to enable |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::get_zone_shape_callbacks_disabled | ( | int | zone | ) |
Returns: whether all shape callbacks are disabled in the specified zone; -1 on failure.
| zone | zone to query |
| int diguyLoadManager::set_zone_graphics_api_shape_update_disabled | ( | int | zone, |
| int | disabled_flag | ||
| ) |
See diguyCharacter::set_graphics_api_shape_update_disabled() for a description of what affect this parameter will have on load managed characters.
| zone | zone to modify |
| disabled_flag | pass 1 to disable, 0 to enable |
Returns:
0 on success, -1 on failure
| int diguyLoadManager::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.
| zone | zone to query |
| int diguyLoadManager::set_draw_visuals | ( | int | value | ) |
set if debug graphics should be visible (internal OpenGL renderer only)
| int diguyLoadManager::get_draw_visuals | ( | ) |
Returns: are debug graphics visible (internal OpenGL renderer only)
|
inline |
|
friend |
|
private |
A pointer to internal data.