From 1906ce7812807ee1851bc9427fbfd79f9dc9315d Mon Sep 17 00:00:00 2001
From: David Rowe A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible
+ * as a group.HMD
API provides access to the HMD used in VR display mode.
*
* @namespace HMD
*
@@ -87,7 +87,7 @@ class HMDScriptingInterface : public AbstractHMDScriptingInterface, public Depen
public:
/**jsdoc
- * Calculate the intersection of a ray with the HUD overlay.
+ * Calculates the intersection of a ray with the HUD overlay.
* @function HMD.calculateRayUICollisionPoint
* @param {Vec3} position - The origin of the ray.
* @param {Vec3} direction - The direction of the ray.
@@ -115,7 +115,7 @@ public:
glm::vec3 calculateParabolaUICollisionPoint(const glm::vec3& position, const glm::vec3& velocity, const glm::vec3& acceleration, float& parabolicDistance) const;
/**jsdoc
- * Get the 2D HUD overlay coordinates of a 3D point on the HUD overlay.
+ * Gets the 2D HUD overlay coordinates of a 3D point on the HUD overlay.
* 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.
* @function HMD.overlayFromWorldPoint
* @param {Vec3} position - The point on the HUD overlay in world coordinates.
@@ -141,7 +141,7 @@ public:
Q_INVOKABLE glm::vec2 overlayFromWorldPoint(const glm::vec3& position) const;
/**jsdoc
- * Get the 3D world coordinates of a 2D point on the HUD overlay.
+ * Gets the 3D world coordinates of a 2D point on the HUD overlay.
* 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.
* @function HMD.worldPointFromOverlay
* @param {Vec2} coordinates - The point on the HUD overlay in HUD coordinates.
@@ -150,7 +150,7 @@ public:
Q_INVOKABLE glm::vec3 worldPointFromOverlay(const glm::vec2& overlay) const;
/**jsdoc
- * Get the 2D point on the HUD overlay represented by given spherical coordinates.
+ * Gets the 2D point on the HUD overlay represented by given spherical coordinates.
* 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.
* Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 }
being the center of the HUD
* overlay.
@@ -161,7 +161,7 @@ public:
Q_INVOKABLE glm::vec2 sphericalToOverlay(const glm::vec2 & sphericalPos) const;
/**jsdoc
- * Get the spherical coordinates of a 2D point on the HUD overlay.
+ * Gets the spherical coordinates of a 2D point on the HUD overlay.
* 2D HUD overlay coordinates are pixels with the origin at the top left of the overlay.
* Spherical coordinates are polar coordinates in radians with { x: 0, y: 0 }
being the center of the HUD
* overlay.
@@ -172,21 +172,21 @@ public:
Q_INVOKABLE glm::vec2 overlayToSpherical(const glm::vec2 & overlayPos) const;
/**jsdoc
- * Recenter the HMD HUD to the current HMD position and orientation.
+ * Recenters the HMD HUD to the current HMD position and orientation.
* @function HMD.centerUI
*/
Q_INVOKABLE void centerUI();
/**jsdoc
- * Get the name of the HMD audio input device.
+ * Gets the name of the HMD audio input device.
* @function HMD.preferredAudioInput
* @returns {string} The name of the HMD audio input device if in HMD mode, otherwise an empty string.
*/
Q_INVOKABLE QString preferredAudioInput() const;
/**jsdoc
- * Get the name of the HMD audio output device.
+ * Gets the name of the HMD audio output device.
* @function HMD.preferredAudioOutput
* @returns {string} The name of the HMD audio output device if in HMD mode, otherwise an empty string.
*/
@@ -194,7 +194,7 @@ public:
/**jsdoc
- * Check whether there is an HMD available.
+ * Checks whether there is an HMD available.
* @function HMD.isHMDAvailable
* @param {string} [name=""] - The name of the HMD to check for, e.g., "Oculus Rift"
. The name is the same as
* may be displayed in Interface's "Display" menu. If no name is specified then any HMD matches.
@@ -208,7 +208,7 @@ public:
Q_INVOKABLE bool isHMDAvailable(const QString& name = "");
/**jsdoc
- * Check whether there is an HMD head controller available.
+ * Checks whether there is an HMD head controller available.
* @function HMD.isHeadControllerAvailable
* @param {string} [name=""] - The name of the HMD head controller to check for, e.g., "Oculus"
. If no name is
* specified then any HMD head controller matches.
@@ -222,7 +222,7 @@ public:
Q_INVOKABLE bool isHeadControllerAvailable(const QString& name = "");
/**jsdoc
- * Check whether there are HMD hand controllers available.
+ * Checks whether there are HMD hand controllers available.
* @function HMD.isHandControllerAvailable
* @param {string} [name=""] - The name of the HMD hand controller to check for, e.g., "Oculus"
. If no name is
* specified then any HMD hand controller matches.
@@ -236,7 +236,7 @@ public:
Q_INVOKABLE bool isHandControllerAvailable(const QString& name = "");
/**jsdoc
- * Check whether there are specific HMD controllers available.
+ * Checks whether there are specific HMD controllers available.
* @function HMD.isSubdeviceContainingNameAvailable
* @param {string} name - The name of the HMD controller to check for, e.g., "OculusTouch"
.
* @returns {boolean} true
if an HMD controller with a name containing the specified name
is
@@ -248,7 +248,7 @@ public:
Q_INVOKABLE bool isSubdeviceContainingNameAvailable(const QString& name);
/**jsdoc
- * Signal that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual,
+ * Signals that models of the HMD hand controllers being used should be displayed. The models are displayed at their actual,
* real-world locations.
* @function HMD.requestShowHandControllers
* @example true
if the current HMD provides a keyboard and it was successfully suppressed (e.g., it
@@ -307,14 +307,14 @@ public:
Q_INVOKABLE bool suppressKeyboard();
/**jsdoc
- * Unsuppress the activation of the HMD-provided keyboard, if any.
+ * Unsuppresses the activation of the HMD-provided keyboard, if any.
* @function HMD.unsuppressKeyboard
*/
/// Enable the keyboard following a suppressKeyboard call
Q_INVOKABLE void unsuppressKeyboard();
/**jsdoc
- * Check whether the HMD-provided keyboard, if any, is visible.
+ * Checks whether the HMD-provided keyboard, if any, is visible.
* @function HMD.isKeyboardVisible
* @returns {boolean} true
if the current HMD provides a keyboard and it is visible, otherwise
* false
.
@@ -377,7 +377,19 @@ signals:
public:
HMDScriptingInterface();
+
+ /**jsdoc
+ * Gets the position on the HUD overlay that your HMD is looking at, in HUD coordinates.
+ * @function HMD.getHUDLookAtPosition2D
+ * @returns {Vec2} The position on the HUD overlay that your HMD is looking at, in pixels.
+ */
static QScriptValue getHUDLookAtPosition2D(QScriptContext* context, QScriptEngine* engine);
+
+ /**jsdoc
+ * Gets the position on the HUD overlay that your HMD is looking at, in world coordinates.
+ * @function HMD.getHUDLookAtPosition3D
+ * @returns {Vec3} The position on the HUD overlay the your HMD is looking at, in world coordinates.
+ */
static QScriptValue getHUDLookAtPosition3D(QScriptContext* context, QScriptEngine* engine);
bool isMounted() const override;
From 60298245da4a9fcfe4479d18c80cb29a1ce5b603 Mon Sep 17 00:00:00 2001
From: David Rowe Menu
API provides access to the menu that is displayed at the top of the window on a user's desktop and in
+ * the tablet when the "MENU" button is pressed.
*
* Groupings
*
- * A "grouping" provides a way to group a set of menus or menu items together so
- * that they can all be set visible or invisible as a group.
- * There are two available groups: "Advanced"
and "Developer"
.
- * These groupings can be toggled in the "Settings" menu.
- * If a menu item doesn't belong to a group it is always displayed.
+ * "Developer"
. This grouping can be toggled in the
+ * "Settings" menu.
If a menu item doesn't belong to a group it is always displayed.
* * @namespace Menu * @@ -60,22 +57,23 @@ private slots: public slots: /**jsdoc - * Add a new top-level menu. + * Adds a new top-level menu. * @function Menu.addMenu - * @param {string} menuName - Name that will be displayed for the menu. Nested menus can be described using the ">" symbol. + * @param {string} menuName - Name that will be displayed for the menu. Nested menus can be specified using the + *">"
character.
* @param {string} [grouping] - Name of the grouping, if any, to add this menu to.
*
* @example true
if the menu exists, otherwise false
.
@@ -97,45 +95,44 @@ public slots:
bool menuExists(const QString& menuName);
/**jsdoc
- * Add a separator with an unclickable label below it. The separator will be placed at the bottom of the menu.
- * If you want to add a separator at a specific point in the menu, use {@link Menu.addMenuItem} with
- * {@link Menu.MenuItemProperties} instead.
+ * Adds a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. To add a
+ * separator at a specific point in the menu, use {@link Menu.addMenuItem} with {@link Menu.MenuItemProperties} instead.
* @function Menu.addSeparator
* @param {string} menuName - Name of the menu to add a separator to.
* @param {string} separatorName - Name of the separator that will be displayed as the label below the separator line.
* @example true
if the option is checked, otherwise false
.
- * @example true
, the menu item will be checked, otherwise it will not be checked.
- * @example true
if the menu is enabled, otherwise false
.
- * @example true
, the menu will be enabled, otherwise it will be disabled.
- * @example 0
being the first
+ * @property {string} menuName - Name of the menu. Nested menus can be described using the ">" symbol.
+ * @property {string} menuItemName - Name of the menu item.
+ * @property {boolean} [isCheckable=false] - Whether or not the menu item is checkable.
+ * @property {boolean} [isChecked=false] - Whether or not the menu item is checked.
+ * @property {boolean} [isSeparator=false] - Whether or not the menu item is a separator.
+ * @property {string} [shortcutKey] - A shortcut key that triggers the menu item.
+ * @property {KeyEvent} [shortcutKeyEvent] - A {@link KeyEvent} that specifies a key that triggers the menu item.
+ * @property {number} [position] - The position to place the new menu item. An integer number with 0
being the first
* menu item.
- * @property {string} [beforeItem] The name of the menu item to place this menu item before.
- * @property {string} [afterItem] The name of the menu item to place this menu item after.
- * @property {string} [grouping] The name of grouping to add this menu item to.
+ * @property {string} [beforeItem] - The name of the menu item to place this menu item before.
+ * @property {string} [afterItem] - The name of the menu item to place this menu item after.
+ * @property {string} [grouping] - The name of grouping to add this menu item to.
*/
void menuItemPropertiesFromScriptValue(const QScriptValue& object, MenuItemProperties& properties) {
properties.menuName = object.property("menuName").toVariant().toString();
From 5d87c4caad44765eec611af329f246e7616b5ad0 Mon Sep 17 00:00:00 2001
From: Sam Gateau L3eT1fB
zdU`syy=!>}H*MO41`hAY1`DgUwiZpr?c29=TZuMjP$Uwe*DRWtm?-&X1ON?q`0ydR
zP1@Adl-rkMYI6o_YHHB`Jl@{k8raDIDCg?xiYDYQzx<;7FBxH(L6RhoA3u)1MmIAv
ztEs7B)Vp%;yz>qk@~5AEs{Ahj&;b0hzu4GV4!dKM!J(m{mtTGv#RT*9^;LPDQYw-p
zZES2%v+!XMXoG9luAvEOZEY==%eg9vO$Pn_{c-fD*j!@88XFr?oA&nh_=f;2tTk)a
zplMlGSI1Q)DrfNW<;&FEDQItRXIUZsRw6Mmk!4c=aOIOvK0#AGFffp-HdW4GR#uim
z?x>C&Il`vGk&zJ-6BE>6Yilc;rU2kje}BKOt}a1L-_LpH&K*u#Ryl*Isj1Y^Dagsm
zVN+giZZ2xj)6 8S_mY%RU?(u>euf9?O)s=KI(;aYq2_3%X+_7B1y4*fa}v_Yd3&!Qa~c1H$@6;As&
zWB+CnpA&;j3_PZ;Td2?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