#include <MRMesh/MRInSphere.h>
Public Member Functions | |
| bool | reset (const Vector3< T > &va, const Vector3< T > &vb, const Vector3< T > &vc, T sqRadius) |
| InSphereResult | operator() (const Vector3< T > &d) const |
accelerates testing of many query points against one sphere given by the same three points and radius, pre-computing all the point-independent quantities once; the primary template works for floating-point T with the same case analysis as the precise specialization for int below, so the answers for the query points near the sphere's surface are subject to rounding errors, and OnSphere is returned only on the exact equality in the comparisons; the products inside have degree 16 in coordinates, so to avoid overflows any difference of two given points' coordinates as well as sqrt(rSq) must be below ~100 for T=float and ~1e18 for T=double; the one-call inSphere functions are implemented via this class