MeshLib C Docs
Loading...
Searching...
No Matches
MRVolumeIndexer.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/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_VoxelBitSet MR_VoxelBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
15
16
17typedef signed char MR_OutEdge;
18enum // MR_OutEdge
19{
28};
29
34
38
41
47
53
59
65
71
77
81
86
93
97
101
107
110
113
118
126
132
136
140
146
149
152
160
165
170
175
179
183
188
193
199
205
211
216
222
228
233
238
246
251
256
262MRC_API void MR_expandVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *expansion);
263
269MRC_API void MR_shrinkVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *shrinkage);
270
271#ifdef __cplusplus
272} // extern "C"
273#endif
struct MR_VoxelBitSet MR_VoxelBitSet
Definition MRBitSet.h:112
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_3(const MR_VolumeIndexer *_this, MR_VoxelId v, const MR_Vector3i *pos, MR_OutEdge toNei)
MRC_API MR_VoxelLocation * MR_VoxelLocation_ConstructFromAnother(const MR_VoxelLocation *_other)
MRC_API MR_VoxelLocation * MR_VoxelLocation_DefaultConstruct(void)
MRC_API bool MR_VolumeIndexer_areNeigbors_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId v0, MR_VoxelId v1)
@ MR_OutEdge_Count
Definition MRVolumeIndexer.h:27
@ MR_OutEdge_PlusZ
Definition MRVolumeIndexer.h:21
@ MR_OutEdge_MinusZ
Definition MRVolumeIndexer.h:22
@ MR_OutEdge_MinusX
Definition MRVolumeIndexer.h:26
@ MR_OutEdge_PlusY
Definition MRVolumeIndexer.h:23
@ MR_OutEdge_PlusX
Definition MRVolumeIndexer.h:25
@ MR_OutEdge_Invalid
Definition MRVolumeIndexer.h:20
@ MR_OutEdge_MinusY
Definition MRVolumeIndexer.h:24
MRC_API bool MR_VolumeIndexer_isBdVoxel(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_endId(const MR_VolumeIndexer *_this)
struct MR_VolumeIndexer MR_VolumeIndexer
Definition MRVolumeIndexer.h:37
MRC_API MR_VoxelLocation * MR_VoxelLocation_ConstructFrom(MR_VoxelId id, MR_Vector3i pos)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_Construct(const MR_Vector3i *dims)
MRC_API const MR_Vector3i * MR_VoxelLocation_Get_pos(const MR_VoxelLocation *_this)
MRC_API void MR_expandVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *expansion)
MRC_API void MR_VoxelLocation_Set_pos(MR_VoxelLocation *_this, MR_Vector3i value)
MRC_API const MR_VolumeIndexer * MR_VolumeIndexer_OffsetPtr(const MR_VolumeIndexer *ptr, ptrdiff_t i)
MRC_API void MR_VoxelLocation_DestroyArray(const MR_VoxelLocation *_this)
Destroys a heap-allocated array of MR_VoxelLocation. Does nothing if the pointer is null.
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_AssignFromAnother(MR_VolumeIndexer *_this, const MR_VolumeIndexer *_other)
MRC_API MR_VoxelLocation * MR_VoxelLocation_DefaultConstructArray(size_t num_elems)
MRC_API void MR_shrinkVoxelsMask(MR_VoxelBitSet *mask, const MR_VolumeIndexer *indexer, const int *shrinkage)
MRC_API const MR_VoxelId * MR_VoxelLocation_Get_id(const MR_VoxelLocation *_this)
MRC_API const MR_VoxelLocation * MR_VoxelLocation_OffsetPtr(const MR_VoxelLocation *ptr, ptrdiff_t i)
MRC_API const MR_Vector3i * MR_VolumeIndexer_dims(const MR_VolumeIndexer *_this)
MRC_API MR_VoxelLocation * MR_VolumeIndexer_getNeighbor_2_MR_VoxelLocation(const MR_VolumeIndexer *_this, const MR_VoxelLocation *loc, MR_OutEdge toNei)
struct MR_VoxelLocation MR_VoxelLocation
Definition MRVolumeIndexer.h:33
MRC_API bool MR_VoxelLocation_ConvertTo_bool(const MR_VoxelLocation *_this)
MRC_API void MR_VoxelLocation_Destroy(const MR_VoxelLocation *_this)
Destroys a heap-allocated instance of MR_VoxelLocation. Does nothing if the pointer is null.
MRC_API MR_VoxelLocation * MR_VoxelLocation_OffsetMutablePtr(MR_VoxelLocation *ptr, ptrdiff_t i)
MRC_API MR_OutEdge MR_opposite_MR_OutEdge(MR_OutEdge e)
Generated from function MR::opposite.
MRC_API MR_VoxelId MR_VolumeIndexer_getExistingNeighbor(const MR_VolumeIndexer *_this, MR_VoxelId v, MR_OutEdge toNei)
MRC_API bool MR_VolumeIndexer_areNeigbors_MR_Vector3i(const MR_VolumeIndexer *_this, const MR_Vector3i *pos0, const MR_Vector3i *pos1)
MRC_API void MR_VolumeIndexer_Destroy(const MR_VolumeIndexer *_this)
Destroys a heap-allocated instance of MR_VolumeIndexer. Does nothing if the pointer is null.
MRC_API bool MR_VolumeIndexer_isInDims(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_4(const MR_VolumeIndexer *_this, MR_VoxelId v, const MR_Vector3i *pos, bool bdPos, MR_OutEdge toNei)
MRC_API bool MR_VolumeIndexer_hasNeighbour(const MR_VolumeIndexer *_this, const MR_Vector3i *pos, MR_OutEdge toNei)
MRC_API MR_VoxelId * MR_VoxelLocation_GetMutable_id(MR_VoxelLocation *_this)
MRC_API void MR_VolumeIndexer_DestroyArray(const MR_VolumeIndexer *_this)
Destroys a heap-allocated array of MR_VolumeIndexer. Does nothing if the pointer is null.
MRC_API MR_VoxelLocation * MR_VolumeIndexer_toLoc_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId id)
signed char MR_OutEdge
Definition MRVolumeIndexer.h:17
MRC_API MR_VoxelId MR_VolumeIndexer_toVoxelId(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_ConstructFromAnother(const MR_VolumeIndexer *_other)
MRC_API size_t MR_VolumeIndexer_sizeXY(const MR_VolumeIndexer *_this)
MRC_API MR_VoxelLocation * MR_VolumeIndexer_toLoc_MR_Vector3i(const MR_VolumeIndexer *_this, const MR_Vector3i *pos)
MRC_API MR_VoxelId MR_VolumeIndexer_getNeighbor_2_MR_VoxelId(const MR_VolumeIndexer *_this, MR_VoxelId v, MR_OutEdge toNei)
MRC_API MR_Vector3i * MR_VoxelLocation_GetMutable_pos(MR_VoxelLocation *_this)
MRC_API MR_VoxelLocation * MR_VoxelLocation_AssignFromAnother(MR_VoxelLocation *_this, const MR_VoxelLocation *_other)
MRC_API size_t MR_VolumeIndexer_size(const MR_VolumeIndexer *_this)
MRC_API void MR_VoxelLocation_Set_id(MR_VoxelLocation *_this, MR_VoxelId value)
MRC_API MR_Vector3i MR_VolumeIndexer_toPos(const MR_VolumeIndexer *_this, MR_VoxelId id)
MRC_API MR_VolumeIndexer * MR_VolumeIndexer_OffsetMutablePtr(MR_VolumeIndexer *ptr, ptrdiff_t i)
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector3i.
Definition MRVector3.h:63
Definition MRId.h:155