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/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_AABBTreePoints MR_AABBTreePoints; // Defined in `#include <MRCMesh/MRAABBTreePoints.h>`.
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
18typedef 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>`.
19
20
24
28
35
42
48
53
59
65
70
76
80
85
89
92
95
100
103
106
110
116
121
127
132
138
144
150
156
162
167
173
179
184
190
199
207
216
220
225
229MRC_API MR_MeshPointAndDistance *MR_MeshPointAndDistance_ConstructFrom(MR_Vector3f loc, const MR_MeshTriPoint *mtp, float eucledeanDist, float w, bool bidirectionalOrOutside);
230
233
236
241
244
247
251
257
262
269
274
280
285
291
298
304
311
318
324
331
338
344
351
360
368
377
381
386
389MRC_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);
390
393
396
401
405
409
412
415
420
421// default 0 here does not work for negative distances
426
427// default 0 here does not work for negative distances
431
432// default 0 here does not work for negative distances
437
443
448
454
460
465
471
478
484
491
498
504
511
518
524
531
540
548
557
561
566
569
572
576
579
583
586
589
594
604
614
615#ifdef __cplusplus
616} // extern "C"
617#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:27
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 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:34
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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 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 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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
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)
Upcasts an instance of MR::DistanceFromWeightedPointsComputeParams to its base class MR::DistanceFrom...
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:41
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 void MR_MeshPointAndDistance_Set_w(MR_MeshPointAndDistance *_this, float value)
MRC_API MR_PointAndDistance * MR_PointAndDistance_OffsetMutablePtr(MR_PointAndDistance *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_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsComputeParams_OffsetPtr(const MR_DistanceFromWeightedPointsComputeParams *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 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 MR_MeshPointAndDistance * MR_MeshPointAndDistance_OffsetMutablePtr(MR_MeshPointAndDistance *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 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:18
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_MeshPointAndDistance_Set_mtp(MR_MeshPointAndDistance *_this, const MR_MeshTriPoint *value)
MRC_API const MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsParams_StaticDowncastTo_MR_DistanceFromWeightedPointsComputeParams(const MR_DistanceFromWeightedPointsParams *object)
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)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_DistanceFromWeightedPointsComputeParams * MR_DistanceFromWeightedPointsParams_MutableStaticDowncastTo_MR_DistanceFromWeightedPointsComputeParams(MR_DistanceFromWeightedPointsParams *object)
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_OffsetMutablePtr(MR_DistanceFromWeightedPointsComputeParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_PointAndDistance MR_PointAndDistance
Definition MRClosestWeightedPoint.h:23
struct MR_Mesh MR_Mesh
Definition MRCtm.h:16
MR_PassBy
Definition common.h:23
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:52
Definition MRId.h:55