Utility functions for hitbox calculations. More...
#include <utility>
Include dependency graph for HitboxUtils.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | utl |
Functions | |
| std::pair< float, float > | utl::calculateSpriteCenter (const float x, const float y, const float spriteWidth, const float spriteHeight, const float scale) |
| Calculate the center position of a sprite. | |
| std::pair< float, float > | utl::calculateHitboxOffsets (const float spriteWidth, const float spriteHeight, const float scale) |
| Calculate hitbox offsets to center the hitbox on the sprite. | |
| std::pair< float, float > | utl::calculateHitboxOffsetsRelative (const float x, const float y, const float spriteWidth, const float spriteHeight, const float scale) |
| Calculate hitbox offsets relative to sprite position. | |
Utility functions for hitbox calculations.
Definition in file HitboxUtils.hpp.