/// <inheritdoc />
        public override void OnPostSceneQuery()
        {
            base.OnPostSceneQuery();

            if (!LineBase.enabled)
            {
                return;
            }

            BaseMixedRealityLineRenderer lineToShow = lineRendererNoTarget;

            // Make the line solid when pressed
            if (IsSelectPressed)
            {
                lineToShow = lineRendererSelected;
            }

            // Hide every line renderer except the contextual one
            foreach (BaseMixedRealityLineRenderer lineRenderer in LineRenderers)
            {
                lineRenderer.enabled = lineRenderer == lineToShow;
            }
        }
        /// <inheritdoc />
        public override void OnPostSceneQuery()
        {
            if (IsSelectPressed)
            {
                MixedRealityToolkit.InputSystem.RaisePointerDragged(this, MixedRealityInputAction.None, Handedness);
            }

            Gradient lineColor = LineColorNoTarget;
            BaseMixedRealityLineRenderer contextRenderer = null;

            if (!IsActive)
            {
                LineBase.enabled = false;
                BaseCursor?.SetVisibility(false);
                return;
            }

            contextRenderer  = lineRendererNoTarget;
            LineBase.enabled = true;
            BaseCursor?.SetVisibility(true);

            float clearWorldLength;
            float cursorOffsetWorldLength = (BaseCursor != null) ? BaseCursor.SurfaceCursorDistance : 0;

            // If we hit something
            if (Result?.CurrentPointerTarget != null)
            {
                clearWorldLength = Result.Details.RayDistance;

                lineColor       = LineColorValid;
                contextRenderer = lineRendererSelected;
            }
            else
            {
                clearWorldLength = DefaultPointerExtent;

                lineColor       = IsSelectPressed ? LineColorSelected : LineColorNoTarget;
                contextRenderer = IsSelectPressed ? lineRendererSelected : lineRendererNoTarget;
            }

            if (IsFocusLocked)
            {
                lineColor       = LineColorLockFocus;
                contextRenderer = lineRendererSelected;
            }

            int maxClampLineSteps = LineCastResolution;

            foreach (BaseMixedRealityLineRenderer lineRenderer in LineRenderers)
            {
                // Otherwise, enable the renderer we chose
                if (lineRenderer == contextRenderer)
                {
                    lineRenderer.enabled = true;
                    maxClampLineSteps    = Mathf.Max(maxClampLineSteps, lineRenderer.LineStepCount);
                }
                else
                {
                    lineRenderer.enabled = false;
                }

                // Set colors on all line renderers regardless of context
                lineRenderer.LineColor = lineColor;
            }

            // If focus and target point is locked, we're sticking to the target
            // So don't clamp the world length
            if (IsFocusLocked && IsTargetPositionLockedOnFocusLock)
            {
                float cursorOffsetLocalLength = LineBase.GetNormalizedLengthFromWorldLength(cursorOffsetWorldLength);
                LineBase.LineEndClamp = 1 - cursorOffsetLocalLength;
            }
            else
            {
                // Otherwise clamp the line end by the clear distance
                float clearLocalLength = LineBase.GetNormalizedLengthFromWorldLength(clearWorldLength - cursorOffsetWorldLength, maxClampLineSteps);
                LineBase.LineEndClamp = clearLocalLength;
            }
        }