public Point[] getRefinedRelativeCollisionPoints(Point[] collisionpoints, 
			int maskindex)
	{
		// In case the mask is null (= not used), simply returns the same points
		if (getMask() == null)
			return collisionpoints;
		
		// Removes the collisionpoints that aren't in the mask
		ArrayList<Point> templist = new ArrayList<Point>();
		// Adds all the relevant points to the list
		for (int i = 0; i < collisionpoints.length; i++)
		{
			if (maskContainsRelativePoint(collisionpoints[i], maskindex))
				templist.add(collisionpoints[i]);
		}
		// Adds all points from the list to the table
		Point[] newpoints = new Point[templist.size()];
		for (int i = 0; i < templist.size(); i++)
		{
			newpoints[i] = templist.get(i);
		}
		return newpoints;
	}