Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133286

ScreenRayCaster reports hits as many times as there are LayerFilters in the framegraph

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.8, 6.8.1
    • Qt3D

    Description

      hitsChanged is emitted for every LayerFilter in the framegraph (plus one if there is a pass without it also).

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Layouts
      import QtQuick.Scene3D
      import Qt3D.Core
      import Qt3D.Render
      import Qt3D.Extras
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          Scene3D {
              id: root
              anchors.fill: parent
              entity: Entity {
                  id: scene
                  components: [renderSettings, srr]
                  Camera {
                      id: orthoCamera
                  }
                  RenderSettings {
                      id: renderSettings
                      activeFrameGraph: RenderSurfaceSelector {
                          Viewport {
                              ClearBuffers {
                                  buffers: ClearBuffers.ColorDepthBuffer
                                  clearColor: "gray"
                                  CameraSelector {
                                      camera: orthoCamera
                                      FrameGraphNode {}
                                      LayerFilter {}
                                      LayerFilter {}
                                  }
                              }
                          }
                      }
                  }
                  ScreenRayCaster {
                      id: srr
                      onHitsChanged: function(hits){
                          console.log("hits reported", hits)
                      }
                  }
              }
          }
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  srr.trigger(Qt.point(mouseX, mouseY))
              }
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes