History

more overlay wip

SamGondelman committed 7 years ago

Commit 5ce8f561 parent ca8d64b62 files · +620 −864Browse files

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

Unified · Split

interface/src/raypick/PickScriptingInterface.cpp+3−6
@@ -26,7 +26,6 @@ · 25 unmodified lines
26#include "avatar/AvatarManager.h"26#include "avatar/AvatarManager.h"
27#include "NestableTransformNode.h"27#include "NestableTransformNode.h"
28#include "avatars-renderer/AvatarTransformNode.h"28#include "avatars-renderer/AvatarTransformNode.h"
29#include "ui/overlays/OverlayTransformNode.h"
30#include "EntityTransformNode.h"29#include "EntityTransformNode.h"
31 30
32#include <ScriptEngine.h>31#include <ScriptEngine.h>
@@ -61,7 +60,7 @@ PickFilter getPickFilter(unsigned int filter) { · 28 unmodified lines
61 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.60 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
62 * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.61 * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
63 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.62 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
64 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.63 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, or a pick.
65 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)64 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)
66 * @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.65 * @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.
67 * @property {Vec3} [posOffset=Vec3.ZERO] Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral66 * @property {Vec3} [posOffset=Vec3.ZERO] Only for Joint Ray Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral
@@ -161,7 +160,7 @@ unsigned int PickScriptingInterface::createStylusPick(const QVariant& properties · 93 unmodified lines
161 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.160 * @property {boolean} [enabled=false] If this Pick should start enabled or not. Disabled Picks do not updated their pick results.
162 * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.161 * @property {number} [filter=0] The filter for this Pick to use, constructed using filter flags combined using bitwise OR.
163 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.162 * @property {number} [maxDistance=0.0] The max distance at which this Pick will intersect. 0.0 = no max. < 0.0 is invalid.
164 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.163 * @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, or a pick.
165 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)164 * @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)
166 * @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.165 * @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.
167 * @property {Vec3} [posOffset=Vec3.ZERO] Only for Joint Parabola Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral166 * @property {Vec3} [posOffset=Vec3.ZERO] Only for Joint Parabola Picks. A local joint position offset, in meters. x = upward, y = forward, z = lateral
@@ -264,7 +263,7 @@ unsigned int PickScriptingInterface::createParabolaPick(const QVariant& properti · 96 unmodified lines
264* The depth is measured in world space, but will scale with the parent if defined.263* The depth is measured in world space, but will scale with the parent if defined.
265* @property {CollisionMask} [collisionGroup=8] - The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group264* @property {CollisionMask} [collisionGroup=8] - The type of object this collision pick collides as. Objects whose collision masks overlap with the pick's collision group
266* will be considered colliding with the pick.265* will be considered colliding with the pick.
267* @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, an overlay, or a pick.266* @property {Uuid} parentID - The ID of the parent, either an avatar, an entity, or a pick.
268* @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)267* @property {number} [parentJointIndex=0] - The joint of the parent to parent to, for example, the joints on the model of an avatar. (default = 0, no joint)
269* @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.268* @property {string} joint - If "Mouse," parents the pick to the mouse. If "Avatar," parents the pick to MyAvatar's head. Otherwise, parents to the joint of the given name on MyAvatar.
270* @property {boolean} [scaleWithParent=true] If true, the collision pick's dimensions and threshold will adjust according to the scale of the parent.269* @property {boolean} [scaleWithParent=true] If true, the collision pick's dimensions and threshold will adjust according to the scale of the parent.
@@ -415,8 +414,6 @@ void PickScriptingInterface::setParentTransform(std::shared_ptr<PickQuery> pick, · 144 unmodified lines
415 NestableType nestableType = sharedNestablePointer->getNestableType();414 NestableType nestableType = sharedNestablePointer->getNestableType();
416 if (nestableType == NestableType::Avatar) {415 if (nestableType == NestableType::Avatar) {
417 pick->parentTransform = std::make_shared<AvatarTransformNode>(std::static_pointer_cast<Avatar>(sharedNestablePointer), parentJointIndex);416 pick->parentTransform = std::make_shared<AvatarTransformNode>(std::static_pointer_cast<Avatar>(sharedNestablePointer), parentJointIndex);
418 } else if (nestableType == NestableType::Overlay) {
419 pick->parentTransform = std::make_shared<OverlayTransformNode>(std::static_pointer_cast<Base3DOverlay>(sharedNestablePointer), parentJointIndex);
420 } else if (nestableType == NestableType::Entity) {417 } else if (nestableType == NestableType::Entity) {
421 pick->parentTransform = std::make_shared<EntityTransformNode>(std::static_pointer_cast<EntityItem>(sharedNestablePointer), parentJointIndex);418 pick->parentTransform = std::make_shared<EntityTransformNode>(std::static_pointer_cast<EntityItem>(sharedNestablePointer), parentJointIndex);
422 } else {419 } else {