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

Go to the source code of this file.

Typedefs

typedef struct MR_IntersectionPrecomputes_double MR_IntersectionPrecomputes_double
 
typedef struct MR_IntersectionPrecomputes_float MR_IntersectionPrecomputes_float
 
typedef struct MR_TriPointf MR_TriPointf
 
typedef struct MR_Vector2d MR_Vector2d
 
typedef struct MR_Vector2f MR_Vector2f
 
typedef struct MR_Vector3d MR_Vector3d
 
typedef struct MR_Vector3f MR_Vector3f
 
typedef struct MR_std_optional_MR_TriIntersectResult MR_std_optional_MR_TriIntersectResult
 
typedef struct MR_TriIntersectResult MR_TriIntersectResult
 

Functions

MRC_API const MR_TriPointfMR_TriIntersectResult_Get_bary (const MR_TriIntersectResult *_this)
 
MRC_API void MR_TriIntersectResult_Set_bary (MR_TriIntersectResult *_this, const MR_TriPointf *value)
 
MRC_API MR_TriPointfMR_TriIntersectResult_GetMutable_bary (MR_TriIntersectResult *_this)
 
MRC_API const float * MR_TriIntersectResult_Get_t (const MR_TriIntersectResult *_this)
 
MRC_API void MR_TriIntersectResult_Set_t (MR_TriIntersectResult *_this, float value)
 
MRC_API float * MR_TriIntersectResult_GetMutable_t (MR_TriIntersectResult *_this)
 
MRC_API MR_TriIntersectResultMR_TriIntersectResult_ConstructFromAnother (const MR_TriIntersectResult *_other)
 
MRC_API const MR_TriIntersectResultMR_TriIntersectResult_OffsetPtr (const MR_TriIntersectResult *ptr, ptrdiff_t i)
 
MRC_API MR_TriIntersectResultMR_TriIntersectResult_OffsetMutablePtr (MR_TriIntersectResult *ptr, ptrdiff_t i)
 
MRC_API MR_TriIntersectResultMR_TriIntersectResult_Construct (float U, float V, float dist)
 
MRC_API void MR_TriIntersectResult_Destroy (const MR_TriIntersectResult *_this)
 Destroys a heap-allocated instance of MR_TriIntersectResult. Does nothing if the pointer is null.
 
MRC_API void MR_TriIntersectResult_DestroyArray (const MR_TriIntersectResult *_this)
 Destroys a heap-allocated array of MR_TriIntersectResult. Does nothing if the pointer is null.
 
MRC_API MR_TriIntersectResultMR_TriIntersectResult_AssignFromAnother (MR_TriIntersectResult *_this, const MR_TriIntersectResult *_other)
 
MRC_API bool MR_isPointInPlane_float (const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
 
MRC_API bool MR_isPointInPlane_double (const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
 
MRC_API bool MR_isPointInLine_float (const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b)
 
MRC_API bool MR_isPointInLine_double (const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b)
 
MRC_API bool MR_isPointInSegm_float (const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b)
 
MRC_API bool MR_isPointInSegm_double (const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b)
 
MRC_API bool MR_isPointInTriangle_float_MR_Vector3f (const MR_Vector3f *p, const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
 
MRC_API bool MR_isPointInTriangle_double_MR_Vector3d (const MR_Vector3d *p, const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
 
MRC_API bool MR_isPointInTriangle_float_MR_Vector2f (const MR_Vector2f *p, const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c)
 
MRC_API bool MR_isPointInTriangle_double_MR_Vector2d (const MR_Vector2d *p, const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c)
 
MRC_API MR_std_optional_MR_TriIntersectResultMR_rayTriangleIntersect_float_MR_IntersectionPrecomputes_float (const MR_Vector3f *oriA, const MR_Vector3f *oriB, const MR_Vector3f *oriC, const MR_IntersectionPrecomputes_float *prec)
 
MRC_API MR_std_optional_MR_TriIntersectResultMR_rayTriangleIntersect_double_MR_IntersectionPrecomputes_double (const MR_Vector3d *oriA, const MR_Vector3d *oriB, const MR_Vector3d *oriC, const MR_IntersectionPrecomputes_double *prec)
 
MRC_API MR_std_optional_MR_TriIntersectResultMR_rayTriangleIntersect_float_MR_Vector3f (const MR_Vector3f *oriA, const MR_Vector3f *oriB, const MR_Vector3f *oriC, const MR_Vector3f *dir)
 
MRC_API MR_std_optional_MR_TriIntersectResultMR_rayTriangleIntersect_double_MR_Vector3d (const MR_Vector3d *oriA, const MR_Vector3d *oriB, const MR_Vector3d *oriC, const MR_Vector3d *dir)
 
MRC_API bool MR_doTrianglesOverlap_float (const MR_Vector2f *a, const MR_Vector2f *b, const MR_Vector2f *c, const MR_Vector2f *d, const MR_Vector2f *e, const MR_Vector2f *f)
 
MRC_API bool MR_doTrianglesOverlap_double (const MR_Vector2d *a, const MR_Vector2d *b, const MR_Vector2d *c, const MR_Vector2d *d, const MR_Vector2d *e, const MR_Vector2d *f)
 

Typedef Documentation

◆ MR_IntersectionPrecomputes_double

◆ MR_IntersectionPrecomputes_float

◆ MR_std_optional_MR_TriIntersectResult

◆ MR_TriIntersectResult

Generated from class MR::TriIntersectResult. Supported MR_PassBy modes: MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_TriPointf

typedef struct MR_TriPointf MR_TriPointf

◆ MR_Vector2d

typedef struct MR_Vector2d MR_Vector2d

◆ MR_Vector2f

typedef struct MR_Vector2f MR_Vector2f

◆ MR_Vector3d

typedef struct MR_Vector3d MR_Vector3d

◆ MR_Vector3f

typedef struct MR_Vector3f MR_Vector3f

Function Documentation

◆ MR_doTrianglesOverlap_double()

MRC_API bool MR_doTrianglesOverlap_double ( const MR_Vector2d * a,
const MR_Vector2d * b,
const MR_Vector2d * c,
const MR_Vector2d * d,
const MR_Vector2d * e,
const MR_Vector2d * f )

returns true if ABC and DEF overlaps or touches Generated from function MR::doTrianglesOverlap<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. Parameter e can not be null. It is a single object. Parameter f can not be null. It is a single object.

◆ MR_doTrianglesOverlap_float()

MRC_API bool MR_doTrianglesOverlap_float ( const MR_Vector2f * a,
const MR_Vector2f * b,
const MR_Vector2f * c,
const MR_Vector2f * d,
const MR_Vector2f * e,
const MR_Vector2f * f )

returns true if ABC and DEF overlaps or touches Generated from function MR::doTrianglesOverlap<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. Parameter e can not be null. It is a single object. Parameter f can not be null. It is a single object.

◆ MR_isPointInLine_double()

MRC_API bool MR_isPointInLine_double ( const MR_Vector3d * p,
const MR_Vector3d * a,
const MR_Vector3d * b )

returns true if AB line contains point P Generated from function MR::isPointInLine<double>. Parameter p 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.

◆ MR_isPointInLine_float()

MRC_API bool MR_isPointInLine_float ( const MR_Vector3f * p,
const MR_Vector3f * a,
const MR_Vector3f * b )

returns true if AB line contains point P Generated from function MR::isPointInLine<float>. Parameter p 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.

◆ MR_isPointInPlane_double()

MRC_API bool MR_isPointInPlane_double ( const MR_Vector3d * p,
const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

returns true if ABC plane contains point P Generated from function MR::isPointInPlane<double>. Parameter p 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.

◆ MR_isPointInPlane_float()

MRC_API bool MR_isPointInPlane_float ( const MR_Vector3f * p,
const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

returns true if ABC plane contains point P Generated from function MR::isPointInPlane<float>. Parameter p 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.

◆ MR_isPointInSegm_double()

MRC_API bool MR_isPointInSegm_double ( const MR_Vector3d * p,
const MR_Vector3d * a,
const MR_Vector3d * b )

returns true if AB segment contains point P Generated from function MR::isPointInSegm<double>. Parameter p 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.

◆ MR_isPointInSegm_float()

MRC_API bool MR_isPointInSegm_float ( const MR_Vector3f * p,
const MR_Vector3f * a,
const MR_Vector3f * b )

returns true if AB segment contains point P Generated from function MR::isPointInSegm<float>. Parameter p 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.

◆ MR_isPointInTriangle_double_MR_Vector2d()

MRC_API bool MR_isPointInTriangle_double_MR_Vector2d ( const MR_Vector2d * p,
const MR_Vector2d * a,
const MR_Vector2d * b,
const MR_Vector2d * c )

returns true if ABC triangle contains point P Generated from function MR::isPointInTriangle<double>. Parameter p 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.

◆ MR_isPointInTriangle_double_MR_Vector3d()

MRC_API bool MR_isPointInTriangle_double_MR_Vector3d ( const MR_Vector3d * p,
const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

returns true if ABC triangle contains point P Generated from function MR::isPointInTriangle<double>. Parameter p 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.

◆ MR_isPointInTriangle_float_MR_Vector2f()

MRC_API bool MR_isPointInTriangle_float_MR_Vector2f ( const MR_Vector2f * p,
const MR_Vector2f * a,
const MR_Vector2f * b,
const MR_Vector2f * c )

returns true if ABC triangle contains point P Generated from function MR::isPointInTriangle<float>. Parameter p 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.

◆ MR_isPointInTriangle_float_MR_Vector3f()

MRC_API bool MR_isPointInTriangle_float_MR_Vector3f ( const MR_Vector3f * p,
const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

returns true if ABC triangle contains point P Generated from function MR::isPointInTriangle<float>. Parameter p 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.

◆ MR_rayTriangleIntersect_double_MR_IntersectionPrecomputes_double()

MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_double_MR_IntersectionPrecomputes_double ( const MR_Vector3d * oriA,
const MR_Vector3d * oriB,
const MR_Vector3d * oriC,
const MR_IntersectionPrecomputes_double * prec )

Generated from function MR::rayTriangleIntersect<double>. Parameter oriA can not be null. It is a single object. Parameter oriB can not be null. It is a single object. Parameter oriC can not be null. It is a single object. Parameter prec can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_rayTriangleIntersect_double_MR_Vector3d()

MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_double_MR_Vector3d ( const MR_Vector3d * oriA,
const MR_Vector3d * oriB,
const MR_Vector3d * oriC,
const MR_Vector3d * dir )

Generated from function MR::rayTriangleIntersect<double>. Parameter oriA can not be null. It is a single object. Parameter oriB can not be null. It is a single object. Parameter oriC can not be null. It is a single object. Parameter dir can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_rayTriangleIntersect_float_MR_IntersectionPrecomputes_float()

MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_float_MR_IntersectionPrecomputes_float ( const MR_Vector3f * oriA,
const MR_Vector3f * oriB,
const MR_Vector3f * oriC,
const MR_IntersectionPrecomputes_float * prec )

Generated from function MR::rayTriangleIntersect<float>. Parameter oriA can not be null. It is a single object. Parameter oriB can not be null. It is a single object. Parameter oriC can not be null. It is a single object. Parameter prec can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_rayTriangleIntersect_float_MR_Vector3f()

MRC_API MR_std_optional_MR_TriIntersectResult * MR_rayTriangleIntersect_float_MR_Vector3f ( const MR_Vector3f * oriA,
const MR_Vector3f * oriB,
const MR_Vector3f * oriC,
const MR_Vector3f * dir )

Generated from function MR::rayTriangleIntersect<float>. Parameter oriA can not be null. It is a single object. Parameter oriB can not be null. It is a single object. Parameter oriC can not be null. It is a single object. Parameter dir can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_TriIntersectResult_AssignFromAnother()

MRC_API MR_TriIntersectResult * MR_TriIntersectResult_AssignFromAnother ( MR_TriIntersectResult * _this,
const MR_TriIntersectResult * _other )

Generated from method MR::TriIntersectResult::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 had previously.

◆ MR_TriIntersectResult_Construct()

MRC_API MR_TriIntersectResult * MR_TriIntersectResult_Construct ( float U,
float V,
float dist )

Generated from constructor MR::TriIntersectResult::TriIntersectResult. Never returns null. Returns an instance allocated on the heap! Must call MR_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_TriIntersectResult_ConstructFromAnother()

MRC_API MR_TriIntersectResult * MR_TriIntersectResult_ConstructFromAnother ( const MR_TriIntersectResult * _other)

Generated from constructor MR::TriIntersectResult::TriIntersectResult. 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_TriIntersectResult_Destroy() to free it when you're done using it.

◆ MR_TriIntersectResult_Destroy()

MRC_API void MR_TriIntersectResult_Destroy ( const MR_TriIntersectResult * _this)

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

◆ MR_TriIntersectResult_DestroyArray()

MRC_API void MR_TriIntersectResult_DestroyArray ( const MR_TriIntersectResult * _this)

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

◆ MR_TriIntersectResult_Get_bary()

MRC_API const MR_TriPointf * MR_TriIntersectResult_Get_bary ( const MR_TriIntersectResult * _this)

Returns a pointer to a member variable of class MR::TriIntersectResult named bary. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_TriIntersectResult_Get_t()

MRC_API const float * MR_TriIntersectResult_Get_t ( const MR_TriIntersectResult * _this)

Returns a pointer to a member variable of class MR::TriIntersectResult named t. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_TriIntersectResult_GetMutable_bary()

MRC_API MR_TriPointf * MR_TriIntersectResult_GetMutable_bary ( MR_TriIntersectResult * _this)

Returns a mutable pointer to a member variable of class MR::TriIntersectResult named bary. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_TriIntersectResult_GetMutable_t()

MRC_API float * MR_TriIntersectResult_GetMutable_t ( MR_TriIntersectResult * _this)

Returns a mutable pointer to a member variable of class MR::TriIntersectResult named t. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_TriIntersectResult_OffsetMutablePtr()

MRC_API MR_TriIntersectResult * MR_TriIntersectResult_OffsetMutablePtr ( MR_TriIntersectResult * 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_TriIntersectResult_OffsetPtr()

MRC_API const MR_TriIntersectResult * MR_TriIntersectResult_OffsetPtr ( const MR_TriIntersectResult * 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_TriIntersectResult_Set_bary()

MRC_API void MR_TriIntersectResult_Set_bary ( MR_TriIntersectResult * _this,
const MR_TriPointf * value )

Modifies a member variable of class MR::TriIntersectResult named bary. Parameter _this can not be null. It is a single object. Parameter value can not be null. It is a single object. The reference to the parameter value might be preserved in this object in element bary. When this function is called, this object will drop object references it had previously in bary.

◆ MR_TriIntersectResult_Set_t()

MRC_API void MR_TriIntersectResult_Set_t ( MR_TriIntersectResult * _this,
float value )

Modifies a member variable of class MR::TriIntersectResult named t. Parameter _this can not be null. It is a single object. When this function is called, this object will drop object references it had previously in t.