PbFixture fixture = PbFixture.parseFrom(argInput);
return deserializeFixture(argBody, fixture);
}
public Fixture deserializeFixture(Body argBody, PbFixture argFixture) {
PbFixture f = argFixture;
FixtureDef fd = new FixtureDef();
fd.density = f.getDensity();
fd.filter.categoryBits = f.getFilter().getCategoryBits();
fd.filter.groupIndex = f.getFilter().getGroupIndex();
fd.filter.maskBits = f.getFilter().getMaskBits();
fd.friction = f.getFriction();
fd.isSensor = f.getSensor();
fd.restitution = f.getRestitution();
fd.shape = deserializeShape(f.getShape());
Fixture fixture = argBody.createFixture(fd);
if (listener != null && f.hasTag()) {
listener.processFixture(fixture, f.getTag());
}
return fixture;
}