Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
class SFBounded a where Source
getLocalBounds :: a -> IO FloatRect Source
Get the local bounding rectangle of a boundable.
The returned rectangle is in local coordinates, which means that it ignores the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the entity in the entity's coordinate system.
getGlobalBounds :: a -> IO FloatRect Source
Get the global bounding rectangle of a shape.
The returned rectangle is in global coordinates, which means that it takes in account the transformations (translation, rotation, scale, ...) that are applied to the entity. In other words, this function returns the bounds of the sprite in the global 2D world's coordinate system.