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
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_DistanceMap MR_DistanceMap; // Defined in `#include <MRCMesh/MRDistanceMap.h>`.
16typedef struct MR_Matrix_float MR_Matrix_float; // Defined in `#include <MRCMesh/MRMatrix.h>`.
17typedef struct MR_PixelBitSet MR_PixelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
18
19
20typedef signed char MR_OutEdge2;
21enum // MR_OutEdge2
22{
29};
30
38
41
45
50
53
56
61
65
70
74
79
84
87
90
96
101
106
110
114
118
123
128
133
139
144
149
155MRC_API void MR_expandPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *expansion);
156
162MRC_API void MR_shrinkPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *shrinkage);
163
164#ifdef __cplusplus
165} // extern "C"
166#endif
struct MR_PixelBitSet MR_PixelBitSet
Definition MRBitSet.h:94
struct MR_RectIndexer MR_RectIndexer
Definition MRDistanceMap.h:21
struct MR_Matrix_float MR_Matrix_float
Definition MRDistanceMap.h:16
@ MR_OutEdge2_Invalid
Definition MRRectIndexer.h:23
@ MR_OutEdge2_MinusX
Definition MRRectIndexer.h:27
@ MR_OutEdge2_PlusX
Definition MRRectIndexer.h:26
@ MR_OutEdge2_MinusY
Definition MRRectIndexer.h:25
@ MR_OutEdge2_Count
Definition MRRectIndexer.h:28
@ MR_OutEdge2_PlusY
Definition MRRectIndexer.h:24
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_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)
MRC_API MR_uint64_t MR_RectIndexer_toIndex(const MR_RectIndexer *_this, const MR_Vector2i *pos)
MRC_API MR_RectIndexer * MR_RectIndexer_ConstructFromAnother(const MR_RectIndexer *_other)
MRC_API void MR_expandPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *expansion)
MRC_API void MR_shrinkPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *shrinkage)
MRC_API const MR_Matrix_float * MR_RectIndexer_StaticDowncastTo_MR_Matrix_float(const MR_RectIndexer *object)
signed char MR_OutEdge2
Definition MRRectIndexer.h:20
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)
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)
struct MR_DistanceMap MR_DistanceMap
Definition MRTiff.h:9
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
const Vector3i & dims() const
Definition MRId.h:65
Definition MRVector2.h:27