I'm developing a 2D Brick Breaker style game in Java and want to apply some real time physics to it, especially to the paddle/ball interections. Nothing too complex; just applying some of the physics principles, like: friction to transfer horizontal movement from the curved, hemisferic shaped paddle to the ball in order to change its direction; linear velocity, and maybe angular velocity to add spin to the ball, without change the ball speed; and collisions/resultant angles between the ball, the paddle, the walls and the blocks (rectangular, triangular and spherical shapes).
The point is, the few physics engines/codes that I found for Java have a lot of stuff in them, and I only need to apply few of them to my game. So, is there a way to just pick and add the functions and methods that I need, or do I have to put the entire packages of the physics engine/code to my project?
These are the physics engines that I found for Java:
http://kickjava.com/src/JSci/physics/RigidBody2D.java.htm
https://www.javatips.net/api/bdx-master/extern/gbullet/src/com/bulletphysics/dynamics/RigidBody.java
Thanks for your attention!