Saga
Saga Game Engine
Loading...
Searching...
No Matches
circle.h
Go to the documentation of this file.
1#pragma once
2
3#include <glm/vec2.hpp>
4#include <optional>
5
6namespace Saga::Geometry {
18 glm::vec2 detectCircleCollision(const glm::vec2& aPos, const float &aRadius, const glm::vec2& bPos, const float &bRadius);
19
31 std::optional<std::tuple<float,float>> rayUnitCircleAtOriginIntersection(const glm::vec2& origin, const glm::vec2& rayDirection);
32}
glm::vec2 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 circl...
Definition: circle.cpp:8
std::optional< std::tuple< float, float > > 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.
Definition: circle.cpp:23
Definition: box.cpp:6