MeshLib C Docs
Loading...
Searching...
No Matches
MRInSphere.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_std_array_MR_PreciseVertCoords_4 MR_std_array_MR_PreciseVertCoords_4
typedef enum MR_InSphereResult MR_InSphereResult
 the result of inSphere predicates
typedef struct MR_InSphereTester_float MR_InSphereTester_float
typedef struct MR_InSphereTester_double MR_InSphereTester_double
typedef struct MR_InSphereTester_int MR_InSphereTester_int

Enumerations

enum  MR_InSphereResult { MR_InSphereResult_NoSphere = 0 , MR_InSphereResult_Outside = 1 , MR_InSphereResult_OnSphere = 2 , MR_InSphereResult_Inside = 3 }
 the result of inSphere predicates More...

Functions

MRC_API MR_InSphereResult MR_inSphere_5 (const MR_Vector3i *a, const MR_Vector3i *b, const MR_Vector3i *c, const MR_Vector3i *d, int64_t rSq)
MRC_API MR_InSphereResult MR_inSphere_2 (const MR_std_array_MR_PreciseVertCoords_4 *vs, int64_t rSq)
MRC_API MR_InSphereTester_floatMR_InSphereTester_float_DefaultConstruct (void)
MRC_API MR_InSphereTester_floatMR_InSphereTester_float_DefaultConstructArray (size_t num_elems)
MRC_API const MR_InSphereTester_floatMR_InSphereTester_float_OffsetPtr (const MR_InSphereTester_float *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_floatMR_InSphereTester_float_OffsetMutablePtr (MR_InSphereTester_float *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_floatMR_InSphereTester_float_ConstructFromAnother (const MR_InSphereTester_float *_other)
MRC_API void MR_InSphereTester_float_Destroy (const MR_InSphereTester_float *_this)
 Destroys a heap-allocated instance of MR_InSphereTester_float. Does nothing if the pointer is null.
MRC_API void MR_InSphereTester_float_DestroyArray (const MR_InSphereTester_float *_this)
 Destroys a heap-allocated array of MR_InSphereTester_float. Does nothing if the pointer is null.
MRC_API MR_InSphereTester_floatMR_InSphereTester_float_AssignFromAnother (MR_InSphereTester_float *_this, const MR_InSphereTester_float *_other)
MRC_API bool MR_InSphereTester_float_reset (MR_InSphereTester_float *_this, const MR_Vector3f *va, const MR_Vector3f *vb, const MR_Vector3f *vc, float sqRadius)
MRC_API MR_InSphereResult MR_InSphereTester_float_call (const MR_InSphereTester_float *_this, const MR_Vector3f *d)
MRC_API MR_InSphereTester_doubleMR_InSphereTester_double_DefaultConstruct (void)
MRC_API MR_InSphereTester_doubleMR_InSphereTester_double_DefaultConstructArray (size_t num_elems)
MRC_API const MR_InSphereTester_doubleMR_InSphereTester_double_OffsetPtr (const MR_InSphereTester_double *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_doubleMR_InSphereTester_double_OffsetMutablePtr (MR_InSphereTester_double *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_doubleMR_InSphereTester_double_ConstructFromAnother (const MR_InSphereTester_double *_other)
MRC_API void MR_InSphereTester_double_Destroy (const MR_InSphereTester_double *_this)
 Destroys a heap-allocated instance of MR_InSphereTester_double. Does nothing if the pointer is null.
MRC_API void MR_InSphereTester_double_DestroyArray (const MR_InSphereTester_double *_this)
 Destroys a heap-allocated array of MR_InSphereTester_double. Does nothing if the pointer is null.
MRC_API MR_InSphereTester_doubleMR_InSphereTester_double_AssignFromAnother (MR_InSphereTester_double *_this, const MR_InSphereTester_double *_other)
MRC_API bool MR_InSphereTester_double_reset (MR_InSphereTester_double *_this, const MR_Vector3d *va, const MR_Vector3d *vb, const MR_Vector3d *vc, double sqRadius)
MRC_API MR_InSphereResult MR_InSphereTester_double_call (const MR_InSphereTester_double *_this, const MR_Vector3d *d)
MRC_API MR_InSphereTester_intMR_InSphereTester_int_DefaultConstruct (void)
MRC_API MR_InSphereTester_intMR_InSphereTester_int_DefaultConstructArray (size_t num_elems)
MRC_API const MR_InSphereTester_intMR_InSphereTester_int_OffsetPtr (const MR_InSphereTester_int *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_intMR_InSphereTester_int_OffsetMutablePtr (MR_InSphereTester_int *ptr, ptrdiff_t i)
MRC_API MR_InSphereTester_intMR_InSphereTester_int_ConstructFromAnother (MR_PassBy _other_pass_by, MR_InSphereTester_int *_other)
MRC_API void MR_InSphereTester_int_Destroy (const MR_InSphereTester_int *_this)
 Destroys a heap-allocated instance of MR_InSphereTester_int. Does nothing if the pointer is null.
MRC_API void MR_InSphereTester_int_DestroyArray (const MR_InSphereTester_int *_this)
 Destroys a heap-allocated array of MR_InSphereTester_int. Does nothing if the pointer is null.
MRC_API MR_InSphereTester_intMR_InSphereTester_int_AssignFromAnother (MR_InSphereTester_int *_this, MR_PassBy _other_pass_by, MR_InSphereTester_int *_other)
MRC_API bool MR_InSphereTester_int_reset (MR_InSphereTester_int *_this, const MR_Vector3i *a, const MR_Vector3i *b, const MR_Vector3i *c, int64_t rSq)
MRC_API MR_InSphereResult MR_InSphereTester_int_call_MR_Vector3i (const MR_InSphereTester_int *_this, const MR_Vector3i *d)
MRC_API MR_InSphereResult MR_InSphereTester_int_call_std_array_MR_PreciseVertCoords_4 (const MR_InSphereTester_int *_this, const MR_std_array_MR_PreciseVertCoords_4 *vs)
MRC_API MR_InSphereResult MR_inSphere_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *d, float rSq)
MRC_API MR_InSphereResult MR_inSphere_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, const MR_Vector3d *d, double rSq)

Typedef Documentation

◆ MR_InSphereResult

the result of inSphere predicates

◆ MR_InSphereTester_double

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<double>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_InSphereTester_float

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>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_InSphereTester_int

the specialization implementing the precise integer predicate, exact for any input; rSq must be given in the same integer grid units as the point coordinates Generated from class MR::InSphereTester<int>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_array_MR_PreciseVertCoords_4

A fixed-size array of MR::PreciseVertCoords of size 4. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Enumeration Type Documentation

◆ MR_InSphereResult

the result of inSphere predicates

Enumerator
MR_InSphereResult_NoSphere 

the sphere is not defined: the points A, B, C are collinear or coincident, or rSq is less than the squared circumradius of triangle ABC

MR_InSphereResult_Outside 

the sphere exists, and the point D is strictly outside

MR_InSphereResult_OnSphere 

the sphere exists, and the point D is exactly on it; never returned by the simulation-of-simplicity overload, which resolves such ties into Inside or Outside

MR_InSphereResult_Inside 

the sphere exists, and the point D is strictly inside

Function Documentation

◆ MR_inSphere_2()

MRC_API MR_InSphereResult MR_inSphere_2 ( const MR_std_array_MR_PreciseVertCoords_4 * vs,
int64_t rSq )

checks whether the point vs[3] is strictly inside the sphere of radius sqrt(rSq) passing via points vs[0], vs[1], vs[2], with the center located on the positive side of plane vs[0]vs[1]vs[2] (same convention as in the overload above); resolves "vs[3] is exactly on the sphere" ties into Inside or Outside using simulation-of-simplicity: the points are symbolically perturbed (larger perturbations of points with smaller ids; per point the z-coordinate gets larger perturbation than y than x), and the first point whose perturbation moves vs[3] off the sphere decides the answer; known deviations from full simulation-of-simplicity semantics, all answered deterministically for now (covered by sosInSphereDeviations test, to be resolved by ids in the following PRs):

  • all three points of the triangle coincide: NoSphere now, while the perturbed triangle is not degenerate and its sphere exists;
  • two points of the triangle coincide and the third one is closer than the sphere's diameter: NoSphere now, while the perturbed sphere may exist depending on the perturbation directions;
  • rSq is exactly equal to the squared circumradius of a not-degenerate triangle: perturbations change the sphere's existence, affecting both "vs[3] strictly inside" (Inside now) and "vs[3] exactly on the sphere" (Outside now); the remaining degenerate NoSphere answers are exact under full simulation-of-simplicity, because no small perturbation can create the sphere: distinct collinear triangle points, two coincident triangle points with the third one at or beyond the sphere's diameter, rSq below the squared circumradius Generated from function MR::inSphere. Parameter vs can not be null. It is a single object.

◆ MR_inSphere_5()

MRC_API MR_InSphereResult MR_inSphere_5 ( const MR_Vector3i * a,
const MR_Vector3i * b,
const MR_Vector3i * c,
const MR_Vector3i * d,
int64_t rSq )

checks whether the point D is strictly inside the sphere of radius sqrt(rSq) passing via points A, B, C, whose center is located on the positive side of plane ABC (in the half-space pointed at by cross( b - a, c - a ) from the plane); returns OnSphere when D is exactly on the sphere; cyclic permutations of (A, B, C) do not change the result, a swap of two of them selects the mirror sphere; rSq must be given in the same integer grid units as the point coordinates Generated from function MR::inSphere. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_inSphere_double()

MRC_API MR_InSphereResult MR_inSphere_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c,
const MR_Vector3d * d,
double rSq )

checks whether the point d is strictly inside the sphere of radius sqrt(rSq) passing via points a, b, c, whose center is located on the positive side of plane abc, in floating-point; see the comment on InSphereTester above for the limitations Generated from function MR::inSphere<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_inSphere_float()

MRC_API MR_InSphereResult MR_inSphere_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c,
const MR_Vector3f * d,
float rSq )

checks whether the point d is strictly inside the sphere of radius sqrt(rSq) passing via points a, b, c, whose center is located on the positive side of plane abc, in floating-point; see the comment on InSphereTester above for the limitations Generated from function MR::inSphere<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_InSphereTester_double_AssignFromAnother()

MRC_API MR_InSphereTester_double * MR_InSphereTester_double_AssignFromAnother ( MR_InSphereTester_double * _this,
const MR_InSphereTester_double * _other )

Generated from method MR::InSphereTester<double>::operator=. Parameter _this can not be null. It is a single object. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.

◆ MR_InSphereTester_double_call()

MRC_API MR_InSphereResult MR_InSphereTester_double_call ( const MR_InSphereTester_double * _this,
const MR_Vector3d * d )

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<double>::operator(). Parameter _this can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_InSphereTester_double_ConstructFromAnother()

MRC_API MR_InSphereTester_double * MR_InSphereTester_double_ConstructFromAnother ( const MR_InSphereTester_double * _other)

Generated from constructor MR::InSphereTester<double>::InSphereTester. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_double_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_double_DefaultConstruct()

MRC_API MR_InSphereTester_double * MR_InSphereTester_double_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_double_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_double_DefaultConstructArray()

MRC_API MR_InSphereTester_double * MR_InSphereTester_double_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_InSphereTester_double_DestroyArray(). Use MR_InSphereTester_double_OffsetMutablePtr() and MR_InSphereTester_double_OffsetPtr() to access the array elements.

◆ MR_InSphereTester_double_Destroy()

MRC_API void MR_InSphereTester_double_Destroy ( const MR_InSphereTester_double * _this)

Destroys a heap-allocated instance of MR_InSphereTester_double. Does nothing if the pointer is null.

◆ MR_InSphereTester_double_DestroyArray()

MRC_API void MR_InSphereTester_double_DestroyArray ( const MR_InSphereTester_double * _this)

Destroys a heap-allocated array of MR_InSphereTester_double. Does nothing if the pointer is null.

◆ MR_InSphereTester_double_OffsetMutablePtr()

MRC_API MR_InSphereTester_double * MR_InSphereTester_double_OffsetMutablePtr ( MR_InSphereTester_double * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_double_OffsetPtr()

MRC_API const MR_InSphereTester_double * MR_InSphereTester_double_OffsetPtr ( const MR_InSphereTester_double * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_double_reset()

MRC_API bool MR_InSphereTester_double_reset ( MR_InSphereTester_double * _this,
const MR_Vector3d * va,
const MR_Vector3d * vb,
const MR_Vector3d * vc,
double sqRadius )

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<double>::reset. Parameter _this can not be null. It is a single object. Parameter va can not be null. It is a single object. Parameter vb can not be null. It is a single object. Parameter vc can not be null. It is a single object.

◆ MR_InSphereTester_float_AssignFromAnother()

MRC_API MR_InSphereTester_float * MR_InSphereTester_float_AssignFromAnother ( MR_InSphereTester_float * _this,
const MR_InSphereTester_float * _other )

Generated from method MR::InSphereTester<float>::operator=. Parameter _this can not be null. It is a single object. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.

◆ MR_InSphereTester_float_call()

MRC_API MR_InSphereResult MR_InSphereTester_float_call ( const MR_InSphereTester_float * _this,
const MR_Vector3f * d )

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(). Parameter _this can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_InSphereTester_float_ConstructFromAnother()

MRC_API MR_InSphereTester_float * MR_InSphereTester_float_ConstructFromAnother ( const MR_InSphereTester_float * _other)

Generated from constructor MR::InSphereTester<float>::InSphereTester. Parameter _other can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_float_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_float_DefaultConstruct()

MRC_API MR_InSphereTester_float * MR_InSphereTester_float_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_float_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_float_DefaultConstructArray()

MRC_API MR_InSphereTester_float * MR_InSphereTester_float_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_InSphereTester_float_DestroyArray(). Use MR_InSphereTester_float_OffsetMutablePtr() and MR_InSphereTester_float_OffsetPtr() to access the array elements.

◆ MR_InSphereTester_float_Destroy()

MRC_API void MR_InSphereTester_float_Destroy ( const MR_InSphereTester_float * _this)

Destroys a heap-allocated instance of MR_InSphereTester_float. Does nothing if the pointer is null.

◆ MR_InSphereTester_float_DestroyArray()

MRC_API void MR_InSphereTester_float_DestroyArray ( const MR_InSphereTester_float * _this)

Destroys a heap-allocated array of MR_InSphereTester_float. Does nothing if the pointer is null.

◆ MR_InSphereTester_float_OffsetMutablePtr()

MRC_API MR_InSphereTester_float * MR_InSphereTester_float_OffsetMutablePtr ( MR_InSphereTester_float * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_float_OffsetPtr()

MRC_API const MR_InSphereTester_float * MR_InSphereTester_float_OffsetPtr ( const MR_InSphereTester_float * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_float_reset()

MRC_API bool MR_InSphereTester_float_reset ( MR_InSphereTester_float * _this,
const MR_Vector3f * va,
const MR_Vector3f * vb,
const MR_Vector3f * vc,
float sqRadius )

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. Parameter _this can not be null. It is a single object. Parameter va can not be null. It is a single object. Parameter vb can not be null. It is a single object. Parameter vc can not be null. It is a single object.

◆ MR_InSphereTester_int_AssignFromAnother()

MRC_API MR_InSphereTester_int * MR_InSphereTester_int_AssignFromAnother ( MR_InSphereTester_int * _this,
MR_PassBy _other_pass_by,
MR_InSphereTester_int * _other )

Generated from method MR::InSphereTester<int>::operator=. Parameter _this can not be null. It is a single object. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The returned pointer will never be null. It is non-owning, do NOT destroy it. When this function is called, this object will drop any object references it held previously.

◆ MR_InSphereTester_int_call_MR_Vector3i()

MRC_API MR_InSphereResult MR_InSphereTester_int_call_MR_Vector3i ( const MR_InSphereTester_int * _this,
const MR_Vector3i * d )

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<int>::operator(). Parameter _this can not be null. It is a single object. Parameter d can not be null. It is a single object.

◆ MR_InSphereTester_int_call_std_array_MR_PreciseVertCoords_4()

MRC_API MR_InSphereResult MR_InSphereTester_int_call_std_array_MR_PreciseVertCoords_4 ( const MR_InSphereTester_int * _this,
const MR_std_array_MR_PreciseVertCoords_4 * vs )

returns the position of the point vs[3] relative to the sphere, resolving "exactly on the sphere" ties into Inside or Outside by simulation-of-simplicity as described at the inSphere overload above (never returns OnSphere or NoSphere); shall be called only after reset() returned true, and the points vs[0], vs[1], vs[2] must be the same a, b, c as in that reset() Generated from method MR::InSphereTester<int>::operator(). Parameter _this can not be null. It is a single object. Parameter vs can not be null. It is a single object.

◆ MR_InSphereTester_int_ConstructFromAnother()

MRC_API MR_InSphereTester_int * MR_InSphereTester_int_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_InSphereTester_int * _other )

Generated from constructor MR::InSphereTester<int>::InSphereTester. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_int_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_int_DefaultConstruct()

MRC_API MR_InSphereTester_int * MR_InSphereTester_int_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_InSphereTester_int_Destroy() to free it when you're done using it.

◆ MR_InSphereTester_int_DefaultConstructArray()

MRC_API MR_InSphereTester_int * MR_InSphereTester_int_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_InSphereTester_int_DestroyArray(). Use MR_InSphereTester_int_OffsetMutablePtr() and MR_InSphereTester_int_OffsetPtr() to access the array elements.

◆ MR_InSphereTester_int_Destroy()

MRC_API void MR_InSphereTester_int_Destroy ( const MR_InSphereTester_int * _this)

Destroys a heap-allocated instance of MR_InSphereTester_int. Does nothing if the pointer is null.

◆ MR_InSphereTester_int_DestroyArray()

MRC_API void MR_InSphereTester_int_DestroyArray ( const MR_InSphereTester_int * _this)

Destroys a heap-allocated array of MR_InSphereTester_int. Does nothing if the pointer is null.

◆ MR_InSphereTester_int_OffsetMutablePtr()

MRC_API MR_InSphereTester_int * MR_InSphereTester_int_OffsetMutablePtr ( MR_InSphereTester_int * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_int_OffsetPtr()

MRC_API const MR_InSphereTester_int * MR_InSphereTester_int_OffsetPtr ( const MR_InSphereTester_int * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element. The reference to the parameter ptr might be preserved in the return value.

◆ MR_InSphereTester_int_reset()

MRC_API bool MR_InSphereTester_int_reset ( MR_InSphereTester_int * _this,
const MR_Vector3i * a,
const MR_Vector3i * b,
const MR_Vector3i * c,
int64_t rSq )

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<int>::reset. Parameter _this can not be null. It is a single object. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.