History

Picks API JSDoc stubs

David Rowe committed 8 years ago

Commit 3fb6fd11 parent 8ea3a732 files · +122 −40Browse files

Showing the changes to interface/src/raypick/PickScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/raypick/PickScriptingInterface.cpp+22−0
@@ -31,6 +31,20 @@ unsigned int PickScriptingInterface::createPick(const PickQuery::PickType type, · 30 unmodified lines
31 }31 }
32}32}
33 33
34/**jsdoc
35 * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.
36 * @typedef {object} Picks.RayPickProperties
37 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
38 * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
39 * @property {float} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
40 * @property {string} [joint] Only for Joint or Mouse Ray Picks. If "Mouse", it will create a Ray Pick that follows the system mouse, in desktop or HMD.
41 * If "Avatar", it will create a Joint Ray Pick that follows your avatar's head. Otherwise, it will create a Joint Ray Pick that follows the given joint, if it
42 * exists on your current avatar.
43 * @property {Vec3} [posOffset=Vec3.ZERO] Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral
44 * @property {Vec3} [dirOffset=Vec3.UP] Only for Joint Ray Picks. A local joint direction offset. x = upward, y = forward, z = lateral
45 * @property {Vec3} [position] Only for Static Ray Picks. The world-space origin of the ray.
46 * @property {Vec3} [direction=-Vec3.UP] Only for Static Ray Picks. The world-space direction of the ray.
47 */
34unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) {48unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) {
35 QVariantMap propMap = properties.toMap();49 QVariantMap propMap = properties.toMap();
36 50
@@ -83,6 +97,14 @@ unsigned int PickScriptingInterface::createRayPick(const QVariant& properties) { · 46 unmodified lines
83 return PickManager::INVALID_PICK_ID;97 return PickManager::INVALID_PICK_ID;
84}98}
85 99
100/**jsdoc
101 * A set of properties that can be passed to {@link Picks.createPick} to create a new Ray Pick.
102 * @typedef {object} Picks.StylusPickProperties
103 * @property {number} [hand=-1] An integer. 0 == left, 1 == right. Invalid otherwise.
104 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
105 * @property {number} [filter=Picks.PICK_NOTHING] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
106 * @property {float} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
107 */
86unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) {108unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties) {
87 QVariantMap propMap = properties.toMap();109 QVariantMap propMap = properties.toMap();
88 110

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t