Results 1 to 2 of 2

Thread: Painting and collision detection

  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Painting and collision detection

    I have a graphics item. While painting I want to paint the whole item, but while collision detection, I want a smaller part of the item to be used . Is ther some way to do it ? If i set the bounding rect as a smaller part of the item and paint the whole item, behaviour is undefiined.

    I have a scene where items's boundaries overlap. I dont want collision detection to return true if ONLY boundaries overlap. hence the above paint confusion

    any help

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Painting and collision detection

    For collision detection the QGraphicsItem::shape() method is used.

  3. The following user says thank you to wysota for this useful post:

    aamer4yu (18th October 2006)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.