MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshOrPoints.h
Go to the documentation of this file.
1#pragma once
2
4#include <MRCMesh/MRBox.h>
5#include <MRCMesh/MRId.h>
6#include <MRCMesh/MRVector3.h>
7#include <MRCMisc/common.h>
8#include <MRCMisc/exports.h>
9
10#include <stdbool.h>
11#include <stddef.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct MR_AABBTreeObjects MR_AABBTreeObjects; // Defined in `#include <MRCMesh/MRAABBTreeObjects.h>`.
18typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
19typedef struct MR_MeshPart MR_MeshPart; // Defined in `#include <MRCMesh/MRMeshPart.h>`.
20typedef struct MR_Object MR_Object; // Defined in `#include <MRCMesh/MRObject.h>`.
21typedef struct MR_PointAccumulator MR_PointAccumulator; // Defined in `#include <MRCMesh/MRBestFit.h>`.
22typedef struct MR_PointCloud MR_PointCloud; // Defined in `#include <MRCMesh/MRPointCloud.h>`.
23typedef struct MR_PointCloudPart MR_PointCloudPart; // Defined in `#include <MRCMesh/MRPointCloudPart.h>`.
24typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
25typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
26typedef struct MR_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref MR_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref; // Defined in `#include <MRCMisc/std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref.h>`.
27typedef struct MR_std_function_MR_Vector3f_from_MR_VertId MR_std_function_MR_Vector3f_from_MR_VertId; // Defined in `#include <MRCMisc/std_function_MR_Vector3f_from_MR_VertId.h>`.
28typedef struct MR_std_function_bool_from_const_MR_Object_ref MR_std_function_bool_from_const_MR_Object_ref; // Defined in `#include <MRCMisc/std_function_bool_from_const_MR_Object_ref.h>`.
29typedef struct MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref; // Defined in `#include <MRCMisc/std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref.h>`.
30typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
31typedef 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>`.
32typedef struct MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult; // Defined in `#include <MRCMisc/std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult.h>`.
33typedef struct MR_std_optional_MR_MeshOrPoints MR_std_optional_MR_MeshOrPoints; // Defined in `#include <MRCMisc/std_optional_MR_MeshOrPoints.h>`.
34typedef struct MR_std_optional_MR_MeshOrPointsXf MR_std_optional_MR_MeshOrPointsXf; // Defined in `#include <MRCMisc/std_optional_MR_MeshOrPointsXf.h>`.
35typedef struct MR_std_optional_MR_Vector3f MR_std_optional_MR_Vector3f; // Defined in `#include <MRCMisc/std_optional_MR_Vector3f.h>`.
36typedef struct MR_std_optional_MR_VertBitSet MR_std_optional_MR_VertBitSet; // Defined in `#include <MRCMisc/std_optional_MR_VertBitSet.h>`.
37
38
43
46
50
55
58
61
66
71
72// these constructors are redundant for C++, but important for python bindings
77
82
85
88
94
99
104
110
115
122
129
141
147
153
159
166
172
180
186
191
197
204
211
218
224
229
235
241
246
252
259
265
272
276
281
286
289
292
297
300
303
307
313
317
322
327
332
337
341
346
351
356
359
362
365
368
374
380
387
392
396
403MRC_API void MR_projectOnAll(const MR_Vector3f *pt, const MR_AABBTreeObjects *tree, float upDistLimitSq, const MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult *callback, const MR_ObjId *skipObjId);
404
411
423
424#ifdef __cplusplus
425} // extern "C"
426#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_AABBTreeObjects MR_AABBTreeObjects
Definition MRAABBTreeBase.h:19
struct MR_MeshOrPoints MR_MeshOrPoints
Definition MRAABBTreeObjects.h:15
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
struct MR_MeshPart MR_MeshPart
Definition MRAABBTree.h:14
struct MR_PointAccumulator MR_PointAccumulator
Definition MRBestFit.h:31
struct MR_PointCloudPart MR_PointCloudPart
Definition MRBestFit.h:23
struct MR_std_optional_MR_VertBitSet MR_std_optional_MR_VertBitSet
Definition MRCloseVertices.h:19
struct MR_std_function_float_from_MR_VertId MR_std_function_float_from_MR_VertId
Definition MRClosestWeightedPoint.h:18
struct MR_Mesh MR_Mesh
Definition MRCtm.h:12
struct MR_PointCloud MR_PointCloud
Definition MRCtm.h:14
struct MR_std_optional_MR_Vector3f MR_std_optional_MR_Vector3f
Definition MRDistanceMap.h:26
struct MR_Object MR_Object
Definition MRGltf.h:10
struct MR_MeshOrPointsXf MR_MeshOrPointsXf
Definition MRICP.h:21
struct MR_std_function_MR_Vector3f_from_MR_VertId MR_std_function_MR_Vector3f_from_MR_VertId
Definition MRLocalTriangulations.h:23
MRC_API MR_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_DefaultConstructArray(size_t num_elems)
MRC_API const MR_PointCloudPart * MR_MeshOrPoints_asPointCloudPart(const MR_MeshOrPoints *_this)
MRC_API const MR_std_optional_MR_Vector3f * MR_MeshOrPoints_ProjectionResult_Get_normal(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API void MR_MeshOrPoints_ProjectionResult_Set_closestVert(MR_MeshOrPoints_ProjectionResult *_this, MR_VertId value)
MRC_API MR_MeshOrPoints * MR_MeshOrPointsXf_GetMutable_obj(MR_MeshOrPointsXf *_this)
MRC_API MR_AffineXf3f * MR_MeshOrPointsXf_GetMutable_xf(MR_MeshOrPointsXf *_this)
MRC_API void MR_MeshOrPoints_Destroy(const MR_MeshOrPoints *_this)
Destroys a heap-allocated instance of MR_MeshOrPoints. Does nothing if the pointer is null.
MRC_API MR_std_optional_MR_Vector3f * MR_MeshOrPoints_ProjectionResult_GetMutable_normal(MR_MeshOrPoints_ProjectionResult *_this)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_Construct_MR_PointCloudPart(const MR_PointCloudPart *pcp)
MRC_API MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref * MR_MeshOrPointsXf_limitedProjector(const MR_MeshOrPointsXf *_this)
struct MR_MeshOrPoints_ProjectionResult MR_MeshOrPoints_ProjectionResult
Generated from class MR::MeshOrPoints::ProjectionResult.
Definition MRMeshOrPoints.h:45
MRC_API MR_MeshOrPoints_ProjectionResult * MR_projectWorldPointOntoObject(const MR_Vector3f *p, const MR_Object *obj)
MRC_API void MR_MeshOrPoints_ProjectionResult_Set_isBd(MR_MeshOrPoints_ProjectionResult *_this, bool value)
MRC_API MR_Box3f MR_MeshOrPoints_computeBoundingBox(const MR_MeshOrPoints *_this, const MR_AffineXf3f *toWorld)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_ConstructFromAnother(const MR_MeshOrPoints *_other)
MRC_API MR_MeshOrPointsXf * MR_MeshOrPointsXf_AssignFromAnother(MR_MeshOrPointsXf *_this, const MR_MeshOrPointsXf *_other)
MRC_API const MR_VertBitSet * MR_MeshOrPoints_validPoints(const MR_MeshOrPoints *_this)
MRC_API MR_std_function_MR_Vector3f_from_MR_VertId * MR_MeshOrPoints_normals(const MR_MeshOrPoints *_this)
MRC_API void MR_MeshOrPointsXf_DestroyArray(const MR_MeshOrPointsXf *_this)
Destroys a heap-allocated array of MR_MeshOrPointsXf. Does nothing if the pointer is null.
MRC_API MR_MeshOrPointsXf * MR_MeshOrPointsXf_ConstructFromAnother(const MR_MeshOrPointsXf *_other)
MRC_API const MR_VertId * MR_MeshOrPoints_ProjectionResult_Get_closestVert(const MR_MeshOrPoints_ProjectionResult *_this)
struct MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult
Definition MRMeshOrPoints.h:32
struct MR_std_optional_MR_MeshOrPointsXf MR_std_optional_MR_MeshOrPointsXf
Definition MRMeshOrPoints.h:34
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_Construct_MR_MeshPart(const MR_MeshPart *mp)
MRC_API bool MR_MeshOrPoints_ProjectionResult_ConvertTo_bool(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API MR_MeshOrPoints_ProjectionResult * MR_projectWorldPointOntoObjectsRecursive(const MR_Vector3f *p, const MR_Object *root, MR_PassBy projectPred_pass_by, MR_std_function_bool_from_const_MR_Object_ref *projectPred, MR_PassBy recursePred_pass_by, MR_std_function_bool_from_const_MR_Object_ref *recursePred)
struct MR_std_optional_MR_MeshOrPoints MR_std_optional_MR_MeshOrPoints
Definition MRMeshOrPoints.h:33
MRC_API void MR_MeshOrPoints_ProjectionResult_Destroy(const MR_MeshOrPoints_ProjectionResult *_this)
Destroys a heap-allocated instance of MR_MeshOrPoints_ProjectionResult. Does nothing if the pointer i...
MRC_API const bool * MR_MeshOrPoints_ProjectionResult_Get_isBd(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API const MR_Vector3f * MR_MeshOrPoints_ProjectionResult_Get_point(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API bool MR_MeshOrPoints_ProjectionResult_valid(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API const MR_AffineXf3f * MR_MeshOrPointsXf_Get_xf(const MR_MeshOrPointsXf *_this)
MRC_API const MR_MeshOrPoints * MR_MeshOrPoints_OffsetPtr(const MR_MeshOrPoints *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_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref MR_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref
Definition MRMeshOrPoints.h:26
MRC_API MR_VertId * MR_MeshOrPoints_ProjectionResult_GetMutable_closestVert(MR_MeshOrPoints_ProjectionResult *_this)
MRC_API void MR_MeshOrPoints_ProjectionResult_Set_normal(MR_MeshOrPoints_ProjectionResult *_this, const MR_Vector3f *value)
MRC_API MR_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref * MR_MeshOrPointsXf_projector(const MR_MeshOrPointsXf *_this)
MRC_API const MR_MeshOrPointsXf * MR_MeshOrPointsXf_OffsetPtr(const MR_MeshOrPointsXf *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_std_function_bool_from_const_MR_Object_ref MR_std_function_bool_from_const_MR_Object_ref
Definition MRMeshOrPoints.h:28
MRC_API void MR_projectOnAll(const MR_Vector3f *pt, const MR_AABBTreeObjects *tree, float upDistLimitSq, const MR_std_function_void_from_MR_ObjId_MR_MeshOrPoints_ProjectionResult *callback, const MR_ObjId *skipObjId)
MRC_API MR_Box3f MR_MeshOrPoints_getObjBoundingBox(const MR_MeshOrPoints *_this)
MRC_API MR_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_ConstructFrom(MR_Vector3f point, const MR_Vector3f *normal, bool isBd, float distSq, MR_VertId closestVert)
MRC_API MR_std_optional_MR_VertBitSet * MR_MeshOrPoints_pointsGridSampling(const MR_MeshOrPoints *_this, float voxelSize, const MR_uint64_t *maxVoxels, const MR_std_function_bool_from_float *cb)
MRC_API const MR_VertCoords * MR_MeshOrPoints_points(const MR_MeshOrPoints *_this)
MRC_API MR_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_DefaultConstruct(void)
MRC_API MR_std_function_float_from_MR_VertId * MR_MeshOrPoints_weights(const MR_MeshOrPoints *_this)
MRC_API MR_std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref * MR_MeshOrPoints_projector(const MR_MeshOrPoints *_this)
MRC_API MR_MeshOrPointsXf * MR_MeshOrPointsXf_ConstructFrom(const MR_MeshOrPoints *obj, MR_AffineXf3f xf)
MRC_API MR_MeshOrPointsXf * MR_MeshOrPointsXf_OffsetMutablePtr(MR_MeshOrPointsXf *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_Vector3f * MR_MeshOrPoints_ProjectionResult_GetMutable_point(MR_MeshOrPoints_ProjectionResult *_this)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_AssignFromAnother(MR_MeshOrPoints *_this, const MR_MeshOrPoints *_other)
MRC_API void MR_MeshOrPoints_cacheAABBTree(const MR_MeshOrPoints *_this)
MRC_API const MR_MeshPart * MR_MeshOrPoints_asMeshPart(const MR_MeshOrPoints *_this)
MRC_API MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref * MR_MeshOrPoints_limitedProjector(const MR_MeshOrPoints *_this)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_Construct_MR_Mesh(const MR_Mesh *mesh)
MRC_API const MR_MeshOrPoints * MR_MeshOrPointsXf_Get_obj(const MR_MeshOrPointsXf *_this)
MRC_API void MR_MeshOrPoints_DestroyArray(const MR_MeshOrPoints *_this)
Destroys a heap-allocated array of MR_MeshOrPoints. Does nothing if the pointer is null.
MRC_API void MR_MeshOrPoints_ProjectionResult_Set_distSq(MR_MeshOrPoints_ProjectionResult *_this, float value)
MRC_API MR_std_optional_MR_MeshOrPoints * MR_getMeshOrPoints(const MR_Object *obj)
MRC_API MR_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_ConstructFromAnother(const MR_MeshOrPoints_ProjectionResult *_other)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_Construct_MR_PointCloud(const MR_PointCloud *pc)
struct MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref MR_std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref
Definition MRMeshOrPoints.h:29
MRC_API void MR_MeshOrPoints_ProjectionResult_DestroyArray(const MR_MeshOrPoints_ProjectionResult *_this)
Destroys a heap-allocated array of MR_MeshOrPoints_ProjectionResult. Does nothing if the pointer is n...
MRC_API float * MR_MeshOrPoints_ProjectionResult_GetMutable_distSq(MR_MeshOrPoints_ProjectionResult *_this)
MRC_API void MR_MeshOrPoints_accumulate(const MR_MeshOrPoints *_this, MR_PointAccumulator *accum, const MR_AffineXf3f *xf)
MRC_API MR_MeshOrPoints * MR_MeshOrPoints_OffsetMutablePtr(MR_MeshOrPoints *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_MeshOrPointsXf_Set_xf(MR_MeshOrPointsXf *_this, MR_AffineXf3f value)
MRC_API void MR_MeshOrPoints_ProjectionResult_Set_point(MR_MeshOrPoints_ProjectionResult *_this, MR_Vector3f value)
MRC_API const float * MR_MeshOrPoints_ProjectionResult_Get_distSq(const MR_MeshOrPoints_ProjectionResult *_this)
MRC_API void MR_MeshOrPointsXf_Set_obj(MR_MeshOrPointsXf *_this, const MR_MeshOrPoints *value)
MRC_API MR_std_optional_MR_MeshOrPointsXf * MR_getMeshOrPointsXf(const MR_Object *obj)
MRC_API bool * MR_MeshOrPoints_ProjectionResult_GetMutable_isBd(MR_MeshOrPoints_ProjectionResult *_this)
MRC_API void MR_MeshOrPointsXf_Destroy(const MR_MeshOrPointsXf *_this)
Destroys a heap-allocated instance of MR_MeshOrPointsXf. Does nothing if the pointer is null.
MRC_API MR_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_OffsetMutablePtr(MR_MeshOrPoints_ProjectionResult *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_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_OffsetPtr(const MR_MeshOrPoints_ProjectionResult *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_MeshOrPoints_ProjectionResult * MR_MeshOrPoints_ProjectionResult_AssignFromAnother(MR_MeshOrPoints_ProjectionResult *_this, const MR_MeshOrPoints_ProjectionResult *_other)
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
Definition MRAffineXf.h:36
Definition MRBox.h:108
Definition MRId.h:96
Definition MRVector3.h:50
Definition MRId.h:55