Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
[deleted comment]
[deleted comment]
code sample:
const QList<Object*>& World::query(const QRectF& rect, bool multiSelect) {
b2AABB aabb;
aabb.upperBound = b2Vec2(rect.left(), rect.top());
aabb.lowerBound = b2Vec2(rect.right(), rect.bottom());
m_queriedObjects.clear();
m_multiSelect = multiSelect;
printf("query:");
m_world.Query(this, aabb);
printf("\n");
return m_queriedObjects;
}
bool World::ReportFixture(b2Fixture* f) {
printf("x");
m_queriedObjects.append(static_cast<Object*>(f->GetBody()->GetUserData()));
return false;
}
sample output:
query:xx
(should only be one x)
Original comment by mnbaya...@gmail.com
on 6 Sep 2009 at 2:48
confirmed on box2d 2.1.0, rev10
Original comment by mnbaya...@gmail.com
on 6 Sep 2009 at 2:59
Original comment by erinca...@gmail.com
on 20 Sep 2009 at 10:27
Original issue reported on code.google.com by
mnbaya...@gmail.com
on 6 Sep 2009 at 2:35