Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is there any example of collision among two rectangles?
Forum Updated to NodeBB v4.3 + New Features

Is there any example of collision among two rectangles?

Scheduled Pinned Locked Moved General and Desktop
collisions
4 Posts 4 Posters 1.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Cold_DistanceC Offline
    Cold_DistanceC Offline
    Cold_Distance
    wrote on last edited by
    #1

    I was trying to collide two animated rectangles since a long ago, and I don't find any way to get it.

    If someone wants to help me...

    JKSHJ 1 Reply Last reply
    0
    • B Offline
      B Offline
      belab
      wrote on last edited by
      #2

      Not sure what you mean. Do you want find out if they are colliding? Then you could use e.g. http://doc.qt.io/qt-5/qrect.html#intersected
      or have a look at the source how it's implemented.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alex_malyu
        wrote on last edited by alex_malyu
        #3

        There are C++ libraries like
        http://bulletphysics.org/mediawiki-1.5.8/index.php/Bullet_User_Manual_and_API_documentation

        1 Reply Last reply
        0
        • Cold_DistanceC Cold_Distance

          I was trying to collide two animated rectangles since a long ago, and I don't find any way to get it.

          If someone wants to help me...

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Cold_Distance said:

          I was trying to collide two animated rectangles since a long ago, and I don't find any way to get it.

          What technology are you using? The Qt Graphics View Framework? Qt Quick? OpenGL? Something else?

          Here's a Graphics View Framework example: http://doc.qt.io/qt-5/qtwidgets-graphicsview-collidingmice-example.html

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved