31 lines
1.4 KiB
C++
31 lines
1.4 KiB
C++
#pragma once
|
|
#include "vde/core/point.h"
|
|
#include "vde/core/line.h"
|
|
#include "vde/core/plane.h"
|
|
#include "vde/core/triangle.h"
|
|
#include "vde/core/aabb.h"
|
|
|
|
namespace vde::core {
|
|
|
|
// ── Point distances ──────────────────────────
|
|
double distance(const Point3D& a, const Point3D& b);
|
|
double distance(const Point3D& p, const Line3D<double>& line);
|
|
double distance(const Point3D& p, const Segment3D<double>& seg);
|
|
double distance(const Point3D& p, const Plane<double>& plane);
|
|
double distance(const Point3D& p, const Triangle<double>& tri);
|
|
double distance(const Point3D& p, const AABB<double>& box);
|
|
|
|
// ── Feature-pair distances ───────────────────
|
|
double distance(const Segment3D<double>& a, const Segment3D<double>& b);
|
|
double distance(const Line3D<double>& a, const Line3D<double>& b);
|
|
double distance(const AABB<double>& a, const AABB<double>& b);
|
|
double distance(const Triangle<double>& a, const Triangle<double>& b);
|
|
|
|
// ── Closest-point queries ────────────────────
|
|
Point3D closest_point(const Point3D& p, const Triangle<double>& tri);
|
|
Point3D closest_point(const Point3D& p, const Segment3D<double>& seg);
|
|
Point3D closest_point(const Point3D& p, const AABB<double>& box);
|
|
Point3D closest_point(const Point3D& p, const Plane<double>& plane);
|
|
|
|
} // namespace vde::core
|