As far as I know :
- No
- No, the bounding box is an horizontal rectangle with the sprite in it
For your first point, this method check if a point is inside a polygon. Coords is a vector containing the points of the polygon. A point is a simple two values structure. This is done with a vector test : saying that if each edge of the polygon has the point to the right, the point is inside the polygon :
////////////////////////////////////////////////////////////
/// Check if a point is inside the polygon's area
////////////////////////////////////////////////////////////
template <typename T>
bool sfPoly<T>::Contains(T X, T Y) const
{
for (unsigned int i=0;i<Coords.size()-2;i+=2)
{
if (((Y-Coords[i+1])*(Coords[i+2]-Coords[i]) - (X-Coords[i])*(Coords[i+3]-Coords[i+1]))<0)
{
return (false);
}
}
//The last test is special
unsigned int j = Coords.size();
if (((Y-Coords[j-1])*(Coords[0]-Coords[j-2]) - (X-Coords[j-2])*(Coords[1]-Coords[j-1]))<0)
{
return (false);
}
return (true);
}