예제 #1
0
 @Override
 public boolean reportFixture(Fixture fixture) {
   // if the hit point is inside the fixture of the body
   // we report it
   if (fixture.testPoint(testPoint.x, testPoint.y)) {
     hitBody = fixture.getBody();
     return false;
   } else return true;
 }
예제 #2
0
 public boolean IsClicked(float wx, float wy) {
   List<Fixture> flist = body.getFixtureList();
   Boolean present = false;
   wx = BoxObjectManager.ConvertToBox(wx);
   wy = BoxObjectManager.ConvertToBox(wy);
   for (Fixture f : flist) {
     present = f.testPoint(wx, wy);
     if (present) return present;
   }
   return present;
 }
예제 #3
0
        @Override
        public boolean reportFixture(Fixture fixture) {
          // if the hit fixture's body is the ground body
          // we ignore it
          if (fixture.getBody() == groundBody) return true;

          // if the hit point is inside the fixture of the body
          // we report it
          if (fixture.testPoint(testPoint.x, testPoint.y)) {
            hitBody = fixture.getBody();
            return false;
          } else return true;
        }