diff --git a/game/src/main/java/com/capdevon/physx/PhysxQuery.java b/game/src/main/java/com/capdevon/physx/PhysxQuery.java index 934a125..7953dc0 100644 --- a/game/src/main/java/com/capdevon/physx/PhysxQuery.java +++ b/game/src/main/java/com/capdevon/physx/PhysxQuery.java @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Predicate; -import java.util.logging.Logger; import com.jme3.bullet.PhysicsSpace; import com.jme3.bullet.objects.PhysicsRigidBody; @@ -14,9 +13,7 @@ * @author capdevon */ public class PhysxQuery { - - private static final Logger logger = Logger.getLogger(PhysxQuery.class.getName()); - + /** * DefaultRaycastLayers */ @@ -29,19 +26,21 @@ public class PhysxQuery { /** * A private constructor to inhibit instantiation of this class. */ - private PhysxQuery() {} - + private PhysxQuery() { + } + /** * Computes and stores colliders inside the sphere. * - * @param position - Center of the sphere. - * @param radius - Radius of the sphere. - * @param layerMask - A Layer mask defines which layers of colliders to include in the query. - * @param func - Specifies a function to filter colliders. + * @param position Center of the sphere. + * @param radius Radius of the sphere. + * @param layerMask A Layer mask defines which layers of colliders to include in the query. + * @param func Specifies a function to filter colliders. * @return Returns an array with all PhysicsRigidBody touching or inside the - * sphere. + * sphere. */ - public static List checkSphere(Vector3f position, float radius, int layerMask, Predicate func) { + public static List checkSphere(Vector3f position, float radius, int layerMask, + Predicate func) { List results = new ArrayList<>(10); for (PhysicsRigidBody pco : PhysicsSpace.getPhysicsSpace().getRigidBodyList()) { @@ -56,7 +55,7 @@ public static List checkSphere(Vector3f position, float radius } return results; } - + public static List checkSphere(Vector3f position, float radius, int layerMask) { return checkSphere(position, radius, layerMask, IdentityFunction); } @@ -64,19 +63,20 @@ public static List checkSphere(Vector3f position, float radius public static List checkSphere(Vector3f position, float radius) { return checkSphere(position, radius, ALL_LAYERS, IdentityFunction); } - + /** * Computes and stores colliders inside the sphere into the provided buffer. * Does not attempt to grow the buffer if it runs out of space. * - * @param position - Center of the sphere. - * @param radius - Radius of the sphere. - * @param results - The buffer to store the results into. - * @param layerMask - A Layer mask defines which layers of colliders to include in the query. - * @param func - Specifies a function to filter colliders. + * @param position Center of the sphere. + * @param radius Radius of the sphere. + * @param results The buffer to store the results into. + * @param layerMask A Layer mask defines which layers of colliders to include in the query. + * @param func Specifies a function to filter colliders. * @return Returns the amount of colliders stored into the results buffer. */ - public static int checkSphereNonAlloc(Vector3f position, float radius, PhysicsRigidBody[] results, int layerMask, Predicate func) { + public static int checkSphereNonAlloc(Vector3f position, float radius, PhysicsRigidBody[] results, int layerMask, + Predicate func) { int numColliders = 0; for (PhysicsRigidBody pco : PhysicsSpace.getPhysicsSpace().getRigidBodyList()) {