Saga
Saga Game Engine
Loading...
Searching...
No Matches
circle.cpp File Reference
#include "circle.h"
#include <algorithm>
#include <glm/geometric.hpp>
#include "Engine/Utils/math.h"
Include dependency graph for circle.cpp:

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.