![]() |
OpenVDB 13.1.0
|
Closest-point queries on geometric primitives, suitable for use in both host and device code. More...
Go to the source code of this file.
Namespaces | |
| namespace | nanovdb |
| Defines a simple memory pool used to call cub functions that use dynamic temporary storage. | |
| namespace | nanovdb::math |
Functions | |
| template<typename Vec3T> | |
| __hostdev__ Vec3T | closestPointOnSegmentToPoint (const Vec3T &v0, const Vec3T &v1, const Vec3T &p) |
| Returns the closest point on the line segment [v0,v1] to p. | |
| template<typename Vec3T> | |
| __hostdev__ Vec3T | closestPointOnTriangleToPoint (const Vec3T &v0, const Vec3T &v1, const Vec3T &v2, const Vec3T &p, typename Vec3T::ValueType &t0, typename Vec3T::ValueType &t1) |
| Returns the closest point on triangle [v0,v1,v2] to p, and (via t0, t1) the barycentric coordinates of that point: closest = v0 + t0*(v1-v0) + t1*(v2-v0). | |
| template<typename Vec3T> | |
| __hostdev__ Vec3T::ValueType | pointToTriangleDistSqr (const Vec3T &v0, const Vec3T &v1, const Vec3T &v2, const Vec3T &p) |
| Returns the squared distance from p to the closest point on triangle [v0,v1,v2]. | |
Closest-point queries on geometric primitives, suitable for use in both host and device code.