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