100 double& tmin_out,
double& tmax_out);
131 const Point3D& center,
double radius);
174 plane_point, plane_normal);
201 const std::vector<Triangle3D>& triangles);
211 const Ray3Dd& ray,
const std::vector<Triangle3D>& triangles) {
std::optional< RayTriResult > ray_mesh_intersect(const Point3D &origin, const Vector3D &dir, const std::vector< Triangle3D > &triangles)
射线-网格求交(暴力遍历)
std::optional< double > ray_plane_intersect(const Point3D &origin, const Vector3D &dir, const Point3D &plane_point, const Vector3D &plane_normal)
射线-平面求交
bool ray_aabb_intersect(const Ray3Dd &ray, const AABB3D &box, double &tmin_out, double &tmax_out)
射线-AABB 求交(slab 方法)
std::optional< RayTriResult > ray_triangle_intersect(const Point3D &origin, const Vector3D &dir, const Triangle3D &tri)
射线-三角形求交(Möller-Trumbore 算法)
std::optional< RaySphereResult > ray_sphere_intersect(const Point3D &origin, const Vector3D &dir, const Point3D ¢er, double radius)
射线-球体求交(解析法)
Ray3D< double > Ray3Dd
双精度三维射线
Triangle< double > Triangle3D
双精度三维三角形
AABB< double > AABB3D
双精度三维包围盒
foundation::Vector3D Vector3D
双精度三维向量(重新导出)
foundation::Point3D Point3D
双精度三维点(重新导出)
double box(const Point3D &p, const Point3D &half_extents)
轴对齐立方体的 SDF