diff options
Diffstat (limited to 'src/crepe/system/CollisionSystem.h')
-rw-r--r-- | src/crepe/system/CollisionSystem.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/crepe/system/CollisionSystem.h b/src/crepe/system/CollisionSystem.h index ea8c1e1..86b8b7a 100644 --- a/src/crepe/system/CollisionSystem.h +++ b/src/crepe/system/CollisionSystem.h @@ -139,11 +139,37 @@ private: * \param box_collider2 The second BoxCollider. * \param position1 The position of the first BoxCollider. * \param position2 The position of the second BoxCollider. - * \return The resolution vector for the first BoxCollider. + * \return The resolution vector for the collision. */ vec2 box_box_resolution(const BoxCollider& box_collider1,const BoxCollider& box_collider2,vec2 position1,vec2 position2); /** + * \brief Calculates the resolution vector for two CircleCollider. + * + * Computes the displacement required to separate two overlapping CircleCollider. + * + * \param circle_collider1 The first CircleCollider. + * \param circle_collider2 The second CircleCollider. + * \param position1 The position of the first CircleCollider. + * \param position2 The position of the second CircleCollider. + * \return The resolution vector for the collision. + */ + vec2 circle_circle_resolution(const CircleCollider& circle_collider1, const CircleCollider& circle_collider2, vec2 final_position1, vec2 final_position2); + + /** + * \brief Calculates the resolution vector for two CircleCollider. + * + * Computes the displacement required to separate two overlapping CircleCollider. + * + * \param circle_collider The first CircleCollider. + * \param box_collider The second CircleCollider. + * \param circle_position The position of the CircleCollider. + * \param box_position The position of the BocCollider. + * \return The resolution vector for the collision. + */ + vec2 circle_box_resolution(const CircleCollider& circle_collider, const BoxCollider& box_collider, vec2 circle_position, vec2 box_position); + + /** * \brief Determines the appropriate collision handler for a collision. * * Decides the correct resolution process based on the dynamic or static nature of the colliders involved. |