Euphoria
intersection.cc File Reference
#include "core/intersection.h"
#include "base/ray.h"
#include "base/aabb.h"
#include "core/sphere.h"
#include "base/plane.h"
#include "base/numeric.h"

Go to the source code of this file.

Namespaces

 eu
 
 eu::core
 

Macros

#define VEC(N)   (point.N > aabb.max.N ? aabb.max.N : (point.N < aabb.min.N ? aabb.min.N : point.N))
 

Functions

Ray3AabbResult eu::core::get_intersection (const UnitRay3f &r, const Aabb &aabb)
 
float eu::core::get_intersection (const UnitRay3f &r, const Plane &p)
 
Ray2Ray2Result eu::core::get_intersection (const Ray2f &lhs, const Ray2f &rhs)
 
float eu::core::get_distance_between (const Plane &plane, const vec3f &p)
 
vec3f eu::core::get_closest_point (const Plane &plane, const vec3f &point)
 
float eu::core::get_distance_between (const UnitRay3f &ray, const vec3f &point)
 
vec3f eu::core::get_closest_point (const UnitRay3f &ray, const vec3f &c)
 
bool eu::core::get_intersection (const Sphere &lhs, const vec3f &lhs_center, const Sphere &rhs, const vec3f &rhs_center)
 
bool eu::core::contains_point (const Sphere &sphere, const vec3f &sphere_center, const vec3f &point)
 
vec3f eu::core::get_closest_point (const Sphere &sphere, const vec3f &sphere_center, const vec3f &point)
 
float eu::core::get_intersection (const UnitRay3f &ray, const Sphere &sphere, const vec3f &sphere_center)
 
bool eu::core::contains_point (const Aabb &aabb, const vec3f &point)
 
vec3f eu::core::get_closest_point (const Aabb &aabb, const vec3f &point)
 
bool eu::core::is_point_in_triangle (const vec2f &a, const vec2f &b, const vec2f &c, const vec2f &p)
 
std::optional< float > eu::core::get_intersection_ray_triangle (const UnitRay3f &ray, const vec3f &v0, const vec3f &v1, const vec3f &v2)
 This implements the Möller–Trumbore intersection algorithm. More...
 

Macro Definition Documentation

◆ VEC

#define VEC (   N)    (point.N > aabb.max.N ? aabb.max.N : (point.N < aabb.min.N ? aabb.min.N : point.N))