}
@Override
public PVector projectionVector(HCircle other) {
//Get distance between shapes
PVector dist = PVector.sub(_position, other.getPosition());
//Set up variables for keeping track of smallest resolution
PVector resolution = null;
float resolutionSize = Float.MAX_VALUE;
PVector center = other.getCenter();
float radius = other.getRadius();
//Check for collision along all axes in this polygon
for(PVector axis : _axes) {
PVector result = checkSepAxis(axis, dist, center, radius);
if(result == null) {
return null;
} else { //Determine if result is smaller than current min resolution
float temp = mag2(result);
if(temp < resolutionSize) {
resolution = result;
resolutionSize = temp;
}
}
}
//Check for collisions along axes between circle center and vertices
for(PVector p : _points) {
PVector axis = PVector.sub(center, PVector.add(p, dist));
axis.normalize();
PVector result = checkSepAxis(axis, dist, center, radius);
if(result == null) {
return null;
} else { //Determine if result is smaller than current min resolution
float temp = mag2(result);
if(temp < resolutionSize) {