Public Member Functions | |
| auto | assign_from_another (_other:&meshlib::InSphereTester_float) -> &mut meshlib::InSphereTester_float |
| auto | reset (va:&meshlib::Vector3f, vb:&meshlib::Vector3f, vc:&meshlib::Vector3f, sqRadius:f32) -> bool |
| void | flip () |
| auto | call (d:&meshlib::Vector3f) const -> meshlib::InSphereResult |
Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::InSphereTester_float > |
| static auto | construct_from_another (_other:&meshlib::InSphereTester_float) -> meshlib::Owned< meshlib::InSphereTester_float > |
| Static Public Member Functions inherited from meshlib::CppClass | |
| static void | destroy (ptr:*mut Self) |
| Static Public Member Functions inherited from meshlib::CppCopy | |
| static auto | copy (ptr:*const Self) -> *mut Self |
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 Generated from class MR::InSphereTester<float>.
Generated from class MR::InSphereTester<float>. Heap-allocated instances are held in Owned<InSphereTester_float>.
| auto meshlib::InSphereTester_float::assign_from_another | ( | _other:&meshlib::InSphereTester_float | ) | -> &mut meshlib::InSphereTester_float |
Generated from method MR::InSphereTester<float>::operator=.
Calls MR_InSphereTester_float_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.
| auto meshlib::InSphereTester_float::call | ( | d:&meshlib::Vector3f | ) | const -> meshlib::InSphereResult |
returns the position of the point d relative to the sphere (never NoSphere); shall be called only after reset() returned true Generated from method MR::InSphereTester<float>::operator().
Calls MR_InSphereTester_float_call().
|
static |
Generated from constructor MR::InSphereTester<float>::InSphereTester.
Calls MR_InSphereTester_float_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
| void meshlib::InSphereTester_float::flip | ( | ) |
swaps the points b and c, which selects the mirror sphere with the center on the other side of plane abc, and gives exactly the state of reset( a, c, b, rSq ) without recomputing anything: only the normal w changes there, and W, M, E are symmetric in b and c; shall be called only after reset() returned true Generated from method MR::InSphereTester<float>::flip.
Calls MR_InSphereTester_float_flip().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_InSphereTester_float_DefaultConstruct().
| auto meshlib::InSphereTester_float::reset | ( | va:&meshlib::Vector3f | , |
| vb:&meshlib::Vector3f | , | ||
| vc:&meshlib::Vector3f | , | ||
| sqRadius:f32 | ) -> bool |
prepares the tester for the sphere of radius sqrt(rSq) passing via points a, b, c, with the center located on the positive side of plane abc (in the half-space pointed at by cross( b - a, c - a ) from the plane); returns false if no such sphere exists: the points are collinear or coincident, or rSq is less than the squared circumradius of triangle abc Generated from method MR::InSphereTester<float>::reset.
Calls MR_InSphereTester_float_reset().