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

Go to the source code of this file.

Classes

struct  Saga::Geometry::Triangle
 Represents a 3D triangle, equipped with some utility functions. More...
 

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.