title: Clean way to detect collision of object with box2d
body: <p>I have been looking into box2d (in java with libgdx) lately and have been trying to create my own custom bounce effect (I increase the <code>Restitution</code> after the first bounce)</p>
  
  <p>To do this as a test I simply checked the location of the object and waited for the first bounce.</p>
  
  <p>But now I wanted to actually implement this and came across a problem: How to detect the collision of 2 specific object in box2d?</p>
  
  <p>I found this tutorial: 
  <a href="http://blog.allanbishop.com/box2d-2-1a-tutorial-%E2%80%93-part-4-collision-detection/" rel="nofollow">box2d collision detection</a> - but I am very reluctant to use that code. There must be a simpler and cleaner way to detect a collision between 2 objects (without having to set user data and checking all collisions with giant <code>if()</code> conditions...)</p>
  
  <p>Can anyone help me out?  (assuming I am not just hopeful and there actually is a better way)</p>