Showing the changes to interface/src/raypick/PointerScriptingInterface.cpp (1 of 15 files). Show all
Unified · Split
| @@ -25,7 +25,6 @@ · 24 unmodified lines | ||
| 25 | 25 | #include <ScriptManager.h> |
| 26 | 26 | |
| 27 | 27 | STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){ |
| 28 | − qDebug() << "STATIC_SCRIPT_TYPES_INITIALIZER PointerScriptingInterface"; | |
| 29 | 28 | auto scriptEngine = manager->engine().get(); |
| 30 | 29 | scriptRegisterMetaType<RayPointerProperties, rayPointerPropertiesToScriptValue, rayPointerPropertiesFromScriptValue>(scriptEngine); |
| 31 | 30 | scriptRegisterMetaType<StylusPointerProperties, stylusPointerPropertiesToScriptValue, stylusPointerPropertiesFromScriptValue>(scriptEngine); |
| @@ -92,7 +91,6 @@ unsigned int PointerScriptingInterface::createParabolaPointer(ParabolaPointerPro · 60 unmodified lines | ||
| 92 | 91 | return createPointerInternal(PickQuery::PickType::Parabola, properties); |
| 93 | 92 | } |
| 94 | 93 | |
| 95 | − | |
| 96 | 94 | bool PointerScriptingInterface::isPointerEnabled(unsigned int uid) const { |
| 97 | 95 | return DependencyManager::get<PointerManager>()->isPointerEnabled(uid); |
| 98 | 96 | } |
| @@ -178,45 +176,45 @@ std::shared_ptr<Pointer> PointerScriptingInterface::buildStylus(const PointerPro · 79 unmodified lines | ||
| 178 | 176 | * Properties that define the visual appearance of a ray pointer when the pointer is intersecting something. |
| 179 | 177 | * @typedef {object} Pointers.RayPointerRenderState |
| 180 | 178 | * @property {string} name - When creating using {@link Pointers.createPointer}, the name of the render state. |
| 181 | − * @property {Overlays.OverlayProperties|Uuid} [start] | |
| 179 | + * @property {Entities.EntityProperties|Uuid} [start] | |
| 182 | 180 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 183 | − * an overlay to render at the start of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 184 | − * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the overlay rendered at the start of the ray; | |
| 185 | − * <code>null</code> if there is no overlay. | |
| 181 | + * an entity to render at the start of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 182 | + * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the entity rendered at the start of the ray; | |
| 183 | + * <code>null</code> if there is no entity. | |
| 186 | 184 | * |
| 187 | − * @property {Overlays.OverlayProperties|Uuid} [path] | |
| 185 | + * @property {Entities.EntityProperties|Uuid} [path] | |
| 188 | 186 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 189 | − * the overlay rendered for the path of the ray pointer. The <code>type</code> property must be specified and be | |
| 190 | − * <code>"line3d"</code>.</p> | |
| 191 | − * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the overlay rendered for the path of the ray; | |
| 192 | − * <code>null</code> if there is no overlay. | |
| 187 | + * the entity rendered for the path of the ray pointer. The <code>type</code> property must be specified and be | |
| 188 | + * <code>"PolyLine"</code>.</p> Specify <code>linePoints</code> to control how many segments make up the path. | |
| 189 | + * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the entity rendered for the path of the ray; | |
| 190 | + * <code>null</code> if there is no entity. | |
| 193 | 191 | * |
| 194 | − * @property {Overlays.OverlayProperties|Uuid} [end] | |
| 192 | + * @property {Entities.EntityProperties|Uuid} [end] | |
| 195 | 193 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 196 | − * an overlay to render at the end of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 197 | − * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the overlay rendered at the end of the ray; | |
| 198 | − * <code>null</code> if there is no overlay. | |
| 194 | + * an entity to render at the end of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 195 | + * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the entity rendered at the end of the ray; | |
| 196 | + * <code>null</code> if there is no entity. | |
| 199 | 197 | */ |
| 200 | 198 | /*@jsdoc |
| 201 | 199 | * The properties of a ray pointer. These include the properties from the underlying ray pick that the pointer uses. |
| 202 | 200 | * @typedef {object} Pointers.RayPointerProperties |
| 203 | − * @property {boolean} [faceAvatar=false] - <code>true</code> if the overlay rendered at the end of the ray rotates about the | |
| 201 | + * @property {boolean} [faceAvatar=false] - <code>true</code> if the entity rendered at the end of the ray rotates about the | |
| 204 | 202 | * world y-axis to always face the avatar; <code>false</code> if it maintains its world orientation. |
| 205 | − * @property {boolean} [centerEndY=true] - <code>true</code> if the overlay rendered at the end of the ray is centered on | |
| 206 | − * the ray end; <code>false</code> if the overlay is positioned against the surface if <code>followNormal</code> is | |
| 203 | + * @property {boolean} [centerEndY=true] - <code>true</code> if the entity rendered at the end of the ray is centered on | |
| 204 | + * the ray end; <code>false</code> if the entity is positioned against the surface if <code>followNormal</code> is | |
| 207 | 205 | * <code>true</code>, or above the ray end if <code>followNormal</code> is <code>false</code>. |
| 208 | 206 | * @property {boolean} [lockEnd=false] - <code>true</code> if the end of the ray is locked to the center of the object at |
| 209 | 207 | * which the ray is pointing; <code>false</code> if the end of the ray is at the intersected surface. |
| 210 | − * @property {boolean} [distanceScaleEnd=false] - <code>true</code> if the dimensions of the overlay at the end of the ray | |
| 208 | + * @property {boolean} [distanceScaleEnd=false] - <code>true</code> if the dimensions of the entity at the end of the ray | |
| 211 | 209 | * scale linearly with distance; <code>false</code> if they aren't. |
| 212 | 210 | * @property {boolean} [scaleWithParent=false] - <code>true</code> if the width of the ray's path and the size of the |
| 213 | − * start and end overlays scale linearly with the pointer parent's scale; <code>false</code> if they don't scale. | |
| 211 | + * start and end entities scale linearly with the pointer parent's scale; <code>false</code> if they don't scale. | |
| 214 | 212 | * @property {boolean} [scaleWithAvatar=false] - A synonym for <code>scalewithParent</code>. |
| 215 | 213 | * <p class="important">Deprecated: This property is deprecated and will be removed.</p> |
| 216 | − * @property {boolean} [followNormal=false] - <code>true</code> if the overlay rendered at the end of the ray rotates to | |
| 214 | + * @property {boolean} [followNormal=false] - <code>true</code> if the entity rendered at the end of the ray rotates to | |
| 217 | 215 | * follow the normal of the surface if one is intersected; <code>false</code> if it doesn't. |
| 218 | − * @property {number} [followNormalStrength=0.0] - How quickly the overlay rendered at the end of the ray rotates to follow | |
| 219 | − * the normal of an intersected surface. If <code>0</code> or <code>1</code>, the overlay rotation follows instantaneously; | |
| 216 | + * @property {number} [followNormalStrength=0.0] - How quickly the entity rendered at the end of the ray rotates to follow | |
| 217 | + * the normal of an intersected surface. If <code>0</code> or <code>1</code>, the entity rotation follows instantaneously; | |
| 220 | 218 | * for other values, the larger the value the more quickly the rotation follows. |
| 221 | 219 | * @property {Pointers.RayPointerRenderState[]|Object.<string, Pointers.RayPointerRenderState>} [renderStates] |
| 222 | 220 | * <p>A set of visual states that can be switched among using {@link Pointers.setRenderState}. These define the visual |
| @@ -236,7 +234,7 @@ std::shared_ptr<Pointer> PointerScriptingInterface::buildStylus(const PointerPro · 13 unmodified lines | ||
| 236 | 234 | * @property {boolean} [hover=false] - <code>true</code> if the pointer generates {@link Entities} hover events, |
| 237 | 235 | * <code>false</code> if it doesn't. |
| 238 | 236 | * @property {Pointers.Trigger[]} [triggers=[]] - A list of ways that a {@link Controller} action or function should trigger |
| 239 | − * events on the entity or overlay currently intersected. | |
| 237 | + * events on the object currently intersected. | |
| 240 | 238 | * @property {PickType} pointerType - The type of pointer returned from {@link Pointers.getPointerProperties} or |
| 241 | 239 | * {@link Pointers.getPointerScriptParameters}. A laser pointer's type is {@link PickType(0)|PickType.Ray}. |
| 242 | 240 | * @property {number} [pickID] - The ID of the pick created alongside this pointer, returned from |
| @@ -378,41 +376,41 @@ std::shared_ptr<Pointer> PointerScriptingInterface::buildLaserPointer(const Poin · 135 unmodified lines | ||
| 378 | 376 | * Properties that define the visual appearance of a parabola pointer when the pointer is intersecting something. |
| 379 | 377 | * @typedef {object} Pointers.ParabolaPointerRenderState |
| 380 | 378 | * @property {string} name - When creating using {@link Pointers.createPointer}, the name of the render state. |
| 381 | − * @property {Overlays.OverlayProperties|Uuid} [start] | |
| 379 | + * @property {Entities.EntityProperties|Uuid} [start] | |
| 382 | 380 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 383 | − * an overlay to render at the start of the parabola pointer. The <code>type</code> property must be specified.</p> | |
| 384 | − * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the overlay rendered at the start of the | |
| 385 | − * parabola; <code>null</code> if there is no overlay. | |
| 381 | + * an entity to render at the start of the parabola pointer. The <code>type</code> property must be specified.</p> | |
| 382 | + * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the entity rendered at the start of the | |
| 383 | + * parabola; <code>null</code> if there is no entity. | |
| 386 | 384 | * @property {Pointers.ParabolaPointerPath|Uuid} [path] |
| 387 | 385 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 388 | 386 | * the rendered path of the parabola pointer.</p> |
| 389 | 387 | * <p>This property is not provided when getting using {@link Pointers.getPointerProperties}. |
| 390 | − * @property {Overlays.OverlayProperties|Uuid} [end] | |
| 388 | + * @property {Entities.EntityProperties|Uuid} [end] | |
| 391 | 389 | * <p>When creating or editing using {@link Pointers.createPointer} or {@link Pointers.editRenderState}, the properties of |
| 392 | − * an overlay to render at the end of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 393 | − * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the overlay rendered at the end of the parabola; | |
| 394 | − * <code>null</code> if there is no overlay. | |
| 390 | + * an entity to render at the end of the ray pointer. The <code>type</code> property must be specified.</p> | |
| 391 | + * <p>When getting using {@link Pointers.getPointerProperties}, the ID of the entity rendered at the end of the parabola; | |
| 392 | + * <code>null</code> if there is no entity. | |
| 395 | 393 | */ |
| 396 | 394 | /*@jsdoc |
| 397 | 395 | * The properties of a parabola pointer. These include the properties from the underlying parabola pick that the pointer uses. |
| 398 | 396 | * @typedef {object} Pointers.ParabolaPointerProperties |
| 399 | − * @property {boolean} [faceAvatar=false] - <code>true</code> if the overlay rendered at the end of the ray rotates about the | |
| 397 | + * @property {boolean} [faceAvatar=false] - <code>true</code> if the entity rendered at the end of the ray rotates about the | |
| 400 | 398 | * world y-axis to always face the avatar; <code>false</code> if it maintains its world orientation. |
| 401 | − * @property {boolean} [centerEndY=true] - <code>true</code> if the overlay rendered at the end of the ray is centered on | |
| 402 | − * the ray end; <code>false</code> if the overlay is positioned against the surface if <code>followNormal</code> is | |
| 399 | + * @property {boolean} [centerEndY=true] - <code>true</code> if the entity rendered at the end of the ray is centered on | |
| 400 | + * the ray end; <code>false</code> if the entity is positioned against the surface if <code>followNormal</code> is | |
| 403 | 401 | * <code>true</code>, or above the ray end if <code>followNormal</code> is <code>false</code>. |
| 404 | 402 | * @property {boolean} [lockEnd=false] - <code>true</code> if the end of the ray is locked to the center of the object at |
| 405 | 403 | * which the ray is pointing; <code>false</code> if the end of the ray is at the intersected surface. |
| 406 | − * @property {boolean} [distanceScaleEnd=false] - <code>true</code> if the dimensions of the overlay at the end of the ray | |
| 404 | + * @property {boolean} [distanceScaleEnd=false] - <code>true</code> if the dimensions of the entity at the end of the ray | |
| 407 | 405 | * scale linearly with distance; <code>false</code> if they aren't. |
| 408 | 406 | * @property {boolean} [scaleWithParent=false] - <code>true</code> if the width of the ray's path and the size of the |
| 409 | − * start and end overlays scale linearly with the pointer parent's scale; <code>false</code> if they don't scale. | |
| 407 | + * start and end entities scale linearly with the pointer parent's scale; <code>false</code> if they don't scale. | |
| 410 | 408 | * @property {boolean} [scaleWithAvatar=false] - A synonym for <code>scalewithParent</code>. |
| 411 | 409 | * <p class="important">Deprecated: This property is deprecated and will be removed.</p> |
| 412 | − * @property {boolean} [followNormal=false] - <code>true</code> if the overlay rendered at the end of the ray rotates to | |
| 410 | + * @property {boolean} [followNormal=false] - <code>true</code> if the entity rendered at the end of the ray rotates to | |
| 413 | 411 | * follow the normal of the surface if one is intersected; <code>false</code> if it doesn't. |
| 414 | − * @property {number} [followNormalStrength=0.0] - How quickly the overlay rendered at the end of the ray rotates to follow | |
| 415 | − * the normal of an intersected surface. If <code>0</code> or <code>1</code>, the overlay rotation follows instantaneously; | |
| 412 | + * @property {number} [followNormalStrength=0.0] - How quickly the entity rendered at the end of the ray rotates to follow | |
| 413 | + * the normal of an intersected surface. If <code>0</code> or <code>1</code>, the entity rotation follows instantaneously; | |
| 416 | 414 | * for other values, the larger the value the more quickly the rotation follows. |
| 417 | 415 | * @property {Pointers.ParabolaPointerRenderState[]|Object.<string, Pointers.ParabolaPointerRenderState>} [renderStates] |
| 418 | 416 | * <p>A set of visual states that can be switched among using {@link Pointers.setRenderState}. These define the visual |
| @@ -432,7 +430,7 @@ std::shared_ptr<Pointer> PointerScriptingInterface::buildLaserPointer(const Poin · 13 unmodified lines | ||
| 432 | 430 | * @property {boolean} [hover=false] - <code>true</code> if the pointer generates {@link Entities} hover events, |
| 433 | 431 | * <code>false</code> if it doesn't. |
| 434 | 432 | * @property {Pointers.Trigger[]} [triggers=[]] - A list of ways that a {@link Controller} action or function should trigger |
| 435 | − * events on the entity or overlay currently intersected. | |
| 433 | + * events on the object currently intersected. | |
| 436 | 434 | * @property {PickType} pointerType - The type of pointer returned from {@link Pointers.getPointerProperties} or |
| 437 | 435 | * {@link Pointers.getPointerScriptParameters}. A parabola pointer's type is {@link PickType(0)|PickType.Parabola}. |
| 438 | 436 | * @property {number} [pickID] - The ID of the pick created alongside this pointer, returned from |
| @@ -622,7 +620,6 @@ bool rayPointerPropertiesFromScriptValue(const ScriptValue& value, RayPointerPro · 183 unmodified lines | ||
| 622 | 620 | out.properties[*renderStatesName].setValue(renderStates); |
| 623 | 621 | } |
| 624 | 622 | } |
| 625 | − qDebug() << "rayPointerPropertiesFromScriptValue" << out.properties; | |
| 626 | 623 | return true; |
| 627 | 624 | } |
| 628 | 625 | |
| @@ -675,7 +672,6 @@ bool stylusPointerPropertiesFromScriptValue(const ScriptValue& value, StylusPoin · 46 unmodified lines | ||
| 675 | 672 | out.properties[*renderStatesName].setValue(renderStates); |
| 676 | 673 | } |
| 677 | 674 | } |
| 678 | − qDebug() << "stylusPointerPropertiesFromScriptValue" << out.properties; | |
| 679 | 675 | return true; |
| 680 | 676 | } |
| 681 | 677 | |
| @@ -714,7 +710,6 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola · 32 unmodified lines | ||
| 714 | 710 | pathProperties.copyFromScriptValue(path, false); |
| 715 | 711 | stateMap.insert("pathPropertyIndex", QVariant(out.entityProperties.length())); |
| 716 | 712 | out.entityProperties.append(pathProperties); |
| 717 | − qDebug() << "parabolaPointerPropertiesFromScriptValue : added path entity"; | |
| 718 | 713 | } |
| 719 | 714 | |
| 720 | 715 | if (stateMap["end"].isValid()) { |
| @@ -723,7 +718,6 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola · 2 unmodified lines | ||
| 723 | 718 | endProperties.copyFromScriptValue(end, false); |
| 724 | 719 | stateMap.insert("endPropertyIndex", QVariant(out.entityProperties.length())); |
| 725 | 720 | out.entityProperties.append(endProperties); |
| 726 | − qDebug() << "parabolaPointerPropertiesFromScriptValue : added end entity"; | |
| 727 | 721 | } |
| 728 | 722 | renderStates[i].setValue(stateMap); |
| 729 | 723 | } |
| @@ -731,6 +725,5 @@ bool parabolaPointerPropertiesFromScriptValue(const ScriptValue& value, Parabola · 1 unmodified line | ||
| 731 | 725 | out.properties[*renderStatesName].setValue(renderStates); |
| 732 | 726 | } |
| 733 | 727 | } |
| 734 | − qDebug() << "parabolaPointerPropertiesFromScriptValue" << out.properties; | |
| 735 | 728 | return true; |
| 736 | 729 | } |