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

Namespaces

namespace  Saga
 
namespace  Saga::Geometry
 

Functions

std::optional< float > Saga::Geometry::rayTriangleIntersection (const glm::vec3 &origin, const glm::vec3 &rayDirection, Triangle triangle)
 Find the intersection time t where a ray and triangle intersects. Does not detect intersections to the back side of the triangle.
 
glm::vec3 Saga::Geometry::getClosestPoint (const glm::vec3 pointPos, Triangle triangle)
 Find the closest point between a point and a triangle.