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_PixelBitSet MR_PixelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16
17
18typedef signed char MR_OutEdge2;
19enum // MR_OutEdge2
20{
27};
28
36typedef struct MR_RectIndexer MR_RectIndexer;
37
40
44
49
53
57
63
69
72
75
83
88
93
97
101
105
110
115
120
126
131
136
142MRC_API void MR_expandPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *expansion);
143
149MRC_API void MR_shrinkPixelMask(MR_PixelBitSet *mask, const MR_RectIndexer *indexer, const int *shrinkage);
150
151#ifdef __cplusplus
152} // extern "C"
153#endif
struct MR_PixelBitSet MR_PixelBitSet
Definition MRBitSet.h:102
struct MR_RectIndexer MR_RectIndexer
Definition MRDistanceMap.h:22
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)
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_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)
signed char MR_OutEdge2
Definition MRRectIndexer.h:18
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)
@ MR_OutEdge2_Invalid
Definition MRRectIndexer.h:21
@ MR_OutEdge2_MinusX
Definition MRRectIndexer.h:25
@ MR_OutEdge2_PlusX
Definition MRRectIndexer.h:24
@ MR_OutEdge2_MinusY
Definition MRRectIndexer.h:23
@ MR_OutEdge2_Count
Definition MRRectIndexer.h:26
@ MR_OutEdge2_PlusY
Definition MRRectIndexer.h:22
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 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)
MRC_API MR_RectIndexer * MR_RectIndexer_AssignFromAnother(MR_RectIndexer *_this, const MR_RectIndexer *_other)
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition include/MRCMisc/exports.h:11
Definition MRId.h:52
Generated from class MR::Vector2i.
Definition MRVector2.h:50