diff --git a/interface/src/raypick/LaserPointer.cpp b/interface/src/raypick/LaserPointer.cpp index e5d76483df..8c34f1ab0b 100644 --- a/interface/src/raypick/LaserPointer.cpp +++ b/interface/src/raypick/LaserPointer.cpp @@ -29,9 +29,9 @@ void LaserPointer::editRenderStatePath(const std::string& state, const QVariant& auto renderState = std::static_pointer_cast(_renderStates[state]); if (renderState) { updateRenderStateOverlay(renderState->getPathID(), pathProps); - QVariant pathWidth = pathProps.toMap()["lineWidth"]; - if (pathWidth.isValid()) { - renderState->setPathWidth(pathWidth.toFloat()); + QVariant lineWidth = pathProps.toMap()["lineWidth"]; + if (lineWidth.isValid()) { + renderState->setLineWidth(lineWidth.toFloat()); } } } @@ -118,7 +118,7 @@ LaserPointer::RenderState::RenderState(const OverlayID& startID, const OverlayID { if (!_pathID.isNull()) { _pathIgnoreRays = qApp->getOverlays().getProperty(_pathID, "ignoreRayIntersection").value.toBool(); - _pathWidth = qApp->getOverlays().getProperty(_pathID, "lineWidth").value.toFloat(); + _lineWidth = qApp->getOverlays().getProperty(_pathID, "lineWidth").value.toFloat(); } } @@ -149,7 +149,7 @@ void LaserPointer::RenderState::update(const glm::vec3& origin, const glm::vec3& pathProps.insert("end", endVariant); pathProps.insert("visible", true); pathProps.insert("ignoreRayIntersection", doesPathIgnoreRays()); - pathProps.insert("lineWidth", getPathWidth() * parentScale); + pathProps.insert("lineWidth", getLineWidth() * parentScale); qApp->getOverlays().editOverlay(getPathID(), pathProps); } } diff --git a/interface/src/raypick/LaserPointer.h b/interface/src/raypick/LaserPointer.h index e5c195f9d4..9b53d8da4b 100644 --- a/interface/src/raypick/LaserPointer.h +++ b/interface/src/raypick/LaserPointer.h @@ -24,6 +24,9 @@ public: const OverlayID& getPathID() const { return _pathID; } const bool& doesPathIgnoreRays() const { return _pathIgnoreRays; } + void setLineWidth(float width) { _lineWidth = width; } + float getLineWidth() const { return _lineWidth; } + void cleanup() override; void disable() override; void update(const glm::vec3& origin, const glm::vec3& end, const glm::vec3& surfaceNormal, float parentScale, bool distanceScaleEnd, bool centerEndY, @@ -32,6 +35,8 @@ public: private: OverlayID _pathID; bool _pathIgnoreRays; + + float _lineWidth; }; LaserPointer(const QVariant& rayProps, const RenderStateMap& renderStates, const DefaultRenderStateMap& defaultRenderStates, bool hover, const PointerTriggers& triggers, diff --git a/interface/src/raypick/ParabolaPointer.h b/interface/src/raypick/ParabolaPointer.h index e4394bc509..aaae66fadf 100644 --- a/interface/src/raypick/ParabolaPointer.h +++ b/interface/src/raypick/ParabolaPointer.h @@ -79,6 +79,9 @@ public: RenderState(const OverlayID& startID, const OverlayID& endID, const glm::vec3& pathColor, float pathAlpha, float parentScale, bool isVisibleInSecondaryCamera, bool pathEnabled); + void setPathWidth(float width) { _pathWidth = width; } + float getPathWidth() const { return _pathWidth; } + void cleanup() override; void disable() override; void update(const glm::vec3& origin, const glm::vec3& end, const glm::vec3& surfaceNormal, float parentScale, bool distanceScaleEnd, bool centerEndY, @@ -88,6 +91,7 @@ public: private: int _pathID; + float _pathWidth; }; ParabolaPointer(const QVariant& rayProps, const RenderStateMap& renderStates, const DefaultRenderStateMap& defaultRenderStates, bool hover, const PointerTriggers& triggers, diff --git a/interface/src/raypick/PathPointer.h b/interface/src/raypick/PathPointer.h index 5001d3d1bd..aed6ed4f71 100644 --- a/interface/src/raypick/PathPointer.h +++ b/interface/src/raypick/PathPointer.h @@ -42,9 +42,6 @@ public: void setEndRot(const glm::quat& endRot) { _endRot = endRot; } const glm::quat& getEndRot() const { return _endRot; } - void setPathWidth(float width) { _pathWidth = width; } - float getPathWidth() const { return _pathWidth; } - virtual void cleanup(); virtual void disable(); virtual void update(const glm::vec3& origin, const glm::vec3& end, const glm::vec3& surfaceNormal, float parentScale, bool distanceScaleEnd, bool centerEndY, @@ -61,7 +58,6 @@ protected: glm::vec3 _startDim; glm::vec3 _endDim; glm::quat _endRot; - float _pathWidth; glm::quat _avgEndRot; bool _avgEndRotInitialized { false };