Showing the changes to interface/src/raypick/PointerScriptingInterface.cpp (1 of 10 files). Show all
Unified · Split
| @@ -15,6 +15,7 @@ · 14 unmodified lines | |||
| 15 | #include "Application.h" | 15 | #include "Application.h" |
| 16 | #include "LaserPointer.h" | 16 | #include "LaserPointer.h" |
| 17 | #include "StylusPointer.h" | 17 | #include "StylusPointer.h" |
| 18 | #include "ParabolaPointer.h" | ||
| 18 | 19 | ||
| 19 | void PointerScriptingInterface::setIgnoreItems(unsigned int uid, const QScriptValue& ignoreItems) const { | 20 | void PointerScriptingInterface::setIgnoreItems(unsigned int uid, const QScriptValue& ignoreItems) const { |
| 20 | DependencyManager::get<PointerManager>()->setIgnoreItems(uid, qVectorQUuidFromScriptValue(ignoreItems)); | 21 | DependencyManager::get<PointerManager>()->setIgnoreItems(uid, qVectorQUuidFromScriptValue(ignoreItems)); |
| @@ -239,8 +240,6 @@ unsigned int PointerScriptingInterface::createLaserPointer(const QVariant& prope · 218 unmodified lines | |||
| 239 | * @property {Pointers.Trigger[]} [triggers] A list of different triggers mechanisms that control this Pointer's click event generation. | 240 | * @property {Pointers.Trigger[]} [triggers] A list of different triggers mechanisms that control this Pointer's click event generation. |
| 240 | */ | 241 | */ |
| 241 | unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& properties) const { | 242 | unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& properties) const { |
| 242 | return 0; | ||
| 243 | #if 0 | ||
| 244 | QVariantMap propertyMap = properties.toMap(); | 243 | QVariantMap propertyMap = properties.toMap(); |
| 245 | 244 | ||
| 246 | bool faceAvatar = false; | 245 | bool faceAvatar = false; |
| @@ -278,7 +277,7 @@ unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& pr · 31 unmodified lines | |||
| 278 | enabled = propertyMap["enabled"].toBool(); | 277 | enabled = propertyMap["enabled"].toBool(); |
| 279 | } | 278 | } |
| 280 | 279 | ||
| 281 | ParabolaPointer::RenderStateMap renderStates; | 280 | RenderStateMap renderStates; |
| 282 | if (propertyMap["renderStates"].isValid()) { | 281 | if (propertyMap["renderStates"].isValid()) { |
| 283 | QList<QVariant> renderStateVariants = propertyMap["renderStates"].toList(); | 282 | QList<QVariant> renderStateVariants = propertyMap["renderStates"].toList(); |
| 284 | for (const QVariant& renderStateVariant : renderStateVariants) { | 283 | for (const QVariant& renderStateVariant : renderStateVariants) { |
| @@ -292,7 +291,7 @@ unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& pr · 7 unmodified lines | |||
| 292 | } | 291 | } |
| 293 | } | 292 | } |
| 294 | 293 | ||
| 295 | ParabolaPointer::DefaultRenderStateMap defaultRenderStates; | 294 | DefaultRenderStateMap defaultRenderStates; |
| 296 | if (propertyMap["defaultRenderStates"].isValid()) { | 295 | if (propertyMap["defaultRenderStates"].isValid()) { |
| 297 | QList<QVariant> renderStateVariants = propertyMap["defaultRenderStates"].toList(); | 296 | QList<QVariant> renderStateVariants = propertyMap["defaultRenderStates"].toList(); |
| 298 | for (const QVariant& renderStateVariant : renderStateVariants) { | 297 | for (const QVariant& renderStateVariant : renderStateVariants) { |
| @@ -301,7 +300,7 @@ unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& pr · 2 unmodified lines | |||
| 301 | if (renderStateMap["name"].isValid() && renderStateMap["distance"].isValid()) { | 300 | if (renderStateMap["name"].isValid() && renderStateMap["distance"].isValid()) { |
| 302 | std::string name = renderStateMap["name"].toString().toStdString(); | 301 | std::string name = renderStateMap["name"].toString().toStdString(); |
| 303 | float distance = renderStateMap["distance"].toFloat(); | 302 | float distance = renderStateMap["distance"].toFloat(); |
| 304 | defaultRenderStates[name] = std::pair<float, ParabolaPointer::RenderState>(distance, ParabolaPointer::buildRenderState(renderStateMap)); | 303 | defaultRenderStates[name] = std::pair<float, std::shared_ptr<StartEndRenderState>>(distance, ParabolaPointer::buildRenderState(renderStateMap)); |
| 305 | } | 304 | } |
| 306 | } | 305 | } |
| 307 | } | 306 | } |
| @@ -333,7 +332,6 @@ unsigned int PointerScriptingInterface::createParabolaPointer(const QVariant& pr · 25 unmodified lines | |||
| 333 | return DependencyManager::get<PointerManager>()->addPointer(std::make_shared<ParabolaPointer>(properties, renderStates, defaultRenderStates, hover, triggers, | 332 | return DependencyManager::get<PointerManager>()->addPointer(std::make_shared<ParabolaPointer>(properties, renderStates, defaultRenderStates, hover, triggers, |
| 334 | faceAvatar, followNormal, centerEndY, lockEnd, distanceScaleEnd, | 333 | faceAvatar, followNormal, centerEndY, lockEnd, distanceScaleEnd, |
| 335 | scaleWithAvatar, enabled)); | 334 | scaleWithAvatar, enabled)); |
| 336 | #endif | ||
| 337 | } | 335 | } |
| 338 | 336 | ||
| 339 | void PointerScriptingInterface::editRenderState(unsigned int uid, const QString& renderState, const QVariant& properties) const { | 337 | void PointerScriptingInterface::editRenderState(unsigned int uid, const QString& renderState, const QVariant& properties) const { |