MeshLib C Docs
Loading...
Searching...
No Matches
MRRectIndexer.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMesh/MRVector2.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_DistanceMap MR_DistanceMap; // Defined in `#include <MRCMesh/MRDistanceMap.h>`.
17typedef struct MR_Matrix_float MR_Matrix_float; // Defined in `#include <MRCMesh/MRMatrix.h>`.
18typedef struct MR_PixelBitSet MR_PixelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
19
20
21typedef int8_t MR_OutEdge2;
22enum // MR_OutEdge2
23{
30};
31
39
42
46
51
54
57
62
66
71
75
80
85
88
91
97
102
107
111
115
119
124
129
134
140
145
150
156MRC_API void MR_expandPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int32_t *expansion);
157
163MRC_API void MR_shrinkPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int32_t *shrinkage);
164
165#ifdef __cplusplus
166} // extern "C"
167#endif
struct MR_PixelBitSet MR_PixelBitSet
Definition MRBitSet.h:95
struct MR_RectIndexer MR_RectIndexer
Definition MRDistanceMap.h:22
struct MR_Matrix_float MR_Matrix_float
Definition MRDistanceMap.h:17
struct MR_DistanceMap MR_DistanceMap
Definition MRDistanceMap.h:46
MRC_API void MR_RectIndexer_DestroyArray(const MR_RectIndexer *_this)
Destroys a heap-allocated array of MR_RectIndexer. Does nothing if the pointer is null.
MRC_API MR_uint64_t MR_RectIndexer_size(const MR_RectIndexer *_this)
MRC_API void MR_expandPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int32_t *expansion)
MRC_API void MR_RectIndexer_Destroy(const MR_RectIndexer *_this)
Destroys a heap-allocated instance of MR_RectIndexer. Does nothing if the pointer is null.
MRC_API MR_PixelId MR_RectIndexer_getNeighbor_3(const MR_RectIndexer *_this, MR_PixelId v, const MR_Vector2i *pos, MR_OutEdge2 toNei)
MRC_API MR_Vector2i MR_RectIndexer_toPos_uint64_t(const MR_RectIndexer *_this, MR_uint64_t id)
MRC_API MR_RectIndexer * MR_RectIndexer_OffsetMutablePtr(MR_RectIndexer *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_PixelId MR_RectIndexer_toPixelId(const MR_RectIndexer *_this, const MR_Vector2i *pos)
MRC_API MR_PixelId MR_RectIndexer_getNeighbor_2(const MR_RectIndexer *_this, MR_PixelId v, MR_OutEdge2 toNei)
MRC_API const MR_Vector2i * MR_RectIndexer_dims(const MR_RectIndexer *_this)
MRC_API MR_Matrix_float * MR_RectIndexer_MutableStaticDowncastTo_MR_Matrix_float(MR_RectIndexer *object)
@ MR_OutEdge2_Invalid
Definition MRRectIndexer.h:24
@ MR_OutEdge2_MinusX
Definition MRRectIndexer.h:28
@ MR_OutEdge2_PlusX
Definition MRRectIndexer.h:27
@ MR_OutEdge2_MinusY
Definition MRRectIndexer.h:26
@ MR_OutEdge2_Count
Definition MRRectIndexer.h:29
@ MR_OutEdge2_PlusY
Definition MRRectIndexer.h:25
MRC_API MR_uint64_t MR_RectIndexer_toIndex(const MR_RectIndexer *_this, const MR_Vector2i *pos)
MRC_API void MR_shrinkPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int32_t *shrinkage)
MRC_API MR_RectIndexer * MR_RectIndexer_ConstructFromAnother(const MR_RectIndexer *_other)
MRC_API const MR_Matrix_float * MR_RectIndexer_StaticDowncastTo_MR_Matrix_float(const MR_RectIndexer *object)
MRC_API bool MR_RectIndexer_areNeigbors_MR_Vector2i(const MR_RectIndexer *_this, const MR_Vector2i *pos0, const MR_Vector2i *pos1)
MRC_API MR_RectIndexer * MR_RectIndexer_Construct(const MR_Vector2i *dims)
MRC_API MR_OutEdge2 MR_opposite_MR_OutEdge2(MR_OutEdge2 e)
Generated from function MR::opposite.
MRC_API MR_RectIndexer * MR_RectIndexer_DefaultConstruct(void)
MRC_API MR_RectIndexer * MR_RectIndexer_DefaultConstructArray(size_t num_elems)
MRC_API bool MR_RectIndexer_areNeigbors_MR_PixelId(const MR_RectIndexer *_this, MR_PixelId v0, MR_PixelId v1)
MRC_API void MR_RectIndexer_resize(MR_RectIndexer *_this, const MR_Vector2i *dims)
MRC_API const MR_DistanceMap * MR_RectIndexer_StaticDowncastTo_MR_DistanceMap(const MR_RectIndexer *object)
int8_t MR_OutEdge2
Definition MRRectIndexer.h:21
MRC_API MR_DistanceMap * MR_RectIndexer_MutableStaticDowncastTo_MR_DistanceMap(MR_RectIndexer *object)
MRC_API MR_Vector2i MR_RectIndexer_toPos_MR_PixelId(const MR_RectIndexer *_this, MR_PixelId id)
MRC_API const MR_RectIndexer * MR_RectIndexer_OffsetPtr(const MR_RectIndexer *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_RectIndexer * MR_RectIndexer_AssignFromAnother(MR_RectIndexer *_this, const MR_RectIndexer *_other)
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
const Vector3i & dims() const
Definition MRId.h:66
Definition MRVector2.h:28