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_BitSet MR_BitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
13typedef struct MR_EdgePoint MR_EdgePoint; // Defined in `#include <MRCMesh/MREdgePoint.h>`.
14typedef struct MR_IntersectionPrecomputes2_double MR_IntersectionPrecomputes2_double; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes2.h>`.
15typedef struct MR_IntersectionPrecomputes2_float MR_IntersectionPrecomputes2_float; // Defined in `#include <MRCMesh/MRIntersectionPrecomputes2.h>`.
16typedef struct MR_Line2d MR_Line2d; // Defined in `#include <MRCMesh/MRLine.h>`.
17typedef struct MR_Line2f MR_Line2f; // Defined in `#include <MRCMesh/MRLine.h>`.
18typedef struct MR_Polyline2 MR_Polyline2; // Defined in `#include <MRCMesh/MRPolyline.h>`.
19typedef struct MR_Vector2f MR_Vector2f; // Defined in `#include <MRCMesh/MRVector2.h>`.
20typedef struct MR_Vector2i MR_Vector2i; // Defined in `#include <MRCMesh/MRVector2.h>`.
21typedef struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref_double_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref_double_ref; // Defined in `#include <MRCMisc/std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref_double_ref.h>`.
22typedef struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref_float_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref_float_ref; // Defined in `#include <MRCMisc/std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref_float_ref.h>`.
23typedef struct MR_std_optional_MR_PolylineIntersectionResult2 MR_std_optional_MR_PolylineIntersectionResult2; // Defined in `#include <MRCMisc/std_optional_MR_PolylineIntersectionResult2.h>`.
24
25
29
38MRC_API bool MR_isPointInsidePolyline(const MR_Polyline2 *polyline, const MR_Vector2f *point);
39
52MRC_API MR_BitSet *MR_findGridPointsInsidePolyline(const MR_Polyline2 *polyline, const MR_Vector2i *dims, const MR_Vector2f *origin, const MR_Vector2f *step);
53
60
68
75
82
88
95
99
104
111
115
119
125
128
131
139
153MRC_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);
154
168MRC_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);
169
180
191
192#ifdef __cplusplus
193} // extern "C"
194#endif
struct MR_Polyline2 MR_Polyline2
Definition MRAABBTreePolyline.h:23
struct MR_BitSet MR_BitSet
Definition MRBitSet.h:290
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:23
struct MR_IntersectionPrecomputes2_double MR_IntersectionPrecomputes2_double
Definition MRIntersectionPrecomputes2.h:23
struct MR_IntersectionPrecomputes2_float MR_IntersectionPrecomputes2_float
Definition MRIntersectionPrecomputes2.h:17
struct MR_Line2f MR_Line2f
Definition MRLine.h:20
struct MR_Line2d MR_Line2d
Definition MRLine.h:25
MRC_API void MR_PolylineIntersectionResult2_Set_distanceAlongLine(MR_PolylineIntersectionResult2 *_this, float value)
struct MR_PolylineIntersectionResult2 MR_PolylineIntersectionResult2
Definition MRPolyline2Intersect.h:28
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_DefaultConstruct(void)
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_AssignFromAnother(MR_PolylineIntersectionResult2 *_this, const MR_PolylineIntersectionResult2 *_other)
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_float_ref *callback, const float *rayStart, const float *rayEnd, const MR_IntersectionPrecomputes2_float *prec)
MRC_API const MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_OffsetPtr(const MR_PolylineIntersectionResult2 *ptr, ptrdiff_t i)
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...
struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref_double_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_double_double_ref_double_ref
Definition MRPolyline2Intersect.h:21
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)
struct MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref_float_ref MR_std_function_MR_Processing_from_const_MR_EdgePoint_ref_float_float_ref_float_ref
Definition MRPolyline2Intersect.h:22
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_ConstructFromAnother(const MR_PolylineIntersectionResult2 *_other)
MRC_API MR_BitSet * MR_findGridPointsInsidePolyline(const MR_Polyline2 *polyline, const MR_Vector2i *dims, const MR_Vector2f *origin, const MR_Vector2f *step)
struct MR_std_optional_MR_PolylineIntersectionResult2 MR_std_optional_MR_PolylineIntersectionResult2
Definition MRPolyline2Intersect.h:23
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 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_double_ref *callback, const double *rayStart, const double *rayEnd, const MR_IntersectionPrecomputes2_double *prec)
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)
MRC_API const float * MR_PolylineIntersectionResult2_Get_distanceAlongLine(const MR_PolylineIntersectionResult2 *_this)
MRC_API MR_PolylineIntersectionResult2 * MR_PolylineIntersectionResult2_DefaultConstructArray(size_t num_elems)
MRC_API void MR_PolylineIntersectionResult2_Destroy(const MR_PolylineIntersectionResult2 *_this)
Destroys a heap-allocated instance of MR_PolylineIntersectionResult2. Does nothing if the pointer is ...
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector2f.
Definition MRVector2.h:36
Generated from class MR::Vector2i.
Definition MRVector2.h:50