MeshLib C Docs
Loading...
Searching...
No Matches
MRClosestWeightedPoint.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMesh/MRVector3.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/compare.h>
7#include <MRCMisc/exports.h>
8
9#include <stdbool.h>
10#include <stddef.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_AABBTreePoints MR_AABBTreePoints; // Defined in `#include <MRCMesh/MRAABBTreePoints.h>`.
17typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
18typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
19typedef struct MR_std_function_float_from_MR_VertId MR_std_function_float_from_MR_VertId; // Defined in `#include <MRCMisc/std_function_float_from_MR_VertId.h>`.
20
21
25
29
36
43
50
57
64
71
77
84
88
93
99
103
107
113
116
119
123
131
136
143
150
157
164
172
179
186
192
199
206
212
219
229
238
248
252
257
264MRC_API MR_MeshPointAndDistance *MR_MeshPointAndDistance_ConstructFrom(MR_Vector3f loc, const MR_MeshTriPoint *mtp, float eucledeanDist, float w, bool bidirectionalOrOutside);
265
269
273
279
282
285
289
297
302
309
315
321
327
333
339
344
351
358
365
373
380
388
396
403
411
419
426
434
444
453
463
467
472
477MRC_API MR_DistanceFromWeightedPointsParams *MR_DistanceFromWeightedPointsParams_ConstructFrom(MR_PassBy pointWeight_pass_by, MR_std_function_float_from_MR_VertId *pointWeight, float minWeight, float maxWeight, float maxWeightGrad, bool bidirectionalMode);
478
482
486
491
494
497
504
505// default 0 here does not work for negative distances
511
512// default 0 here does not work for negative distances
517
518// default 0 here does not work for negative distances
524
531
537
544
551
558
565
573
580
588
596
603
611
619
626
634
644
653
663
667
672
676
680
685
689
695
700
705
708
711
718
728
738
739#ifdef __cplusplus
740} // extern "C"
741#endif
struct MR_AABBTreePoints MR_AABBTreePoints
Definition MRAABBTreePoints.h:37
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
MRC_API void MR_PointAndDistance_Set_dist(MR_PointAndDistance *_this, float value)
MRC_API const float * MR_DistanceFromWeightedPointsComputeParams_Get_minBidirDist(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API bool MR_MeshPointAndDistance_ConvertTo_bool(const MR_MeshPointAndDistance *_this)
MRC_API float * MR_DistanceFromWeightedPointsComputeParams_GetMutable_maxWeightGrad(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API float MR_MeshPointAndDistance_dist(const MR_MeshPointAndDistance *_this)
struct MR_MeshPointAndDistance MR_MeshPointAndDistance
Definition MRClosestWeightedPoint.h:28
MRC_API const float * MR_PointAndDistance_Get_dist(const MR_PointAndDistance *_this)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_DefaultConstruct(void)
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_ConstructFromAnother(const MR_MeshPointAndDistance *_other)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_minBidirDist(MR_DistanceFromWeightedPointsComputeParams *_this, float value)
MRC_API const MR_Vector3f * MR_MeshPointAndDistance_Get_loc(const MR_MeshPointAndDistance *_this)
MRC_API void MR_DistanceFromWeightedPointsParams_Set_minWeight(MR_DistanceFromWeightedPointsParams *_this, float value)
MRC_API bool MR_PointAndDistance_ConvertTo_bool(const MR_PointAndDistance *_this)
MRC_API const float * MR_DistanceFromWeightedPointsParams_Get_maxWeight(const MR_DistanceFromWeightedPointsParams *_this)
MRC_API bool MR_less_MR_MeshPointAndDistance(const MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *other)
MRC_API bool MR_less_equal_MR_MeshPointAndDistance(const MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *other)
MRC_API void MR_MeshPointAndDistance_Destroy(const MR_MeshPointAndDistance *_this)
Destroys a heap-allocated instance of MR_MeshPointAndDistance. Does nothing if the pointer is null.
MRC_API MR_std_function_float_from_MR_VertId * MR_DistanceFromWeightedPointsComputeParams_GetMutable_pointWeight(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API float * MR_DistanceFromWeightedPointsParams_GetMutable_maxWeight(MR_DistanceFromWeightedPointsParams *_this)
struct MR_DistanceFromWeightedPointsParams MR_DistanceFromWeightedPointsParams
Definition MRClosestWeightedPoint.h:35
MRC_API float * MR_PointAndDistance_GetMutable_dist(MR_PointAndDistance *_this)
MRC_API MR_std_function_float_from_MR_VertId * MR_DistanceFromWeightedPointsParams_GetMutable_pointWeight(MR_DistanceFromWeightedPointsParams *_this)
MRC_API void MR_DistanceFromWeightedPointsParams_Set_maxWeightGrad(MR_DistanceFromWeightedPointsParams *_this, float value)
MRC_API const MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_OffsetPtr(const MR_DistanceFromWeightedPointsParams *ptr, ptrdiff_t i)
MRC_API void MR_DistanceFromWeightedPointsParams_Destroy(const MR_DistanceFromWeightedPointsParams *_this)
Destroys a heap-allocated instance of MR_DistanceFromWeightedPointsParams. Does nothing if the pointe...
MRC_API const MR_std_function_float_from_MR_VertId * MR_DistanceFromWeightedPointsParams_Get_pointWeight(const MR_DistanceFromWeightedPointsParams *_this)
MRC_API MR_PointAndDistance * MR_PointAndDistance_DefaultConstructArray(size_t num_elems)
MRC_API const MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_StaticDowncastFrom_MR_DistanceFromWeightedPointsParams(const MR_DistanceFromWeightedPointsParams *object)
MRC_API const bool * MR_MeshPointAndDistance_Get_bidirectionalOrOutside(const MR_MeshPointAndDistance *_this)
MRC_API MR_MeshPointAndDistance * MR_findClosestWeightedMeshPoint(const MR_Vector3f *loc, const MR_Mesh *mesh, const MR_DistanceFromWeightedPointsComputeParams *params)
MRC_API const float * MR_DistanceFromWeightedPointsComputeParams_Get_maxWeightGrad(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API void MR_MeshPointAndDistance_Set_eucledeanDist(MR_MeshPointAndDistance *_this, float value)
MRC_API const bool * MR_DistanceFromWeightedPointsComputeParams_Get_bidirectionalMode(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API void MR_MeshPointAndDistance_Set_loc(MR_MeshPointAndDistance *_this, MR_Vector3f value)
MRC_API const MR_std_function_float_from_MR_VertId * MR_DistanceFromWeightedPointsComputeParams_Get_pointWeight(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API const MR_MeshTriPoint * MR_MeshPointAndDistance_Get_mtp(const MR_MeshPointAndDistance *_this)
MRC_API MR_std_partial_ordering MR_compare_three_way_MR_MeshPointAndDistance(const MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *other)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_bidirectionalMode(MR_DistanceFromWeightedPointsComputeParams *_this, bool value)
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_DefaultConstruct(void)
MRC_API float * MR_MeshPointAndDistance_GetMutable_w(MR_MeshPointAndDistance *_this)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_maxBidirDist(MR_DistanceFromWeightedPointsComputeParams *_this, float value)
MRC_API MR_PointAndDistance * MR_PointAndDistance_AssignFromAnother(MR_PointAndDistance *_this, const MR_PointAndDistance *_other)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_pointWeight(MR_DistanceFromWeightedPointsComputeParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_VertId *value)
MRC_API MR_Vector3f * MR_MeshPointAndDistance_GetMutable_loc(MR_MeshPointAndDistance *_this)
MRC_API void MR_PointAndDistance_Set_vId(MR_PointAndDistance *_this, MR_VertId value)
MRC_API MR_PointAndDistance * MR_PointAndDistance_DefaultConstruct(void)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_DistanceFromWeightedPointsParams *_other)
MRC_API void MR_MeshPointAndDistance_DestroyArray(const MR_MeshPointAndDistance *_this)
Destroys a heap-allocated array of MR_MeshPointAndDistance. Does nothing if the pointer is null.
MRC_API const bool * MR_DistanceFromWeightedPointsParams_Get_bidirectionalMode(const MR_DistanceFromWeightedPointsParams *_this)
MRC_API void MR_PointAndDistance_DestroyArray(const MR_PointAndDistance *_this)
Destroys a heap-allocated array of MR_PointAndDistance. Does nothing if the pointer is null.
MRC_API const float * MR_MeshPointAndDistance_Get_w(const MR_MeshPointAndDistance *_this)
MRC_API const float * MR_DistanceFromWeightedPointsComputeParams_Get_maxWeight(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API const float * MR_DistanceFromWeightedPointsParams_Get_minWeight(const MR_DistanceFromWeightedPointsParams *_this)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Destroy(const MR_DistanceFromWeightedPointsComputeParams *_this)
Destroys a heap-allocated instance of MR_DistanceFromWeightedPointsComputeParams. Does nothing if the...
MRC_API float * MR_DistanceFromWeightedPointsParams_GetMutable_minWeight(MR_DistanceFromWeightedPointsParams *_this)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_OffsetMutablePtr(MR_DistanceFromWeightedPointsParams *ptr, ptrdiff_t i)
MRC_API const float * MR_DistanceFromWeightedPointsComputeParams_Get_maxBidirDist(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_DefaultConstructArray(size_t num_elems)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_DestroyArray(const MR_DistanceFromWeightedPointsComputeParams *_this)
Destroys a heap-allocated array of MR_DistanceFromWeightedPointsComputeParams. Does nothing if the po...
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_DefaultConstructArray(size_t num_elems)
MRC_API const float * MR_DistanceFromWeightedPointsComputeParams_Get_minWeight(const MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API float MR_MeshPointAndDistance_bidirDist(const MR_MeshPointAndDistance *_this)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_minWeight(MR_DistanceFromWeightedPointsComputeParams *_this, float value)
MRC_API float * MR_DistanceFromWeightedPointsComputeParams_GetMutable_minWeight(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API void MR_DistanceFromWeightedPointsParams_Set_bidirectionalMode(MR_DistanceFromWeightedPointsParams *_this, bool value)
MRC_API bool * MR_DistanceFromWeightedPointsParams_GetMutable_bidirectionalMode(MR_DistanceFromWeightedPointsParams *_this)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsComputeParams_MutableUpcastTo_MR_DistanceFromWeightedPointsParams(MR_DistanceFromWeightedPointsComputeParams *object)
MRC_API void MR_MeshPointAndDistance_Set_bidirectionalOrOutside(MR_MeshPointAndDistance *_this, bool value)
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_ConstructFrom(MR_Vector3f loc, const MR_MeshTriPoint *mtp, float eucledeanDist, float w, bool bidirectionalOrOutside)
MRC_API void MR_PointAndDistance_Destroy(const MR_PointAndDistance *_this)
Destroys a heap-allocated instance of MR_PointAndDistance. Does nothing if the pointer is null.
MRC_API bool * MR_MeshPointAndDistance_GetMutable_bidirectionalOrOutside(MR_MeshPointAndDistance *_this)
struct MR_DistanceFromWeightedPointsComputeParams MR_DistanceFromWeightedPointsComputeParams
Definition MRClosestWeightedPoint.h:42
MRC_API float * MR_DistanceFromWeightedPointsParams_GetMutable_maxWeightGrad(MR_DistanceFromWeightedPointsParams *_this)
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_AssignFromAnother(MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *_other)
MRC_API bool MR_greater_MR_MeshPointAndDistance(const MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *other)
MRC_API void MR_MeshPointAndDistance_Set_w(MR_MeshPointAndDistance *_this, float value)
MRC_API MR_PointAndDistance * MR_PointAndDistance_OffsetMutablePtr(MR_PointAndDistance *ptr, ptrdiff_t i)
MRC_API const MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_OffsetPtr(const MR_DistanceFromWeightedPointsComputeParams *ptr, ptrdiff_t i)
MRC_API const float * MR_DistanceFromWeightedPointsParams_Get_maxWeightGrad(const MR_DistanceFromWeightedPointsParams *_this)
MRC_API bool * MR_DistanceFromWeightedPointsComputeParams_GetMutable_bidirectionalMode(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API const MR_VertId * MR_PointAndDistance_Get_vId(const MR_PointAndDistance *_this)
MRC_API bool MR_PointAndDistance_valid(const MR_PointAndDistance *_this)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_maxWeightGrad(MR_DistanceFromWeightedPointsComputeParams *_this, float value)
MRC_API bool MR_greater_equal_MR_MeshPointAndDistance(const MR_MeshPointAndDistance *_this, const MR_MeshPointAndDistance *other)
MRC_API MR_MeshPointAndDistance * MR_MeshPointAndDistance_OffsetMutablePtr(MR_MeshPointAndDistance *ptr, ptrdiff_t i)
MRC_API void MR_DistanceFromWeightedPointsParams_Set_pointWeight(MR_DistanceFromWeightedPointsParams *_this, MR_PassBy value_pass_by, MR_std_function_float_from_MR_VertId *value)
MRC_API float * MR_DistanceFromWeightedPointsComputeParams_GetMutable_maxBidirDist(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_ConstructFrom(MR_PassBy pointWeight_pass_by, MR_std_function_float_from_MR_VertId *pointWeight, float minWeight, float maxWeight, float maxWeightGrad, bool bidirectionalMode)
MRC_API bool MR_MeshPointAndDistance_valid(const MR_MeshPointAndDistance *_this)
MRC_API MR_PointAndDistance * MR_PointAndDistance_ConstructFromAnother(const MR_PointAndDistance *_other)
MRC_API const MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsComputeParams_UpcastTo_MR_DistanceFromWeightedPointsParams(const MR_DistanceFromWeightedPointsComputeParams *object)
struct MR_std_function_float_from_MR_VertId MR_std_function_float_from_MR_VertId
Definition MRClosestWeightedPoint.h:19
MRC_API float * MR_DistanceFromWeightedPointsComputeParams_GetMutable_maxWeight(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API const MR_MeshPointAndDistance * MR_MeshPointAndDistance_OffsetPtr(const MR_MeshPointAndDistance *ptr, ptrdiff_t i)
MRC_API void MR_MeshPointAndDistance_Set_mtp(MR_MeshPointAndDistance *_this, const MR_MeshTriPoint *value)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_ConstructFromAnother(MR_PassBy _other_pass_by, MR_DistanceFromWeightedPointsComputeParams *_other)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_AssignFromAnother(MR_DistanceFromWeightedPointsComputeParams *_this, MR_PassBy _other_pass_by, MR_DistanceFromWeightedPointsComputeParams *_other)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_AssignFromAnother(MR_DistanceFromWeightedPointsParams *_this, MR_PassBy _other_pass_by, MR_DistanceFromWeightedPointsParams *_other)
MRC_API MR_VertId * MR_PointAndDistance_GetMutable_vId(MR_PointAndDistance *_this)
MRC_API MR_MeshTriPoint * MR_MeshPointAndDistance_GetMutable_mtp(MR_MeshPointAndDistance *_this)
MRC_API float * MR_MeshPointAndDistance_GetMutable_eucledeanDist(MR_MeshPointAndDistance *_this)
MRC_API const MR_PointAndDistance * MR_PointAndDistance_OffsetPtr(const MR_PointAndDistance *ptr, ptrdiff_t i)
MRC_API MR_DistanceFromWeightedPointsParams * MR_DistanceFromWeightedPointsParams_DefaultConstruct(void)
MRC_API MR_PointAndDistance * MR_findClosestWeightedPoint(const MR_Vector3f *loc, const MR_AABBTreePoints *tree, const MR_DistanceFromWeightedPointsComputeParams *params)
MRC_API MR_PointAndDistance * MR_PointAndDistance_ConstructFrom(MR_VertId vId, float dist)
MRC_API void MR_DistanceFromWeightedPointsParams_Set_maxWeight(MR_DistanceFromWeightedPointsParams *_this, float value)
MRC_API void MR_DistanceFromWeightedPointsParams_DestroyArray(const MR_DistanceFromWeightedPointsParams *_this)
Destroys a heap-allocated array of MR_DistanceFromWeightedPointsParams. Does nothing if the pointer i...
MRC_API float * MR_DistanceFromWeightedPointsComputeParams_GetMutable_minBidirDist(MR_DistanceFromWeightedPointsComputeParams *_this)
MRC_API const float * MR_MeshPointAndDistance_Get_eucledeanDist(const MR_MeshPointAndDistance *_this)
MRC_API void MR_DistanceFromWeightedPointsComputeParams_Set_maxWeight(MR_DistanceFromWeightedPointsComputeParams *_this, float value)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_MutableStaticDowncastFrom_MR_DistanceFromWeightedPointsParams(MR_DistanceFromWeightedPointsParams *object)
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_OffsetMutablePtr(MR_DistanceFromWeightedPointsComputeParams *ptr, ptrdiff_t i)
struct MR_PointAndDistance MR_PointAndDistance
Definition MRClosestWeightedPoint.h:24
struct MR_Mesh MR_Mesh
Definition MRCtm.h:17
MR_PassBy
Definition common.h:13
MR_std_partial_ordering
The result of a three-way comparison between values that are not necessarily ordered with respect to ...
Definition compare.h:10
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector3f.
Definition MRVector3.h:47
Definition MRId.h:41