Saga
Saga Game Engine
Loading...
Searching...
No Matches
circle.h File Reference
#include <glm/vec2.hpp>
#include <optional>
Include dependency graph for circle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Saga
 
namespace  Saga::Geometry
 

Functions

glm::vec2 Saga::Geometry::detectCircleCollision (const glm::vec2 &aPos, const float &aRadius, const glm::vec2 &bPos, const float &bRadius)
 Detect if two circles overlap. If they do, output the minimum translation vector from the first circle for both to not be colliding.
 
std::optional< std::tuple< float, float > > Saga::Geometry::rayUnitCircleAtOriginIntersection (const glm::vec2 &origin, const glm::vec2 &rayDirection)
 Find the entrance and exit times t between a unit circle at the origin and a ray.