MeshLib C Docs
Loading...
Searching...
No Matches
MRPolyline2Intersect.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/exports.h>
4
5#include <stdbool.h>
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_EdgePoint MR_EdgePoint; // Defined in `#include <MRCMesh/MREdgePoint.h>`.
13typedef struct MR_IntersectionPrecomputes2_double MR_IntersectionPrecomputes2_double; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes2.h>`.
14typedef struct MR_IntersectionPrecomputes2_float MR_IntersectionPrecomputes2_float; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes2.h>`.
15typedef struct MR_Line2d MR_Line2d; // Defined in `#include <MRCMesh/MRLine.h>`.
16typedef struct MR_Line2f MR_Line2f; // Defined in `#include <MRCMesh/MRLine.h>`.
17typedef struct MR_Polyline2 MR_Polyline2; // Defined in `#include <MRCMesh/MRPolyline.h>`.
18typedef struct MR_Vector2f MR_Vector2f; // Defined in `#include <MRCMesh/MRVector2.h>`.
19typedef struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref; // Defined in `#include <MRCMisc/std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref.h>`.
20typedef struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref; // Defined in `#include <MRCMisc/std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref.h>`.
21typedef struct MR_std_optional_MR_PolylineIntersectionResult2 MR_std_optional_MR_PolylineIntersectionResult2; // Defined in `#include <MRCMisc/std_optional_MR_PolylineIntersectionResult2.h>`.
22
23
26
35MRC_API bool MR_isPointInsidePolyline(const MR_Polyline2 *polyline, const MR_Vector2f *point);
36
42
48
54
60
65
71
75
80
85
88
91
96
99
102
108
121MRC_API MR_std_optional_MR_PolylineIntersectionResult2 *MR_rayPolylineIntersect_MR_Line2f(const MR_Polyline2 *polyline, const MR_Line2f *line, const float *rayStart, const float *rayEnd, const MR_IntersectionPrecomputes2_float *prec, const bool *closestIntersect);
122
135MRC_API MR_std_optional_MR_PolylineIntersectionResult2 *MR_rayPolylineIntersect_MR_Line2d(const MR_Polyline2 *polyline, const MR_Line2d *line, const double *rayStart, const double *rayEnd, const MR_IntersectionPrecomputes2_double *prec, const bool *closestIntersect);
136
147
158
159#ifdef __cplusplus
160} // extern "C"
161#endif
struct MR_Polyline2 MR_Polyline2
Definition MRAABBTreePolyline.h:15
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:21
struct MR_IntersectionPrecomputes2_double MR_IntersectionPrecomputes2_double
Definition MRIntersectionPrecomputes2.h:22
struct MR_IntersectionPrecomputes2_float MR_IntersectionPrecomputes2_float
Definition MRIntersectionPrecomputes2.h:17
struct MR_Line2f MR_Line2f
Definition MRLine.h:16
struct MR_Line2d MR_Line2d
Definition MRLine.h:20
MRC_API void MR_PolylineIntersectionResult2_Set_distanceAlongLine(MR_PolylineIntersectionResult2 *_this, float value)
struct MR_PolylineIntersectionResult2 MR_PolylineIntersectionResult2
Generated from class MR::PolylineIntersectionResult2.
Definition MRPolyline2Intersect.h:25
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_DefaultConstruct(void)
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_AssignFromAnother(MR_PolylineIntersectionResult2 *_this, const MR_PolylineIntersectionResult2 *_other)
MRC_API const MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_OffsetPtr(const MR_PolylineIntersectionResult2 *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API const MR_EdgePoint * MR_PolylineIntersectionResult2_Get_edgePoint(const MR_PolylineIntersectionResult2 *_this)
MRC_API void MR_PolylineIntersectionResult2_DestroyArray(const MR_PolylineIntersectionResult2 *_this)
Destroys a heap-allocated array of MR_PolylineIntersectionResult2. Does nothing if the pointer is nul...
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_ConstructFrom(const MR_EdgePoint *edgePoint, float distanceAlongLine)
MRC_API MR_std_optional_MR_PolylineIntersectionResult2 * MR_rayPolylineIntersect_MR_Line2f(const MR_Polyline2 *polyline, const MR_Line2f *line, const float *rayStart, const float *rayEnd, const MR_IntersectionPrecomputes2_float *prec, const bool *closestIntersect)
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_OffsetMutablePtr(MR_PolylineIntersectionResult2 *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_ConstructFromAnother(const MR_PolylineIntersectionResult2 *_other)
struct MR_std_optional_MR_PolylineIntersectionResult2 MR_std_optional_MR_PolylineIntersectionResult2
Definition MRPolyline2Intersect.h:21
MRC_API MR_std_optional_MR_PolylineIntersectionResult2 * MR_rayPolylineIntersect_MR_Line2d(const MR_Polyline2 *polyline, const MR_Line2d *line, const double *rayStart, const double *rayEnd, const MR_IntersectionPrecomputes2_double *prec, const bool *closestIntersect)
MRC_API float * MR_PolylineIntersectionResult2_GetMutable_distanceAlongLine(MR_PolylineIntersectionResult2 *_this)
MRC_API bool MR_isPointInsidePolyline(const MR_Polyline2 *polyline, const MR_Vector2f *point)
detect if given point is inside polyline, by counting ray intersections
MRC_API void MR_PolylineIntersectionResult2_Set_edgePoint(MR_PolylineIntersectionResult2 *_this, const MR_EdgePoint *value)
MRC_API MR_EdgePoint * MR_PolylineIntersectionResult2_GetMutable_edgePoint(MR_PolylineIntersectionResult2 *_this)
struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref
Definition MRPolyline2Intersect.h:19
MRC_API const float * MR_PolylineIntersectionResult2_Get_distanceAlongLine(const MR_PolylineIntersectionResult2 *_this)
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_DefaultConstructArray(size_t num_elems)
struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref
Definition MRPolyline2Intersect.h:20
MRC_API void MR_rayPolylineIntersectAll_MR_Line2f(const MR_Polyline2 *polyline, const MR_Line2f *line, const MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref *callback, const float *rayStart, const float *rayEnd, const MR_IntersectionPrecomputes2_float *prec)
MRC_API void MR_PolylineIntersectionResult2_Destroy(const MR_PolylineIntersectionResult2 *_this)
Destroys a heap-allocated instance of MR_PolylineIntersectionResult2. Does nothing if the pointer is ...
MRC_API void MR_rayPolylineIntersectAll_MR_Line2d(const MR_Polyline2 *polyline, const MR_Line2d *line, const MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref *callback, const double *rayStart, const double *rayEnd, const MR_IntersectionPrecomputes2_double *prec)
#define MRC_API
Definition exports.h:11
Definition MRVector2.h:44