Пример #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;
        }