diff --git a/interface/src/LODManager.h b/interface/src/LODManager.h
index 4708deb61b..16b0529b05 100644
--- a/interface/src/LODManager.h
+++ b/interface/src/LODManager.h
@@ -66,16 +66,62 @@ class AABox;
/**jsdoc
- * The LOD class manages your Level of Detail functions within Interface.
+ * The LODManager
API manages the Level of Detail displayed in Interface. If the LOD is being automatically
+ * adjusted, the LOD is decreased if the measured frame rate is lower than the target FPS, and increased if the measured frame
+ * rate is greater than the target FPS.
+ *
* @namespace LODManager
*
* @hifi-interface
* @hifi-client-entity
* @hifi-avatar
*
- * @property {number} presentTime Read-only.
- * @property {number} engineRunTime Read-only.
- * @property {number} gpuTime Read-only.
+ * @property {LODManager.WorldDetailQuality} worldDetailQuality - The quality of the rendered world detail.
+ *
Setting this value updates the current desktop or HMD target LOD FPS.
+ * @property {number} lodQualityLevel - Not used. + *Deprecated: This property is deprecated and will be removed.
+ * @property {boolean} automaticLODAdjust -true
to automatically adjust the LOD, false
to manually
+ * adjust it.
+ *
+ * @property {number} engineRunTime - The time spent in the "render" thread to produce the most recent frame, in ms.
+ * Read-only.
+ * @property {number} batchTime - The time spent in the "present" thread processing the batches of the most recent frame, in ms.
+ * Read-only.
+ * @property {number} presentTime - The time spent in the "present" thread between the last buffer swap, i.e., the total time
+ * to submit the most recent frame, in ms.
+ * Read-only.
+ * @property {number} gpuTime - The time spent in the GPU executing the most recent frame, in ms.
+ * Read-only.
+ *
+ * @property {number} nowRenderTime - The current, instantaneous time spend to produce frames, in ms. This is the worst of
+ * engineRunTime
, batchTime
, presentTime
, and gpuTime
.
+ * Read-only.
+ * @property {number} nowRenderFPS - The current, instantaneous frame rate, in Hz.
+ * Read-only.
+ *
+ * @property {number} smoothScale - The amount of smoothing applied to calculate smoothRenderTime
and
+ * smoothRenderFPS
.
+ * @property {number} smoothRenderTime - The average time spend to produce frames, in ms.
+ * Read-only.
+ * @property {number} smoothRenderFPS - The average frame rate, in Hz.
+ * Read-only.
+ *
+ * @property {number} lodTargetFPS - The target LOD FPS per the current desktop or HMD display mode, capped by the target
+ * refresh rate set by the {@link Performance} API.
+ * Read-only.
+
+ * @property {number} lodAngleDeg - The minimum angular dimension (relative to the camera position) of an entity in order for
+ * it to be rendered, in degrees. The angular dimension is calculated as a sphere of radius half the diagonal of the
+ * entity's AA box.
+ *
+ * @property {number} pidKp - Not used.
+ * @property {number} pidKi - Not used.
+ * @property {number} pidKd - Not used.
+ * @property {number} pidKv - Not used.
+ * @property {number} pidOp - Not used. Read-only.
+ * @property {number} pidOi - Not used. Read-only.
+ * @property {number} pidOd - Not used. Read-only.
+ * @property {number} pidO - Not used. Read-only.
*/
class LODManager : public QObject, public Dependency {
Q_OBJECT
@@ -117,83 +163,96 @@ class LODManager : public QObject, public Dependency {
public:
/**jsdoc
+ * Sets whether the LOD should be automatically adjusted.
* @function LODManager.setAutomaticLODAdjust
- * @param {boolean} value
+ * @param {boolean} value - true
to automatically adjust the LOD, false
to manually adjust it.
*/
Q_INVOKABLE void setAutomaticLODAdjust(bool value);
/**jsdoc
+ * Gets whether the LOD is being automatically adjusted.
* @function LODManager.getAutomaticLODAdjust
- * @returns {boolean}
+ * @returns {boolean} true
if the LOD is being automatically adjusted, false
if it is being
+ * manually adjusted.
*/
Q_INVOKABLE bool getAutomaticLODAdjust() const { return _automaticLODAdjust; }
/**jsdoc
+ * Sets the target desktop LOD FPS.
* @function LODManager.setDesktopLODTargetFPS
- * @param {number} value
+ * @param {number} value - The target desktop LOD FPS, in Hz.
*/
Q_INVOKABLE void setDesktopLODTargetFPS(float value);
/**jsdoc
+ * Gets the target desktop LOD FPS.
* @function LODManager.getDesktopLODTargetFPS
- * @returns {number}
+ * @returns {number} The target desktop LOD FPS, in Hz.
*/
Q_INVOKABLE float getDesktopLODTargetFPS() const;
/**jsdoc
+ * Sets the target HMD LOD FPS.
* @function LODManager.setHMDLODTargetFPS
- * @param {number} value
+ * @param {number} value - The target HMD LOD FPS, in Hz.
*/
Q_INVOKABLE void setHMDLODTargetFPS(float value);
/**jsdoc
+ * Gets the target HMD LOD FPS.
+ * The target FPS in HMD mode. The LOD is adjusted to ...
* @function LODManager.getHMDLODTargetFPS
- * @returns {number}
+ * @returns {number} The target HMD LOD FPS, in Hz.
*/
Q_INVOKABLE float getHMDLODTargetFPS() const;
// User Tweakable LOD Items
+
/**jsdoc
+ * Gets a text description of the current level of detail rendered.
* @function LODManager.getLODFeedbackText
- * @returns {string}
+ * @returns {string} A text description of the current level of detail rendered.
+ * @example lodAngleDeg
property instead.
*/
Q_INVOKABLE void setOctreeSizeScale(float sizeScale);
/**jsdoc
* @function LODManager.getOctreeSizeScale
- * @returns {number}
- * @deprecated This function is deprecated and will be removed. Use the {@link LODManager.lodAngleDeg} property instead.
+ * @returns {number} The octree size scale.
+ * @deprecated This function is deprecated and will be removed. Use the lodAngleDeg
property instead.
*/
Q_INVOKABLE float getOctreeSizeScale() const;
/**jsdoc
* @function LODManager.setBoundaryLevelAdjust
- * @param {number} boundaryLevelAdjust
+ * @param {number} boundaryLevelAdjust - The boundary level adjust factor.
* @deprecated This function is deprecated and will be removed.
*/
Q_INVOKABLE void setBoundaryLevelAdjust(int boundaryLevelAdjust);
/**jsdoc
* @function LODManager.getBoundaryLevelAdjust
- * @returns {number}
+ * @returns {number} The boundary level adjust factor.
* @deprecated This function is deprecated and will be removed.
*/
Q_INVOKABLE int getBoundaryLevelAdjust() const { return _boundaryLevelAdjust; }
/**jsdoc
- * @function LODManager.getLODTargetFPS
- * @returns {number}
- */
+ * The target LOD FPS per the current desktop or HMD display mode, capped by the target refresh rate.
+ * @function LODManager.getLODTargetFPS
+ * @returns {number} The target LOD FPS, in Hz.
+ */
Q_INVOKABLE float getLODTargetFPS() const;
@@ -249,19 +308,41 @@ public:
signals:
/**jsdoc
+ * Not triggered.
* @function LODManager.LODIncreased
* @returns {Signal}
+ * @deprecated This signal is deprecated and will be removed.
*/
void LODIncreased();
/**jsdoc
+ * Not triggered.
* @function LODManager.LODDecreased
* @returns {Signal}
+ * @deprecated This signal is deprecated and will be removed.
*/
void LODDecreased();
+ /**jsdoc
+ * Triggered when whether or not the LOD is being automatically adjusted changes.
+ * @function LODManager.autoLODChanged
+ * @returns {Signal}
+ */
void autoLODChanged();
+
+ /**jsdoc
+ * Triggered when the lodQualityLevel
property value changes.
+ * @function LODManager.lodQualityLevelChanged
+ * @returns {Signal}
+ * @deprecated This signal is deprecated and will be removed.
+ */
void lodQualityLevelChanged();
+
+ /**jsdoc
+ * Triggered when the world detail quality changes.
+ * @function LODManager.worldDetailQualityChanged
+ * @returns {Signal}
+ */
void worldDetailQualityChanged();
private:
diff --git a/interface/src/RefreshRateManager.cpp b/interface/src/RefreshRateManager.cpp
index beb1363aac..bb4ec42e41 100644
--- a/interface/src/RefreshRateManager.cpp
+++ b/interface/src/RefreshRateManager.cpp
@@ -19,10 +19,9 @@ static const int VR_TARGET_RATE = 90;
/**jsdoc
* Refresh rate profile.
- * *Refresh Rate Profile | Description |
---|---|
Value | Description |
"Eco" | Low refresh rate, which is reduced when Interface doesn't have focus or is @@ -32,18 +31,16 @@ static const int VR_TARGET_RATE = 90; * |
"Realtime" | High refresh rate, even when Interface doesn't have focus or is minimized. * |
Interface states that affect the refresh rate.
- * *Refresh Rate Regime | Description |
---|---|
Value | Description |
"FocusActive" | Interface has focus and the user is active or is in VR. | "ShutDown" | Interface is shutting down. | *
Interface operates in different modes to provide different user experiences (UX).
- * + *User experience (UX) modes.
*UX Mode | Description |
---|---|
Value | Description |
"Desktop" | Desktop user experience mode. |
"VR" | VR user experience mode. |
"Desktop" | Desktop user experience. |
"VR" | VR user experience. |
Interface states that affect the refresh rate.
+ *Value | Name | Description | + *
---|---|---|
0 | FOCUS_ACTIVE | Interface has focus and the user is active or is in VR. |
1 | FOCUS_INACTIVE | Interface has focus and the user is inactive. |
2 | UNFOCUS | Interface doesn't have focus. |
3 | MINIMIZED | Interface is minimized. |
4 | STARTUP | Interface is starting up. |
5 | SHUTDOWN | Interface is shutting down. |
User experience (UX) modes.
+ *Value | Name | Description | + *
---|---|---|
0 | DESKTOP | Desktop user experience. |
1 | VR | VR use experience. |
Performance
API provides control and information on graphics performance settings.
+ *
+ * @namespace Performance
+ *
+ * @hifi-interface
+ * @hifi-client-entity
+ * @hifi-avatar
+ *
+ * @property {Performance.PerformancePreset} performancePreset - The current graphics performance preset.
+ * @property {Performance.RefreshRateProfile} refreshRateProfile - The current refresh rate profile.
+ */
class PerformanceScriptingInterface : public QObject {
Q_OBJECT
Q_PROPERTY(PerformancePreset performancePreset READ getPerformancePreset WRITE setPerformancePreset NOTIFY settingsChanged)
@@ -25,6 +37,23 @@ class PerformanceScriptingInterface : public QObject {
public:
+ /**jsdoc
+ * Graphics performance presets.
+ *Value | Name | Description | + *
---|---|---|
0 | UNKNOWN | Custom settings of world detail, rendering effects, and refresh + * rate. |
1 | LOW | Low world detail, no rendering effects, lo refresh rate. |
2 | MID | Medium world detail, some rendering effects, medium refresh + * rate. |
3 | HIGH | Maximum world detail, all rendering effects, high refresh rate. |
Refresh rate profile.
+ *Value | Name | Description | + *
---|---|---|
0 | ECO | Low refresh rate, which is reduced when Interface doesn't have focus or + * is minimized. |
1 | INTERACTIVE | Medium refresh rate, which is reduced when Interface doesn't have + * focus or is minimized. |
2 | REALTIME | High refresh rate, even when Interface doesn't have focus or is + * minimized. |
refreshRateMode
and
- * refreshRateRegime
if in desktop mode; a higher rate if in VR mode.
+ * @property {number} refreshRateTarget - The current target refresh rate, in Hz, per the current refreshRateMode
+ * and refreshRateRegime
if in desktop mode; a higher rate if in VR mode.
* Read-only.
- * @property {RefreshRateProfile} refreshRateMode - The current refresh rate profile.
+ * @property {RefreshRateProfileName} refreshRateMode - The current refresh rate profile.
* Read-only.
- * @property {RefreshRateRegime} refreshRateRegime - The current refresh rate regime.
+ * @property {RefreshRateRegimeName} refreshRateRegime - The current refresh rate regime.
* Read-only.
- * @property {UXMode} uxMode - The user experience (UX) mode that Interface is running in.
+ * @property {UXModeName} uxMode - The user experience (UX) mode that Interface is running in.
* Read-only.
* @property {number} avatarCount - The number of avatars in the domain other than the client's.
* Read-only.